PLC newbie - data handling capability of PLCs?

lslarry86

Member
Join Date
May 2008
Location
North Carolina
Posts
3
Hi -

I currently have a custom controller board that does some things that are clearly within the domain of ladder logic. But it also does some things that may not be:

1. Watch for a trigger
2. Send a stored serial command to an external device
3. Read that device's reply
4. Check the CRC
5. Parse the reply for good/bad result
6. Take control actions based on the result
7. Modify the stored serial command for the next cycle and update the CRC.

#1 and #6 are good PLC functionality, but is it reasonable to expect enough computation from a PLC to do the other things?

I'm asking because I have my eye on the a certain low-end PLC which my favorite electronics company sells for less than it costs me to build my custom board.

Is it possible to port my application to a PLC?

Thanks,
Larry
 
Please forgive me if I'm wrong, but this sure has the feeling of a test/homework question.
 
> What controller are you considering?

For now, I'm more thinking about porting to PLC vs. redesigning my custom board. The specific device that made me realize this might be feasible is the IDEC MicroSmart (sold by B&B Electronics).

> Please forgive me if I'm wrong, but this sure has the feeling of a test/homework question.

I wish that were all I had to worry about.

I am an embedded system programmer (mainly C and various assemblers) running a small consulting company: www.GlueLogix.com. I have been working under the assumption that PLC hardware was a poor choice for my solutions for several reasons that may no longer apply. My last direct experience with PLC hardware was in the late 80's, when I was still working as a tech. I think I get the principles, but have been assuming that the low data capacity and high price of PLC technology makes it bad for my needs. If that's not true any more, I'd be happy to adopt PLC hardware and stop worrying about the FCC/UL status of my custom board.

Thanks,
Larry
 
We can probably advise more accurately if you can describe your application in more detail Ie how much data is being passed checked and reacted to. Is there speed concerns. What format is the serial commands ascii? the trigger is no concerns serial communications the concerns is usually the quantity of data as far as comparing it to develop actions then yes a PLC can be used to send a stored command is also a yes. The tricky one is the CRC checks
 
A better idea is to describe an application in our plant we have a sortation conveyer with 16 diverter lanes hooked up to it is a barcode scanner that is photoeye triggered. We pass approx 100 boxes per minute. the scanner reads this data sends it to the SLC 504 the SLC then processes that barcode data of over 400 different product codes then sends each box down the appropriate diverter the SLC line is also from I believe the 80's so newer models will probably be more capable but on this app it ran without a problem. As well as handling close to 70 I/O points as well as two VFD's
 
Larry,

Everything you mentioned sounds like its right up PLC alley, although a little more info is needed.

1. What is the serial comm. specs. (Baud,Databits,etc..)
2. What is the trigger ? (Digital/Analog,Voltage type,speed)
3. What type of Outputs do you need ? (Relay, solid state,analog)
4. Would a PLC that is programmed in Asm or C be better for you ?

Dave
 
Calculating a CRC in ladder logic could get ugly, although the functions probably exist depending on PLC choice. Many low-end PLCs include OR, XOR, and bit shift functions. It would be an interesting exercise.

Is the CRC calculation algorithm the same as for Modbus? If not, what is it? What is the target price where a PLC becomes competitive with your custom board? How much data storage will be required in the PLC? Given those parameters, people with expertise in different brands might be able to suggest possibilities.
 
Wow, this response is a bit overwhelming. Let me see what I can summarize about my existing applications without giving too much away.

The big picture is that my current board interfaces to serial controlled RFID readers, adding triggered operation and rudimentary machine control while performing compute operations on the RFID data, and forwarding everything to a PC program for logging.

1. Serial is usually 57600 8N1, but I have one device that is 38400 7E1. With one exception, none are ASCII.

2. CRC computation varies with the device. It's very likely that any of them match Modbus. I currently support 3 different readers. CRC must be computed to check incoming replies. It must also be added to some outgoing commands.

3. The outgoing serial command is often just a canned read command, but my system also serializes RFID tags. That means, in real time, the stored command must be modified and the CRC recalculated, before the next trigger comes in. This is pretty different from reading barcode strings and looking up actions.

4. The current system parses each serial reply and sets logical outputs good/bad based on the result. The format varies by the serial device, but usually involves zero-checking one or two status bytes.

4. My current system uses Grayhill SSRs, so it can handle 3-60 VDC or 110 VAC. It's all dry contact, so I have to do some wiring during some installs. That's one thing I'm hoping to buy from PLC technology - easy switches between dry contact and voltage based interfacing.

5. Pinworm21 asked: Would a PLC that is programmed in Asm or C be better for you ?
I assumed that all PLCs were programmed in ladder logic or some newfangled high level language. If some unit is available that lets me patch in C language modules, that might be the answer. Is there such a thing?

6. The theoretical maximum based on RFID air interface timing is 50 times per second, though to be fair the current system has issues faster than around 10/sec.

Thanks again,
Larry
 
CRC Checking and generation are not particularly difficult on most PLC's but they can bog low end processors down and result in long scan times. I would only use the PLC to generate CRC's if the messages you are transmitting are truly variable. If you have a relatively small number of different messages you might want to transmit then it is much more efficient to simply calculate the CRC for each message and store it for use as required.

Andybr
 

Similar Topics

Hi All, I have searched for an answer to this on other forums but didn't find anything, so pls be gentle if there is. I am new to PLCs but...
Replies
4
Views
3,640
Hi, after 30 years involved with automation I'm actually writing my first PLC program and am struggling a fair bit. My background is mechanical...
Replies
8
Views
1,881
I picked up a Siemens S7 1200 from a buddy and I want to start fiddling around with it to learn about PLC's. I don't want to spend a lot of bucks...
Replies
0
Views
2,470
Hi Guys I completed a PLC course a few weeks ago and I've decided to build myself a PLC training rig. I'm using an s7 200 as I managed to pick...
Replies
7
Views
3,140
Hopefully I'll have a legitimate copy of RS500 to program micrologix and SL500 series PLCs. A guy in another group is going to mail me his old...
Replies
6
Views
1,837
Back
Top Bottom