From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-23-2012 06:24 PM
Thanks very much for your help guys, Carl is away at the moment but we'll try these out over the next few days and update you on how we get on next week.
08-23-2012 06:28 PM
I find talking to modbus easy but decoding the registers can be tricky, lots of bit minipulation.
08-23-2012 09:27 PM
Thanks Dennis. I figured there was a better way to do it. The LabVIEW help for Floating-Point numbers says it all.
09-04-2012 05:44 PM
Hi,
Thanks for the advice above. I thought that I had it all figured out, however, it seems that is not the case.
How do I separate the two register values to feed them into the above blocks to convert them into a float value? Or is there a way that i can define which register index goes to each input of the conversion to a float blocks?
I have a register with the two values in. I can't figure out how to do any of the following so that I can feed the two separate register values into the blocks to convert them into a float value.
I tried to:
a) parse the register
b) put the register into an array for parsing
c) use two registers, one for the Hi and one for the Lo value, which could then be feed into the blocks for conversion to a float. I have tried to do this below, but as soon as I try to create two registers the code does not work.
As you can see I'm still learning labview. Any help would be appreciated.
09-04-2012 07:58 PM
Please Ignore the above post, I realized my own stupidity during a break. I have got it all sorted out.
Attached is a method of reading 2 channels from a controller using modbus. The channel settings and modbus parameters will need to be changed depending on application.
I hope that this helps others out. Thank you to those who helped me out.