Today is...
Friday, September 20, 2019
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
EtherCAT with CTC’s master lets your multivendor network play well together...
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Programming SLC 500
Need help with program to send analog input data via RS232 port

I would like to make a new program, which have analog input. So analog input data how to send computer by SLC RS232 port.

Please help me as instruction.

By Steve Myres on 30 December, 2018 - 2:55 pm

The protocol natively supported by SLC's (and other AB processors) over RS232 is called DF1. It's extensive and very well documented. You can find the protocol guide as a PDF online, and writing a driver for it isn't too hard, I've done it myself. Or SLC's will support a user-defined protocol, so you could roll your own if you can do the PLC programming to support it on that end.

Or, you can just buy an off the shelf OPC server that will run on your PC, do the comms with the SLC, and make the data available to your program. Not sure if you can get the SLC to stream values, but the PC polling the PLC is the more normal way to do this.

Another thought -- if you're pretty sure your needs in terms of registers and so on won't change soon, you could have someone precalculate the DF1 request frame to get the data you need, and just repeatedly issue that. (I think you'd have to increment the request ID byte, and therefore probably the CRC, but that's not too bad). You might even be able to get around that. Have two precalced frames with different ID's and appropriate CRCs and use them alternately. I don't think the SLC will mind if you reuse an ID, so long as it doesn't duplicate the previous one.

Some analog-to-digital converter is needed for an analog field device to talk to a serial port.

The SLC Programming will depend on the digital protocol that the converter uses. Modbus is a typical field device protocol. When the SLC500 was an active (not obsolete product), there was no 'native' support for Modbus. Modbus in a SLC typically used a (not inexpensive) 3rd party Modbus module.

There are probably converter modules that serially broadcast digital values at a fixed rate.

Given the effort to write your own driver code to support a serial protocol, you might consider the alternative - a PLC analog input module. It'll be far less effort to get a valid process value into the PLC with an analog input module.

By Steve Myres on 30 December, 2018 - 7:30 pm

I took him to mean that he already has analog data in a SLC, presumably from an analog module, and wants to access it from a PC program he's creating.

And I took it the other way. Who knows? Maybe there'll be a reply that clarifies.

By Jeremy Pollard on 31 December, 2018 - 10:02 am

Could he be asking about using ASC instructions to send a value to a serial
port on a PC?
The original author needs to be more specific for sure..

Cheers from: Jeremy Pollard, CET The Caring Canuckian!
Crisis, necessity, change

Integrator, Educator, Consulting, Columnist - Control Design