maslick
Member
Hello guys!
I'm new to STEP7, so could you, please, help me with the following problem I face:
I need to write values from a current sensor into a data block (DB3) once an OB1 cycle. The process (high-current pulse) is very fast (45 ms) so i need to quickly get as much values as possible and write them to an array of REAL.
What I have come up with so far is that I got the current value and it's updated every scan cycle and stored in DB2. So I need to pick up this value and store in DB3 as an array item.
The problem is that I need to increment the array index and write the number (from DB2) to the next array item. I have no idea of how to do this. And basically, don't know how to work with arrays with a variable array index.
Could you please help me?
--
Pavel Maslov
R&D Institute for Electro-Physical Apparatus
St. Petersburg, Russia
I'm new to STEP7, so could you, please, help me with the following problem I face:
I need to write values from a current sensor into a data block (DB3) once an OB1 cycle. The process (high-current pulse) is very fast (45 ms) so i need to quickly get as much values as possible and write them to an array of REAL.
What I have come up with so far is that I got the current value and it's updated every scan cycle and stored in DB2. So I need to pick up this value and store in DB3 as an array item.
The problem is that I need to increment the array index and write the number (from DB2) to the next array item. I have no idea of how to do this. And basically, don't know how to work with arrays with a variable array index.
Could you please help me?
--
Pavel Maslov
R&D Institute for Electro-Physical Apparatus
St. Petersburg, Russia