How to set input scaling on an iR-AI04-VI using -20mA ~ +20mA

How to set input scaling on an iR-AI04-VI using -20mA ~ +20mA
none 0.0 0

I have a with CMT3162 with IRETN and an AI04-VI input card. I want to use the -20mA to +20mA option. In EasyRemote IO the scaling goes from 32000 to -32000 Integer. When I export the XML file and import it into Codesys the 32000 is correct but it replaces the -32000 with a different positive number. It seems that Codesys requires an Unsigned Integer and won’t accept the -32000. I can change the scaling in EasyRemote IO and the Codesys program works but every time the HMI is rebooted it sends the incorrect positive number to back to the AI04 card and it throws off my input scaling. How do I used the -20mA to +20mA?

Hi @leadfoote,

Thank you for your question.

Could you please share a few screenshots of your project setup (EasyRemoteIO and CODESYS), especially the scaling/range settings? That will help us get a better look at how it’s configured.

Thank you.

The XML file that EasyRemote created has different values for the upper and lower limits than what should have been configured. I imported that file into codesys, it will not accept -32000 due to it being out of range for a UINT. I would be ok using a range of 0-20mA. I just need the Codesys program and IO module to be able to read a value below below 4mA.

Hi @leadfoote,

With the current value of 32,000 to 32,000 what value in mA are the device reading and what do you expect the scaled values to show vs. what is being currently generated?

Furthermore, the positive value shown in the CODESYS is the result of converting the signed value of -32000 to a unsigned value in CODESYS. However, when the unsigned value (33536) is written back to the iR-ETN by CODESYS the scaling value will remain at -32000 because the binary data of these two values is the same.