ModBus to string table?


I am currently using Modbus with an ABB drive (with a modified version of the Opto Modbus Master kit), but I am running into problems pulling data into the table [U]ntMB_Holding_Register_4X_intM1[/U] due to the fact that some variables are floating and some are integers. Is there a way to pull the data into a String table?



Hi Nick,

I’ve not looked at the toolkit in a while, but I suspect you’d be better off either:

  1. pulling the data into a int table then pulling it again into a float table


  1. converting your int data using the command [B]Move 32 Bits[/B] (in the “Logical” group of commands) which will: “move the internal bit pattern of an integer 32 into a float, or to move a float into an integer 32.”

Make sense? There are actually many ways of converting data from one form to another. In the debugger, you can view your data in “hex” to help sort it out. Feel free to share those hex bytes you see vs. what you want/expect to see if you need more help here… I’ve actually been working on some “converting data types” content and would love any real-world examples you’d like to share!




What did you end up doing? I’m doing the same thing using an ABB ACS850 with a FENA-11 module, but instead of using the integration kit, I’m just building and parsing the communication strings straight from/to variables. Among other things, it lets the code run much faster, since the kit is very generalized and rebuilds the command string each time, while a dedicated chart allows it to be programmed once and left alone (if that is all you need to do).


Here is what I am using as far as the Modbus master chart. (3.87 KB)

I ended up setting up the individual variables I wanted to use.