katratzi
Member
- Join Date
- Mar 2005
- Posts
- 210
First time using Siemens Step 7 (normally an RSLogix 5/500 user) and I have to say it is very different. I received this software only 2 days before a machine is due for delivery (of course!
and the requirements for one particular part of the program are this:
An operator enters two values into the HMI. They are "count value" and "range value". count value is the number of samples to be taken, typically 1-10. range value is the value entered so that when the samples taken are compared to each other, and they all fall within this range, the process is complete. for example, for a temperature measurement that specifies a range of 5 degrees, all of the readings in the sample would have to be within 5 degrees of each other.
Using A-B, I would start by using a timer to increment a counter every 0.5 or 1 second, an then pull the data from the analog I/O register, place it into a file, when the counter was done, I could then proceed to check the data for the range values. S7 seems to have plenty of timers and counters, so I think I am ok there, but I haven't seen many instructions like the CPT (compute) instruction in RSLogix. Is comparing values like this more difficult in S7? If anyone could point me in the right direction on this, I would appreciate it. I am not even sure I know enough math to know how to check these data points against each other and to come up with the right answer as to whether they are in range or not. My first thought would be to average them, and check each against this average, but these numbers repesent readings that are expected to vary quite a bit when the process is first started, then "settle out" as you get closer to being "done". When 10 values (or whatever number is input) all fall within this range, this batch is finished and it is time for the next.
and the requirements for one particular part of the program are this:
An operator enters two values into the HMI. They are "count value" and "range value". count value is the number of samples to be taken, typically 1-10. range value is the value entered so that when the samples taken are compared to each other, and they all fall within this range, the process is complete. for example, for a temperature measurement that specifies a range of 5 degrees, all of the readings in the sample would have to be within 5 degrees of each other.
Using A-B, I would start by using a timer to increment a counter every 0.5 or 1 second, an then pull the data from the analog I/O register, place it into a file, when the counter was done, I could then proceed to check the data for the range values. S7 seems to have plenty of timers and counters, so I think I am ok there, but I haven't seen many instructions like the CPT (compute) instruction in RSLogix. Is comparing values like this more difficult in S7? If anyone could point me in the right direction on this, I would appreciate it. I am not even sure I know enough math to know how to check these data points against each other and to come up with the right answer as to whether they are in range or not. My first thought would be to average them, and check each against this average, but these numbers repesent readings that are expected to vary quite a bit when the process is first started, then "settle out" as you get closer to being "done". When 10 values (or whatever number is input) all fall within this range, this batch is finished and it is time for the next.