How to Convert Two Words to a Real Value in Rx3i Without Machine Edition Warnings

Question:

I'm receiving an array of words through a Modbus read operation. Within this array, two specific words represent a real value. Typically, I can concatenate these two words and assign them to a "Real" typed variable to obtain my real data, provided that both the source and destination have addresses. However, I'm encountering difficulties when either the source or destination lacks an address; in such cases, I am unable to perform this concatenation without triggering a datatype mismatch warning in Machine Edition. My goal is to eliminate all warnings, and I ultimately want to execute this process within a Function Block, which is why the absence of addresses is critical. Does anyone have insights on how to convert IntValue[0] and IntValue[1] into RealValue when neither has an address?

Top Replies

In response to my earlier question, I realized I had not explored all possible solutions initially. My effective approach involved using a Move_Bool of 32 directly from InValue[0] into the inputs of a Move_Real to RealValue. This method successfully avoided any warnings in the ME system.

It sounds like you're dealing with a tricky situation! If you're trying to convert the two int values into a real value without addresses, consider using a temporary variable within your Function Block. You can perform the concatenation by using bitwise operations to combine the two integers into a single real value (like handling the byte order appropriately) before assigning it to your Real variable. Just make sure your system can handle the conversion correctly, and double-check your datatype compatibility to avoid those warnings. If you're still stuck, you might want to look into using a custom function that handles this specifically for cases without addresses!

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)

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  →