Advertisement

Way Offtopic ? on serial PLC communication

Started by May 31, 2001 09:38 AM
4 comments, last by atreyu 23 years, 8 months ago
I have RSLinx Professional with an Allen-Bradley PLC (SLC 5/03 processor). The PLC is programmed using Ladder Logic and I have to write a VC++ software interface (will run on a PC with Win NT4.0) that allows a user to send messages to the PLC over an RS-232 serial port (ie. enter values into PLC registers, read values from PLC registers). I''ve been checking the web for about a week looking for sample code/command parameters/anything and I haven''t had much luck so that''s why I''m asking you guys. Can anyone tell me how to talk to a PLC? I know how to do serial communications, I just don''t know what to send. I''ve also heard some stuff about using Dynamic Data Exchange(DDE) with RSLinx to communicate but that makes even less sense to me. I''ve never done any DDE work but I''ll gladly learn it if it will work. It would help alot if someone would clear things up a bit. Thanks in advance, Ben d e e p s k y . s 5 . c o m "If builders made buildings the way programmers write programs, then the first woodpecker to come along would destroy civilization." -Weinberg''s Law
One of the guys I work with just did exactly that. He, unfortunetly, wrote it in Delphi.

There's three favors of the RSLinx software, we used the one-shot middle version. You hook-up to dtl32.dll, and all the calls to make stuff happen on the DataHighway are there. You don't have to use the DDE/OLE/COM stuff.



Magmai Kai Holmlor
- The disgruntled & disillusioned


Edited by - Magmai Kai Holmlor on June 1, 2001 1:04:49 PM
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
Nice! The dll sounds a lot better than writing a driver. To link with it do I use QueryInterface()? How do I get a list of the calls available?

Sure beats reading a 250pg .pdf on DF1 protocol.

Thanks a lot,
Ben

d e e p s k y . s 5 . c o m



"If builders made buildings the way programmers write
programs, then the first woodpecker to come along would
destroy civilization." -Weinberg''s Law
I do this all day using VB, so hopefully I can shed some light on the topic. I''ve used RSLinx before, but not recently. The last time I used it I used DDE to communicate with RSLinx. Problem is, DDE isn''t the most reliable thing on the planet.

More recently, I''ve switched to using the IN-GEAR32 ActiveX components from www.softwaretoolbox. I''ve found two very good advantages to using the IN-GEAR stuff.

1) I don''t have to buy a license for every machine like I do with the Rockwell stuff

2) I use VB and it''s very easy to drop a control and get communications up and running very quickly.

One thing about the controls that I must give you a heads up about - I haven''t actually used the serial communications stuff. We use 5/05''s that have a built-in ethernet port, and use that to communicate with the SLC. Hopefully the serial stuff works as well as the ethernet stuff.

Hope that helps!



ThomW
www.LMNOpc.com
Thanks alot! That IN-GEAR32 is perfect. The company I work for currently has to include a copy of RSLinx with every machine it sells. That''ll save them a lot.

d e e p s k y . s 5 . c o m



"If builders made buildings the way programmers write
programs, then the first woodpecker to come along would
destroy civilization." -Weinberg''s Law
um no, the dll is not a COM object, AFAIK

Does that in-gear stuff support some sorta data highway, like the rockwell stuff does?


And if you buy the $10,000 super version you get a ''lite'' distribution version that you don''t have to pay royalties for.

If you buy the middle version (like we did) it cost something like ~$3000 a shot.

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement