Converting Modscan Unsigned Decimal Value to Celsius Temperature

Question:

I have a Type C to RS485 adapter connected to my Siemens RWF55 controller. I am using modscan to retrieve a value from the Siemens controller, which has a thermocouple connected displaying a temperature of 37 degrees Celsius on the screen. When scanning with modscan at address 40002, the value appeared as 16916 (unsigned decimal in Modscan). How can I convert this unsigned decimal back to 37 degrees Celsius?

Top Replies

The 16-bit register value of 16916 holds the high 16 bits of a 32-bit IEEE-754 single-precision floating-point value of 37.0. To obtain the complete value, you must also access the Holding Register at the subsequent address "40003" and then combine the bits from these two Holding Registers into a REAL tag. The process for achieving this will vary depending on the device reading the Holding Registers and the specific programming environment and capabilities. For example, it is possible that Modscan, a PC software, could offer an option to interpret adjacent Modbus registers as bits of 32-bit floating-point values. The floating point value may range between 37.0 and 37.25, depending on the bits in the second 16-bit register. It is important to double-check that the single floating-point value consists of the register pair "40002" and "40003" (Most-Significant Word-First), as it could also potentially be "40001" and "40002" (Least-Significant Word-First).

Is it possible to use Modscan to access register "4"0000? If so, retrieve the first 8 registers beginning at "4"0000 or "4"0001, and share a screenshot. Does Modscan provide visibility into the Tx and Rx buffers used for RS-485 transmission? If so, include this information in the screenshot. If Modscan can only read register "4"0001, and you need to access RWF55 Analog Input InP2, you will need to read Holding Registers "4"0003 and "4"0004 (or "4"0001 and "4"0002 for Analog Input InP1). See more details here.

The User level table extracted from an RWF55 manual displays analog input 2 at address 0x0002 as a floating point value. While the manual does not explicitly state it, let's assume these are Holding Register addresses due to receiving a valid reply in Modscan when querying address (4)0002. This floating point value is a 32-bit value that utilizes two 16-bit Modbus registers for storage. To accurately interpret the value in Modscan, you must use the appropriate function that recognizes it as a floating point value. Attempting to obtain a valid integer value from a single 16-bit register of a 32-bit floating point is not feasible; all 32 bits are necessary to comprehend the value fully. Furthermore, it is essential to read the correct register and the correct number of registers. Keep in mind that the hex registers are zero-based, while Modscan is one-based, using a (4)xxxx notation in the Modscan's "Address" field. For instance, 0x0000 corresponds to (4)00001 which represents analog input 1, while 0x0001 corresponds to (4)00002 representing the second 16 bits of AI 1's floating point value. To read analog input 2 as a floating point value in Modscan, follow these steps: - Configure your Device ID - Select 03 Holding Register as the Modbus point type - Set the Address as 00003 and Length 2 (to read two registers, starting at (4)00003) - Choose one of the two Floating point buttons By following these guidelines, you will be able to correctly interpret and read the floating point value in Modscan. If the value displayed seems unreasonable, try adjusting your selection of the Floating point button to ensure accuracy.

In determining the correct FP button, the value plays a crucial role. If the value is reasonable, then you have selected the right FP button. However, if the value seems ridiculous, try the other button. This aspect sets it apart. With only 24 possible byte order variations in a 32-bit float, most are typically eliminated due to the similarity in byte order and word order in INTs and REALs on the device, leaving only 4 possibilities. If the device effectively implements Modbus, byte order within words is managed correctly, narrowing it down to just two potential outcomes.

The value you're getting (16916) is likely the raw data coming from the thermocouple, which needs to be scaled. You generally need to know the scaling factor before you can convert this raw value back into Celsius. The specific factor can vary from device to device; however, it should be available in your Siemens Controller's documentation or user manual. It may also be helpful to contact the Siemens support team if you can't find this information.

It sounds like you're dealing with a conversion issue from an encoded representation to temperature. Given your Siemens controller and its nature to represent data in 16-bit format, the value you're seeing (16916) is likely this raw 16-bit encoded data. To convert this encoded integer back to a temperature reading in Celsius, you will likely need some sort of conversion factor or algorithm, which should be specified in your controller's user manual or technical documentation. In many circumstances, the use of a simple linear conversion (such as raw_value / 10 - 40, or similar) is common. However, without knowing the specifics of your device it's hard to give an exact formula.

To convert the value from Modscan back to Celsius, you first need to understand how the value is represented. Typically, temperatures from thermocouples may require scaling. In your case, the value 16916 could relate to the temperature in tenths of degrees (or a similar scale) based on how the Siemens controller outputs data. If you divide 16916 by 1000, you’ll get approximately 16.916, which doesn't match up, so check if there's a conversion factor specific to your setup. Another common approach is to subtract any offset or find scaling parameters in the device's manual, if that's available. It's important to cross-reference with the documentation for the Siemens controller to see if the encoding or scaling has been defined there!

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

FAQ: 1. How can I convert an unsigned decimal value obtained from Modscan back to Celsius temperature readings?

Answer: Answer: To convert the unsigned decimal value back to Celsius temperature readings, you will need to apply the appropriate conversion formula based on the specific characteristics of the sensor or device being monitored.

FAQ: 2. What factors do I need to consider when converting Modscan unsigned decimal values to Celsius temperature?

Answer: Answer: Factors to consider when converting Modscan unsigned decimal values to Celsius temperature include the sensor type, calibration settings, and any offset or scaling factors that may be applied in the data acquisition process.

FAQ: 3. Can you provide an example calculation for converting an unsigned decimal value from Modscan to Celsius temperature?

Answer: Answer: Sure, one approach is to use the formula: Temperature (Celsius) = (Unsigned Decimal Value - Offset) / Scale Factor, where the scale factor and offset values are determined by the specific characteristics of the sensor or device being used.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  →