Jump to content

hotwires

Members
  • Posts

    203
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by hotwires

  1. Kenwood NX-700 or NX-800 VHF/UHF radio transceivers have integrated RS-232 modems with a max speed of 9600 baud. I know of two water treatment applications using these radios with Unitronics Vision OPLC's communicating via MODBUS, the longest distance is 10 statute miles (about 15 kilometers). If you're in a non line of sight, long distance situation these radios can transmit as much as 50W/35W RF power and get the job done. If you have line of sight then the wireless ethernet or RS-232/RS-485 bridges would work at a lower cost. PLEASE REMEMBER TO TAKE THE FRESNEL ZONE INTO ACCOUNT in your path study if you are considering 900 MHz or above. Short of having 100' of tower elevation for yagi or parabolic antennas at each end of the link, I have some doubts. The Kenwood radios do require an FCC radio frequency license. Real world application has proven to me they work excellent for low speed, long distance data communication. No monthly fees as would apply with cellular. Probably less RF interference as can be seen in unlicensed 900, 2400, and 5800 MHz bands.

     Cellular is subject to outages, if not on the same cell tower a fiber optic cable cut could leave you down. The WiFi band stuff...can be an RF jungle out there. Police, fire, and EMS use VHF/UHF land mobile radio for their primary communication for a reason. How mission critical is your control link? The constant (and worst) enemy of all things RF is ice on the antennas. I've seen UHF yagis in power company SCADA use fiberglass radomes over the elements. 

  2. 5 hours ago, C_R_PLC said:

    Of all the stupid issues, yup that was it. Everything is working now! Thank you guys so much for the assistance.

     It's happened to me more than once in the early developmental stage of programming.  Make a subroutine and then forget to call it from the main routine. I've tried to force the habit of calling the subroutine first then builinding it

  3. To the best of my knowledge (done a lot with V430's and ethernet), there is NO provision/capability for the Vision line to act as a VNC server. The Unistream line DOES support VNC. i believe creators and gurus here would all advise looking into a Unistream controller for an application requiring VNC access. The remote operator app does work well on iphone in all of my applications. It uses TCP port, I suspect a custom protocol though. not VNC like in it's nature, it uses image caching. 

  4. On January 2, 2018 at 3:27 AM, Saragani said:

    Each tag that you create in the Global tags, has an absolute address. Passing something by reference means that the function which gets it, gets the address of that tag.

    Passing something by value means that not the address, but the actual value is being passed. 

    In the "Increment" element, although the number is being passed at the left side, it is being passed by reference, since an increment is being done on the tag itself.

     

    When you write your own UDFB, then numbers and bits that are being passed as Function-In, are being sent as values. Meaning, that if you pass a number as function-in, and then for example increment it inside the function, then after you exit that function, then you should see that the value was not changed.

    Arrays and Structs that are sent through a Function-In, are being passed by reference, so if you increment a number inside a struct or array, then it will affect the global tag.

    You can also pass a number or a bit as a function-out, and then it is being passed as reference.

     

    Strings, as much as I remember, are being passed as reference. (You can check it)

    I've got my head halfway around this. Guess you'd have to draw me a picture (joke). barrier is still in terminology. i have a fair grasp of hardware and the architecture of data processing. programming launguages not so much, to many dialects/flavors out there. Pyrhon and PBASIC are only ones I ever actually wrote anything in (and it was nothing vast). 

    I recall Dan Logee explaining the UDFB (local, Function In, and Function out) tags were processed in RAM and never occupied EEPROM (non volitile) memory until outside of the UDFB's process. Is this in anyway analoguos to "passing" by reference versus value? To me passing rapid change in velocity to overtake another automobile on the roadway. or please pass the carrots, or passing a kidney stone. The English langauge is riddled with abiguity :( 

  5. Aus, 

    Inevitably some piece of equipment will fail in the same area you were working about an hour after you leave. Then your phone rings, then you explain how you didn't touch it and that it is in no way connected to what you serviced or installed, and then you hear:  "but it was working until you showed up". Then you decide if you should: go into hiding, go back and troubleshoot something you shouldn't be messing with, or wait for other folks to show up and confirm that it had nothing to do with you. Fun times. Happens at least once a year to me.  I would not advise slashing your wrists. Usually finds resolve within 24 hours :) 

    • Like 1
  6. You can enter your own scaling ranges direct in the AI setup section.  This is addressed in past forum posts and was also discussed at a training seminar I attended last year. 

    Joe is correct, this forum is primarily composed of fellow programmers (from novices to experts) who have day jobs. Usually within 48 hours you will have a reply. 

    If it is urgent and a weekday I highly recommend calling Unitronics technical support. They will do their best to give you an answer on the spot or within 24 hours if it's a complex or unprecedented issue. 

  7. Unistream's  periodic mode internal sequencing logic (no idea what it is) may have something to do with erradic operations when adding a second slave. I have a program that polls four RTU (RS-232 over RF) slaves and polling order is RTU 1,3,2,4 not 1,2,3,4.  

    Thought this was odd. I poll once every 45 seconds. The RF modems add up to 500mS latency. Offsite pump control doesn't demand high speed updates. 

  8. 11 hours ago, Joe Tauser said:

    @hotwires - 

    You're forgetting that Modbus is not a data broadcast, but a query/response protocol.  The COM activities are serviced at the end of the scan, so communication is not instantaneous.  And there has to be two.

    I don't know the exact reason for why Modbus isn't faster than it is - your calculations are a good and show why it should be.  But my personal empirical data has shown that it isn't.

    A good exercise would be to get my Modbus simulator fired up and have the PLC hammer the simulator at different baud rates to determine the speed thresholds.

    You'll note in Meeg's post that he had partial success at 500 ms.  If I had to guess I'd say that the UART buffer for the PLC serial port is filling up and the PLC CPU is having a hard time unloading it.  You have to remember that a PLC CPU is not in the same league as a graphics card and it's prime directive is to solve the program logic and execute I/O operations. 

    Joe T.

    @Joe Tauser

    I didn't forget the architchtural structure of MODBUS. I used terminology like: " request packet / response packet" and "exchanged".  No data communication is instantaneous (maybe quantum computer would be closest thing I can imagine). I also remember JT qoute: "empirical data is the best data" and wholly agree. My time calculation figured in the send and reply packets (approximations)  but NOT: UART, CPU, or ladder execution times. 17 mS is still a far cry from over 500mS.

    I don't have an intimate understanding of physical PLC processing architecture, however I assume (dangerous word, I know) that it's fairly parallel to PC's and embedded uC or uP  (with external chips) control devices (like DMX lighting control consoles and BASIC stamps). Unitream has two CPU's? correct? Panel and CPU, then RS-232 module has UART with CPU that is on a com bus back to the main brain.

    If I ever get some spare time I'll try to setup a Unistream RTU master to Vision RTU slave and try to measure min time between successful RHR exchanges.

  9. Just a thought: you could try aperiodic ladder trigger on sensor #1, compare for increment of RTU#1 sessions STRUCT integer, that in turn triggers Aperiodic RTU#2, compare detect session STRUCT advancement, in turn triggers RTU#1 again, LOOP.  In THEORY this should alternate MODBUS commands between sensors at the rate each MODBUS slave STRUCT count advances. Would be analogous to the MODBUS "function in progress" bit in vision. The system would tell you when it had completed a MODBUS operation, that being the cue for the next.  

    Never tried this exact scenario. I have used session counters to detect a complete cycle of periodic MODBUS exchanged and toggle heartbeat bits.

    Assuming:

    The request packet for the Slave address (1 byte) + Function code (1 byte) + Offset (2 bytes) + Number of Regs (2 bytes) + CRC (2 bytes) = 8 bytes.
    The response packet length will be: Slave address (1 byte) + Function code (1 byte) + Byte Count (1 byte) + Data (2 bytes) + CRC (2 bytes) = 7 bytes.
    The number of bits will depend on the serial setup (e.g. parity, data bits etc.).
    Assuming 1 start bit, 8 data bits, 1 parity bit and 1 stop bit = 11 bits per byte.
    So total number of bits = 15 bytes * 11bits/byte = 165 bits.
    Now the bit time must be calculated = 1 / baud rate.
    Taking 9600 baud as an example, bit rate = 9600 / 1 = 104 micro seconds per bit transmitted
    Giving a total transaction time of 104 micro seconds * 165 bits= 17.16 milliseconds per MODBUS handshake

    Now there is some internal overhead in CPU to chew it up and spit it out. What part am I missing that makes less than 1 second polls feasible?

    One thing I'm not factoring in is the response turn around time in the slaves. That would have to be measured or found in spec sheet.

  10. I am particularly jumpy when working in or around high voltage electron tube power amplifiers. Even little sounds startle me. I've had other people clap or make a loud bang while I had my head in an equipment cabinet, NOT FUNNY AT ALL! Amazing how the timing can go when you shoot the juice to equipment and something else goes bang, pop, bing, bang or boom. Heart arrhythmia's can certainly result from such events. Happy New Year Aus!

    • Like 1
  11. 23 hours ago, Cam said:

    Why not run 2 timers using the socket connected SB?

    Timer 1 monitors how long a socket is connected for  if it becomes to long close the connection and re-initialize the socket

    Timer 2 monitors how long between connections if it times out re-initialize the socket.

     

    I'm not sure you need to re-boot the PLC just re-initializing the socket should clear up the issue.

    UPDATE: I found that SI104 (socket 1) was not set in my SAMBA program, guess I'm thinking of some of the V430's I had tried setting SI 10x values. I set power up value D#10000 for SI104 (10 sec). I'll see how that works out. bad thing is the socket freeze doesn't happen often (can be weeks or months).

    For some reason I had the impression that SI101 thru SI110 did that for you:

    SI 103

     TCP/IP Connection Keep Alive (Socket 0)

    Units of 100 msec

    Note- When value is ‘0’, the function is disabled

    Enables the PLC to disconnect if there is no communication from the connected device.

    • When TCP/IP connection is established (SI 145-148 = 6) check data transport (SDW 14 – 21).

    •  If no data transport occurred during the defined time – perform ‘Socket Init’.

    • Data Transport counter is SDW 38

    • Upvote 1
  12. 5 hours ago, NoamM said:

    Hi,
    checking the issue. Will update ASAP.

    Great, not sure if it will present in a LAN environment or not. All VNC clients are on WAN side. Router is DMZ to PLC (panel) IP. My only theory is when multiple clients connect at the same time (which can happen) and then disconnect in random sequence that (perhaps) PLC not detecting disconnect. Not really sure of the mechanics of a VNC session disconnect on host side. I know at 2am that six clients are not still connected. Mobile devices are mostly iphones, if that helps. Operators spot check panel when they get a text msg alarm. Doubtful anyone is staying on 24/7 via their cell phone. Thanks for looking into it?

  13. Is there any chance of the future holding a feature that would compose reports to printers? something to the likes of the email message composer. put in text, variables, etc and have a ladder FB that when triggered would send out to a printer via USB or TCP? I know there is an example file for a TCP printer, I've looked it over, not live tested yet. It's complex to say the least. I would love to get my Unistream client daily reports printed out direct from PLC. The old Foxboro round paper charts with the red ink go in the garbage on most upgrades, the onscreen displays (trends) and emails are great, however some still like/require that data on paper. Paper: that nostalgic, almost extinct white stuff.

  14. I can relate to item #3. Things get a little wonky when you start deleting and inserting news alarms. I know, I know, you should have a list of every alarm in a logical order before programming... however sometimes things change/evolve or you have the inevitable programmer who just "free styles".  Another far out wish would be to see direct alarm to email generation. I've built out ladder to pair emails to alarms ENTERING and EXITING active states. It's not that it's difficult, just time consuming. Drive behind the majority of my feature suggestions is purely based on time savings for the programmer. The Unistream sales literature uses "50%" less development time" phrase. I really couldn't begin to personally quantify the time savings into a percent. Is it better than everything else I've used, YES, hands down. Kudos to UniT for that. The world will always want: bigger, better, faster, more.

  15. 23 hours ago, Saragani said:

    Pass the bits as Function-Out or pass an entire array or struct that contains those bits as a function-in, and the set / reset coil will still affect the values. (Passing tags by reference vs by value).

     

    This is over my head. can you paraphrase? I hope to do a major update to one of my UniL programs and a UDFB with comparators and S/R logic will come into play. A stack of less than and greater than compares linked to set/reset coils (pump state control PV vs setpoints), want to repeat logic for two water tanks. If you could clarify the context of the phrases; passing, reference, and value would help.

×
×
  • Create New...