AC800M Program to Merge 16bit two Integer to DINT
RTU560 to AC800M Communication, RTU is sending data in 32Bit format over ModbusTCP.
RTU format is as below
First Register : 16 Bit Data
Second Register : 16 Bit Data
AC800M side we need to concatenate both of the 16Bit data to one 32 DINT register
First INT 0.1.2.3.4.....16 Merge Second INT 0.1.2.....16
Answer this question Follow
Setpoint..._int = INT
Setpoint..._Comm = REAL
We looking to convert the two INT variable to DINT ( two 16 bit to make 32 Bit data)
We are not looking for IEEE float conversion logic.
> "We looking to convert the two INT variable to DINT ( two 16 bit to make 32 Bit data)"
The basic principle is ..... (Word1 * 16#FF )+ Word2
Be careful in your type conversions. if you simply try to multiply an "int" type then you'll get an overflow.
You can also ROL (Rotate Left) Word1 16 times, then Bitwise AND with Word2. but MUL is more efficient.
Other questions needing answers
Application Knowledge Store (AKS) will no longer be available after the 31 July 2021.
We are enhancing our Customer and Partner experience and will be migrating data from AKS to the new portal.
During the transition please direct your questions to:
If you are an ABB customer with a CARE Agreement you can access our Customer Portal, where you can find solutions and ask questions, and communicate directly with ABB.
If you are not an existing CARE customer with ABB please contact your local ABB sales office.
For our authorised Partners you can directly access additional support information in the Partner Portal