Hello All, I am running into an issue which I seem to be overlooking something simple I believe. I have the IR-AI04-TR with T type thermocouples connected. The thermocouple itself has a temperature range of -325 to 700 degrees, which I have set in the scaling of the card via EasyRemote IO. When using in real life, this sensor measures ambient temperature (70 degrees) then is subjected to a liquid nitrogen bath (-191 degrees).
In CodeSys, everything seems to be working when the temperature value is greater than 0 degrees. Once the sensor goes into the negative values, it rolls around to 65525 and starts coming down. I would have anticipated that because of the scaling in the EasyRemote IO that it would have gone into the negative values.
Is there a different range or setting I should be using?
Using CodeSys 126.96.36.199
I believe that this issue is related to the data type used to display the input value within Codesys. If you are using either “WORD” or “UINT” the supported range is 0 - 65535. To display negative numbers you will need to display this variable as an “INT”:
@TimWusa If the scale range parameters are not applicable for thermocouple inputs, is there a default range that is card uses for thermocouples then? Low Limit and High Limits to program a scale against per say.
Would I need to change these values back to the default or can I leave them as is?
There is a temperature range when you select one of the thermocouple type sensors from the “Input Mode”.
If you select “T” from the “Input Mode”, there is a temperature range which is not configurable by users.
I think that selecting the “User Defined” from the the “Input Mode” could be compatible with your T temperature sensor’s full range, if you need a wider temperature range. The information about “User Defined” is documented in the iR-AI04-TR User Manual. See chapter 10 “Downloading User-Defined Temperature Table to a Module”.
Regarding your issue, please look at the answer given by @Brendon.S. To display negative numbers you will need to display this variable as an “INT” within a POU, because in the Modbus mapping menu those four temperature inputs are mapped to an array of “WORD”.
I will look at those settings and confirm. I am trying to regain access to the machine via EasyAccess 2.0 to try the settings by @Brendon.S described. That is what made me wonder what I should expect to see after changing the type from Word to INT, if there was an additional scaling I would need to do or if the values for both Ambient, Low Range, and anything in between would automatically fall inline.