hlvas
Member
To anyone that is interested to share his experience,
Hi, I program c++ for years, but in PLC areas I am completely unfamiliar, so please bear with me.
ok now to the task in hand. I have a c++ application that needs to be connected to an OPC client an get some data from a PLC through an OPC server.
what I have in my lab: I have a SIMATIC S7 SDK V5.3 + SP2 + HF1. I also installed the S7 lite, a CP5611 card, MPI cable and a SIEMENS 315 2DP CPU (only the CPU nothing else).
In oder to accomplish the task above I thought to make a test app to test the connectivity of all above items. So I am planning to use the SIMATIC OPC server and the OPC scout that comes with it. I am also planning to write a small program to the 315 that the only thing it does is changing some values, so I can verify that these values are correctly read from the OPC server and client.
What I have done so far: I have successfully connected with the 315 through the S7 lite SDK using MPI. I have also read the excellent document of Jesper M. Pedersen and I have set up the OPC server and the OPC scout from SIMATIC S7.
and now to the questions:
1. Basic PLC programming. How I can set and reset a couple of bytes in the PLC ( as I said I am totally unfamiliar, but willing to learn ). I want to use a counter so that after N seconds change some bytes to lets say 0 and 255 and then repeat.
2. What have to do to pass these values to the OPC server,so that OPC server can read these values regularly
3. What have to do to pass these values to the OPC scout so that these values are also passed to OPC scout.
4. Some general remarks about how connect a c++ app with the OPC scout.
You do not have to answer all of them . Any comments hints references books, will be greatly appreciated.
Thanks
Hi, I program c++ for years, but in PLC areas I am completely unfamiliar, so please bear with me.
ok now to the task in hand. I have a c++ application that needs to be connected to an OPC client an get some data from a PLC through an OPC server.
what I have in my lab: I have a SIMATIC S7 SDK V5.3 + SP2 + HF1. I also installed the S7 lite, a CP5611 card, MPI cable and a SIEMENS 315 2DP CPU (only the CPU nothing else).
In oder to accomplish the task above I thought to make a test app to test the connectivity of all above items. So I am planning to use the SIMATIC OPC server and the OPC scout that comes with it. I am also planning to write a small program to the 315 that the only thing it does is changing some values, so I can verify that these values are correctly read from the OPC server and client.
What I have done so far: I have successfully connected with the 315 through the S7 lite SDK using MPI. I have also read the excellent document of Jesper M. Pedersen and I have set up the OPC server and the OPC scout from SIMATIC S7.
and now to the questions:
1. Basic PLC programming. How I can set and reset a couple of bytes in the PLC ( as I said I am totally unfamiliar, but willing to learn ). I want to use a counter so that after N seconds change some bytes to lets say 0 and 255 and then repeat.
2. What have to do to pass these values to the OPC server,so that OPC server can read these values regularly
3. What have to do to pass these values to the OPC scout so that these values are also passed to OPC scout.
4. Some general remarks about how connect a c++ app with the OPC scout.
You do not have to answer all of them . Any comments hints references books, will be greatly appreciated.
Thanks