James Mcquade
Member
Hi all,
i was trying to learn the analog card and got pulled off.
now i am asking for your help again.
this is what i have.
all i/o are enabled and set for 0 - 10 volts
all i/o conversion numbers are 0 and 4096
all i/o voltage settings are 0 - 5 volts.
analog 3 input is connected and i can see the data changing in the data viewer screen. the input is connected to an ultrasonic sensor.
at 13" i get an input of 0.067 volts and d102 reads 25
at 6 1/2" i get an input voltage of 9.52 volts and d102 reads 3830.
what i want to do is scale the output to read 0 to 6"
i copied a function block with parameters from another program, but could not figure out how to put in the data numbers.
i also want to scale the data with another instance of the function block that will output 0 - 21 cm for example.
i have looked at youtube videos and i must admit that this is one item that is getting the best of me. omron digital i/o programming is no issue, but the analog,rtd, and thermocouple logic is getting the best of me.
if someone would look at my code and help, i would be ever grateful. any comments and explainations would be appreciated.
thanks in advance.
james
i was trying to learn the analog card and got pulled off.
now i am asking for your help again.
this is what i have.
all i/o are enabled and set for 0 - 10 volts
all i/o conversion numbers are 0 and 4096
all i/o voltage settings are 0 - 5 volts.
analog 3 input is connected and i can see the data changing in the data viewer screen. the input is connected to an ultrasonic sensor.
at 13" i get an input of 0.067 volts and d102 reads 25
at 6 1/2" i get an input voltage of 9.52 volts and d102 reads 3830.
what i want to do is scale the output to read 0 to 6"
i copied a function block with parameters from another program, but could not figure out how to put in the data numbers.
i also want to scale the data with another instance of the function block that will output 0 - 21 cm for example.
i have looked at youtube videos and i must admit that this is one item that is getting the best of me. omron digital i/o programming is no issue, but the analog,rtd, and thermocouple logic is getting the best of me.
if someone would look at my code and help, i would be ever grateful. any comments and explainations would be appreciated.
thanks in advance.
james