PICO, Communication |
![]() ![]() |
PICO, Communication |
Nov 2 2009, 11:08 PM
Post
#1
|
|
|
Sparky ![]() ![]() ![]() Group: MrPLC Member Posts: 58 Joined: 25-September 09 Member No.: 39,515 Country:Canada
|
Hello experts,
I was wondering if there is a way to communicate with a PICO controler? On DH+ for example. I just started to use one to indicate with a strop and horn the begening of shift so employees would be at work on time. My worry is that it may not stay on time as someone said in another of my topics, that even a SLC5/04 will not necesserily keep time correct. Now can I set it up this way? Thank you. |
|
|
|
Nov 3 2009, 07:53 AM
Post
#2
|
|
|
Propeller Head ![]() ![]() ![]() ![]() ![]() ![]() Group: MrPLC Member Posts: 1,003 Joined: 27-March 05 From: North Carolina Member No.: 7,183 Country:United States
|
Hello experts, I was wondering if there is a way to communicate with a PICO controler? On DH+ for example. I just started to use one to indicate with a strop and horn the begening of shift so employees would be at work on time. My worry is that it may not stay on time as someone said in another of my topics, that even a SLC5/04 will not necesserily keep time correct. Now can I set it up this way? Thank you. Most shops tend to do what you are doing by adding the 1 or 2 rungs to do it onto an existing PLC rather than adding a whole new PLC to do it. It is sort of like turning lights on and off, or running air compressors or hydraulic pumps. Sure you could have a dedicated PLC for this but the task is so small that usually most shops don't do it that way (no cost justification). No, especially not DH+. DH+ requires special, very expensive hardware that is approximately 5 to 6 times more than the cost of the Pico controller itself. DH+ is also woefully out of date and AB hasn't put out any new DH+ products in a very long time. The only advantage that DH+ ever had is that PLC-5's (and some SLC's) come with built-in ports to support it. All newer AB hardware only supports DH+ or RIO in the form of a "legacy" support. For instance the ControlLogix 1756-DHRIO card supports it but anyone who has worked with it will tell you that it's pure legacy support...you wouldn't want to expand to add to it any time soon because the card is so limiting compared to the native (CIP-based) networks for the ControlLogix series. A Pico controller already has three networking capabilities. First, there's Picolink which is yet another special proprietary protocol that AB created, just like DH+. It has all the same hassles as DH+ as far as finding stuff to support it, except that it hasn't been around for nearly 30 years so there has been less time for third party products to develop, and the Pico controllers are so inexpensive that there's very little market for such an animal. Second, there's DeviceNet if you buy the add-on module, which gives you the full capability of a CIP network. That's probably all that they will ever support. The cost to add DeviceNet to a device was purposely meant to be extremely low so that you could put DeviceNet directly onto field devices. DH+/RIO would increase the cost of a Pico controller well above the price of a Micrologix 1100 (the low end price point in the Micrologix series). At that point, you have Ethernet on board, and any argument for DH+ disappears. Third, and most importantly, you can connect some Pico controllers via serial ports, and you can program any of them via serial port connected to a PC. If you look at B&B Electronics for an example (www.bb-elec.com), there are several manufacturers of "serial device servers". These are small hardware devices that communicate via serial out one port and Ethernet out the other port. On the PC side of things, you run a special driver called a "virtual COM port". This connects to one or more serial device servers and mirrors the remote serial port onto your PC. Some of them (the Digi One SP device definitely does this) also allow you to link two serial device servers together in a "bridge" arrangement across Ethernet, allowing you to extend the length of the serial cable on a pair of Pico controllers out as long as you want (even across the Internet, though I don't really recommend doing that). So with a little bit of creativity with the serial ports, you could easily network a Pico controller just as you can with any other PLC. As far as the clock synchronization problem, yes, PLC's usually use a very cheap clock. The clock is not temperature controlled or compensated, and I don't know if it has any sort of voltage stabilization to deal with power supply fluctuations. I've seen some pretty high clock drifts, as much as a second per day. But for your purposes even if the clock drifts one second per day, that's 30 seconds per month. Just make it part of a PM route to go by and manually reset the clock once a month, or login remotely (if you use one of the above options) to do it. If you already have DeviceNet on a PLC, you could also use that to set the clock but at the price of most DeviceNet master cards, you may as well just buy a Micrologix 1100 and set the clock remotely via PC software or via another PC-synchronized PLC using MSG statements. There is a free version of RS-Logix 500 which can program a Micrologix 1100 so the cost other than cabling is only for the PLC. Plus, you get a full blown PLC. |
|
|
|
Nov 3 2009, 10:10 PM
Post
#3
|
|
|
Sparky ![]() ![]() ![]() Group: MrPLC Member Posts: 58 Joined: 25-September 09 Member No.: 39,515 Country:Canada
|
Hello.
I like the idea of using a Micro 1000 or even 1100. With the PICO it's quite easy to get some timers or have some output go on or off because the command is there and available. If I were to do that with a Micro how would I need to proceed? Which commands should I use? S xx...it's 38 and 39 for the clock and 40-41 for the date...or something like that. I would have to move this and probably convert it to BDC TOR (I dont have my laptop with me so I write thing out of memory)... Thank you. |
|
|
|
Nov 4 2009, 09:25 PM
Post
#4
|
|
|
Propeller Head ![]() ![]() ![]() ![]() ![]() ![]() Group: MrPLC Member Posts: 1,003 Joined: 27-March 05 From: North Carolina Member No.: 7,183 Country:United States
|
Hello. I like the idea of using a Micro 1000 or even 1100. With the PICO it's quite easy to get some timers or have some output go on or off because the command is there and available. If I were to do that with a Micro how would I need to proceed? Which commands should I use? S xx...it's 38 and 39 for the clock and 40-41 for the date...or something like that. I would have to move this and probably convert it to BDC TOR (I dont have my laptop with me so I write thing out of memory)... Thank you. Unless you are driving 7-segment LED displays directly from outputs or dealing with thumbwheel switches (which are more expensive than small graphical displays), there is almost never a reason to use BCD. With a Micrologix 1100, the timers are very easy. To start with on a blank project, you only have 1 timer allocated. To create more, right-click on the "Data Files" folder and select properties. Then you can either create more data files, or select a data file and click "Properties" to change the length. Then you can add as many timers (or any other data file except the I/O images and the processor status file) up to the limits of memory. Then just use the appropriate timer command (TON, RTO, or TOF) depending on your needs followed by triggering off the timer bits (usually TT or DN, although the DN bit in a TOF function is more like "not done"). The PLC-5 uses S registers for the clock. On a Micrologix, it's somewhat different because it is similar to the SLC series. Double-click on "Function Files" to see the clock. Change the tab to RTC (Real Time Clock). You can visually see the clock there. The clock register names are RTC:0.YR, RTC:0.MON, and so forth. Hold your mouse over an entry and it will show you the correct syntax for the tag when you use it in a program. If you want something to happen at the top of every hour, this is how I do that: NEQ RTC:0.HR N7:0 OTE B3:0/0 -- if the clock hour isn't equal to the cached value (N7:0 in this example), set bit B3:0/0 XIC B3:0/0 MOV RTC:0.HR N7:0 --- when bit B3:0/0 is set, move the current hour value into the cached value (N7:0) Then trigger all your code off of B3:0/0. This bit gets set exactly once each hour. You can also add a check on the minutes if you prefer a different time than the top of the hour. If you wanted to do something once at the top of the hour each day, you could use something like this: EQU RTC:0.HR 8 ONS B3:0/0 xxx --- At 8:00:00 AM each day, do "xxx" exactly once. The one shot resets at 9:00:00 AM, then retriggers again the next day at 8:00:00 AM for one scan. Again, you can add a "minutes" or even "seconds" check to trigger an event at some other odd time. The real time clock registers can be written to. Writing values into them can update the clock setting. So if you do something like this: XIC B3:0/0 MOV N7:0 RTC:0.YR XIC B3:0/0 MOV N7:1 RTC:0.MON XIC B3:0/0 MOV N7:2 RTC:0.DAY ... XIC B3:0/0 OTU B3:0/0 ...then you can write the correct time into N7:0 to N7:5 (year, month, day, hour, minute, second). Then set B3:0/0 and the clock will be updated in one scan. The same sort of code works with a PLC-5 except that you use S registers. The clock reading code will work with ControlLogix, too, but you have to first get the clock value (with GSV), and you have to set the clock with the SSV command. |
|
|
|
Nov 5 2009, 10:27 AM
Post
#5
|
|
|
Sparky ![]() ![]() ![]() Group: MrPLC Member Posts: 58 Joined: 25-September 09 Member No.: 39,515 Country:Canada
|
Wow that's help.
I have a SLC5/03 Processor. I might as well use this one. I wouldn't need to buy a MicroLogix. I could also do a clock for the plant as I can easily make myself an aluminium plate with the segments shaped out with the milling, then glue on the back a red Plexiglas with a few LEDs in the back. So I would have both the beggining and end of shifts signal with a few clocks throughout the plant. I did have another topic on this matter but was not encouraged to do it. I haven't had time either to investigate further more the Red Lion products. Thank you. |
|
|
|
![]() ![]() |
| Think this page or topic is awesome? Submit to: |
|
Lo-Fi Version | Time is now: 20th November 2009 - 09:07 PM |