Codesys Revpi connect analog Output
Posted: 06 Oct 2021, 09:51
Hello everyone,
I am new to codesys and facing one issue regarding the analog input and output. I want to measure the voltage of the battery through analog module. I have used channel one of AIO module with voltage measurement connections. My question is that how to measure the voltage? I have selected measuring range from 0-10V through codesys interface of AIO. I have selected the address of that channel i.e %IW36 and according to my understanding it shoud give me the raw values of ADC and the formula should be (10/65536)*raw values. Is it correct? ADC is of 16 bits I guess? Is there something I am missing because It gives zero all the time. Any leads to solve this problem would be helpfull that how to analog read function through codesys ??
I am new to codesys and facing one issue regarding the analog input and output. I want to measure the voltage of the battery through analog module. I have used channel one of AIO module with voltage measurement connections. My question is that how to measure the voltage? I have selected measuring range from 0-10V through codesys interface of AIO. I have selected the address of that channel i.e %IW36 and according to my understanding it shoud give me the raw values of ADC and the formula should be (10/65536)*raw values. Is it correct? ADC is of 16 bits I guess? Is there something I am missing because It gives zero all the time. Any leads to solve this problem would be helpfull that how to analog read function through codesys ??