07-14-2021 06:54 PM
Hi, I’m new to Labview and spent the last week getting up to speed with Labview 2020 64bit Community. This is after a false start using Labview NXG and learning that its not going to be supported. It’s a shame because for a new user the NXG was much easier to learn, but it didn’t have the range of libraries I required.
I’m primarily using Labview for 3rd party instrument control for test and measurement of my home projects. This is through a variety of serial VISA and serial Modbus RTU control. But I have a problem with one of the Modbus devices (Kunkin KP184 Electronic Load) which uses uncommon single 32bit holding registers.
With standard Modbus if you need to write 32 bits (4bytes) to a register you would do two single 16 bit (2bytes )writes. But this device uses what is known as Enron Modbus which uses single 32bit (4byte) registers.
The following is an example from www.simplymodbus.ca which shows the required format.
Enron Modbus
Set Single Numeric (FC=06)
Request
This command is writing the contents of analog output holding register # 7001
to the slave device with address 17.
11 06 1B59 44FA0000 CDEC
11: The Slave Address (11 hex = address17 )
06: The Function Code (Preset Single Register)
1B59: The Data Address of the register. (1B59 hex = 7001)
44FA0000: The value to write
CDEC: The CRC (cyclic redundancy check) for error checking.
Is there any simple way I can use the standard Labview Modbus libraries/functions to output a 32bit single register as shown above or am I better to spend my time sending the correct commands directly via a standard serial write and read function and deal with the formatting and decoding done outside of any Modbus function.
Cheers,
Andrew
07-15-2021 02:30 AM
Hello Andrew,
the modbus APIs that are available will not be able to handle this "special version" out of the box.
Personally I would take one the free APIs (like the old NI library https://download.ni.com/pub/gdc/epd/nimodbus121.zip or the Plasmionique Modbus Master), make a copy of that and then adapt it to Enron Modbus.
Regards,
Jens
07-15-2021 02:56 PM
Thanks Jens, I will try this and post my results.
Cheers,
Andrew
08-28-2023 01:07 PM
Hi Andrew,
did you manage to comunicate with the Kunkin as described? Am aiming to do the same but honestly have no clue and would be thankfull for every advice. Thank you in advance!
Cheers
Roman
08-29-2023 06:19 AM
He forgot to post the result, two years ago.