Check the SX/B help document. Under "Commands" find "ANALOGIN".
The docs have a circuit diagram, code and a thorough description of whats going on. I think it may tell you all you need to know about measuring voltage.
As for current... never needed that so no sure off top the head - but maybe thats just a simple formula? V = IR ? Assuming you have a constant resistance.
Bean (Hitt Consulting) said...
What do you mean by "detect" ? Do you just want to see if voltage is there ? Or do you actually want to measure the voltage ?
Bean.
yes, i want to measure voltage and current. when the voltage/current go to certain level, i want the controller to react. but i am not really sure whether the connection i did is correct. thx for helping.
Comments
The docs have a circuit diagram, code and a thorough description of whats going on. I think it may tell you all you need to know about measuring voltage.
As for current... never needed that so no sure off top the head - but maybe thats just a simple formula? V = IR ? Assuming you have a constant resistance.
Good luck.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
yes, i want to measure voltage and current. when the voltage/current go to certain level, i want the controller to react. but i am not really sure whether the connection i did is correct. thx for helping.