Jump to content

Talking to a PLC


Avalanche

Recommended Posts

I am new to the PLC world but an old hat at DAQ and LV. I now need to connect a PC with a Siemens S7-200 PLC in order to do data logging, friendly interface, and a small amount of writing to the PLC. I don't know where to start. The PLC has an RS485 on it and we have the RS232-RS485 PPI cable from Siemens. What else do I need to do this? Are there Drivers? I would like to treat the PLC as a DAQ device and read the line states.

Link to comment

Hi Avalanche:

I had good luck with a project where the data was published to an OPC server by the PLC, all I had to do was subscribe to the data with the controls of my input vi, otherwise pretty straightforward LV programming to do what needed to be done with the data.

If your sample rate requirements are not too high, and if the PLC can publish to an OPC server, this might be the most straightforward way to go. (Although I've done PLC work in the past, I didn't know how to program the PLC I was listening to. Didn't have to, just asked the PLC folks to publish the values I needed to the server give me the datasocket URLs.)

Very neat and tidy, no need for the Labview programmer to fuss with the mysteries of how the PLC worked or vice-versa. If you've got high bandwidth requirements, might be another issue, I don't know, I was doing some fairly pokey temperature measurments on that gig.

Hope this helps. I'm sure others will be able to chime in with some ideas if for some reason you need to communicate more directly with the PLC.

Best Regards, Louis

Link to comment
I was hoping to avoid using an OPC. Find some drivers somewhere but....

You may want to take a look at the "S7-200 Programmable Controller System Manual"'s (6ES7298-8FA24-8BH0) chapter on using Modbus communication. If you can't find the manual on Siemens' site, there's a 2004 copy at mrplc.com.

As described in it, Siemens has an the add-on ($$) library that includes code for enabling Modbus on S7-200 CPUs. I've never used it, but if my impression is correct it will allow you to use the S7-200's serial port a Modbus slave.

If true that would enable the use of one of the more readily available Modbus drivers that have been written in LabVIEW.

Good luck with whatever route you take.

Link to comment
I was hoping to avoid using an OPC. Find some drivers somewhere but....

Hi,

I'm using product called Prodave MPI ($$). This is an API from Siemens. It is a DLL with functions to read/write flags, data blocks, timers, inputs and outputs. Thera are two versions - full and mini. With mini version, only data block can be read or written.

I can send you the VIs, so you don't have to study the DLL interface. They are only wrappers around DLL calls.

Link to comment
  • 2 years later...

QUOTE (rbogomir @ Dec 1 2005, 12:25 PM)

Hi,

I'm using product called Prodave MPI ($). This is an API from Siemens. It is a DLL with functions to read/write flags, data blocks, timers, inputs and outputs. Thera are two versions - full and mini. With mini version, only data block can be read or written.

I can send you the VIs, so you don't have to study the DLL interface. They are only wrappers around DLL calls.

Please send me the example VIs to communicate with S7-200

At the earliest

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.