Pneumatic cilinder diagnostic program with siemens PG
We like to have a program that can communicate with a siemens PLC S5 and/or S7 to ask the state of an output and 2 inputs of the PLC and mesure the amound of time it takes after the change of state of the output and the change of the inputs.
Why: we control with the PLC lots of pneumatic cilinders that do different function in a proces , those cilinders are working many times per hour (say 400 times / hour going in and out) in time those cilinders are slowing down and need to be seviced becouse the whole proces is taking more time to get done.
The pneumatic-cilinders have position-switches connected to the PLC to check if the cilinder is fully forward or fully reverse.
What we are looking for is:
Find (or make) a program that get from a file of targets an “tagnumber” (say cilinder 1 ) with an Output (say A 1.1 ) and two inputs ( say E1.1 and E 1.2)
Ask the PLC for the state of the output (A1.1) until that output is going from 0 to 1 , get the time from the system-time of the PC and store this time in a varable “start-time” and ask the PLC the state of the inputs.
When the input E1.1 is going from 1 to 0 get again the time from the system-time of the PC and store the time in a varable “start-movement”
When the input E1.2 is going from 0 to 1 get again the time from the system-time of the PC and store the time in a varable “end-movement”
Now calculate the difference of “start-movement” and “start-time” in milliseconds (this is the “magnetic-valve-reaction-time”)
And calculate the difference of “end-movement” and “start-time” in milliseconds (this is the “pneumatic-cilinder-stroke-time”
Now write the “tagnumber” , the word “forward”, the value of “magnetic-valve-reaction-time” and the value of “pneumatic-cilinder-stroke-time” to a textfile as “Tab-delimited” values
Ask the PLC for the state of the output (A1.1) until that output is going from 1 to 0 , get the time from the system-time of the PC and store the time in a varable “start-time” and ask the PLC the state of the inputs.
When the input E1.2 is going from 1 to 0 get again the time from the system-time of the PC and store the time in a varable “start-movement”
When the input E1.1 is going from 0 to 1 get again the time from the system-time of the PC and store the time in a varable “end-movement”
Now calculate the difference of “start-movement” and “start-time” in milliseconds (this is the “magnetic-valve-reaction-time”)
And calculate the difference of “end-movement” and “start-time” in milliseconds (this is the “pneumatic-cilinder-stroke-time”
Now write the “tagnumber” , the word “reverse”, the value of “magnetic-valve-reaction-time” and the value of “pneumatic-cilinder-stroke-time” to the textfile as “Tab-delimited” values
Do this say 5 times ( to be changed in a settings value )
After this get the next “tagnumber”, output and inputs from the targets-file and do the whole program again until al the tagnumbers from the target-file are done.
To make the program compleet it should be nice to have a facility to make and edit the “targets”file and visualize the values while running the program and a start / stop button
Note: whe are working with windows-based programming PC’s do the program has to be working on those PC’s
My knowledge of Delphi or other programming language’s is the bare minimum so i can not make such a program myself but hopefully someone else can .
Please contact me at by Email : adje_54@hotmail.com
Thanks anyway Ad Slijkerman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Pneumatic cilinder diagnostic program with siemens PG
We like to have a program that can communicate with a siemens PLC S5 and/or S7 to ask the state of an output and 2 inputs of the PLC and mesure the amound of time it takes after the change of state of the output and the change of the inputs.
Why: we control with the PLC lots of pneumatic cilinders that do different function in a proces , those cilinders are working many times per hour (say 400 times / hour going in and out) in time those cilinders are slowing down and need to be seviced becouse the whole proces is taking more time to get done.
The pneumatic-cilinders have position-switches connected to the PLC to check if the cilinder is fully forward or fully reverse.
What we are looking for is:
Find (or make) a program that get from a file of targets an “tagnumber” (say cilinder 1 ) with an Output (say A 1.1 ) and two inputs ( say E1.1 and E 1.2)
Ask the PLC for the state of the output (A1.1) until that output is going from 0 to 1 , get the time from the system-time of the PC and store this time in a varable “start-time” and ask the PLC the state of the inputs.
When the input E1.1 is going from 1 to 0 get again the time from the system-time of the PC and store the time in a varable “start-movement”
When the input E1.2 is going from 0 to 1 get again the time from the system-time of the PC and store the time in a varable “end-movement”
Now calculate the difference of “start-movement” and “start-time” in milliseconds (this is the “magnetic-valve-reaction-time”)
And calculate the difference of “end-movement” and “start-time” in milliseconds (this is the “pneumatic-cilinder-stroke-time”
Now write the “tagnumber” , the word “forward”, the value of “magnetic-valve-reaction-time” and the value of “pneumatic-cilinder-stroke-time” to a textfile as “Tab-delimited” values
Ask the PLC for the state of the output (A1.1) until that output is going from 1 to 0 , get the time from the system-time of the PC and store the time in a varable “start-time” and ask the PLC the state of the inputs.
When the input E1.2 is going from 1 to 0 get again the time from the system-time of the PC and store the time in a varable “start-movement”
When the input E1.1 is going from 0 to 1 get again the time from the system-time of the PC and store the time in a varable “end-movement”
Now calculate the difference of “start-movement” and “start-time” in milliseconds (this is the “magnetic-valve-reaction-time”)
And calculate the difference of “end-movement” and “start-time” in milliseconds (this is the “pneumatic-cilinder-stroke-time”
Now write the “tagnumber” , the word “reverse”, the value of “magnetic-valve-reaction-time” and the value of “pneumatic-cilinder-stroke-time” to the textfile as “Tab-delimited” values
Do this say 5 times ( to be changed in a settings value )
After this get the next “tagnumber”, output and inputs from the targets-file and do the whole program again until al the tagnumbers from the target-file are done.
To make the program compleet it should be nice to have a facility to make and edit the “targets”file and visualize the values while running the program and a start / stop button
Note: whe are working with windows-based programming PC’s do the program has to be working on those PC’s
My knowledge of Delphi or other programming language’s is the bare minimum so i can not make such a program myself but hopefully someone else can .
Please contact me at by Email : adje_54@hotmail.com
Thanks anyway Ad Slijkerman