clueless_plc
Member
Hello, I have a small programming task that I need help solving.
I have to:
* Create an analog input (4-20v)and a digital output
* The analog input must be scaled to 1 to 1000 in the code.
* If the rounded, scaled value is a prime number, the digital output should be set to TRUE for 5 seconds, regardless of what the analog value changes to during these 5 seconds.
I would like to use twincat or rslogix to solve this.
I could really use some help going about this or some sources to help me get going. Thank you in advance.
I have to:
* Create an analog input (4-20v)and a digital output
* The analog input must be scaled to 1 to 1000 in the code.
* If the rounded, scaled value is a prime number, the digital output should be set to TRUE for 5 seconds, regardless of what the analog value changes to during these 5 seconds.
I would like to use twincat or rslogix to solve this.
I could really use some help going about this or some sources to help me get going. Thank you in advance.
Last edited: