01-31-2016 06:40 AM
Hello,
I created a project in which I have inserted a Modbus serial I / O server to control a analyzer.
I need to create a bound variable to write the Holding register 226 0xDEAD word (16 bits) , the function of writing in this register the word it is to produce a reset in the analyzer.
When I declare the bound variable as Uint16 the VI generates the following frame :
1B 10 00 E2 00 01 DE AD 20 BE
In the frame we can see that is not the byte count after the register to write (0001) , so the analyzer is not reset.
When I declare the bound variable as Uint32 the VI generates the following frame :
1B 10 00 E2 00 02 04 DE AD 00 00 A2 EF
in the frame we can see that the byte count is generated ( in red ) and the analyzer has been reset , but I had to write two registers instead of one .
Why when declare uint32 Byte count is generated and when declared Uint16 the byte count is not generated ?
Thanks in advance and sorry for my english..... i only speak a bit.
01-31-2016 09:49 AM
01-31-2016 12:23 PM
Hello Mike and thanks for your interest.
The code is in the image, the programa.vi ( top right), shows you how is the program, in the picture you can see on the left the Modbus serial I/O server , in the top right the programa.vi with constant " Valor de reset" ( 0xDEAD-->57005) connected to the Bound variable Uint32 " D400227 " . In the case of the image the frame is generated by the I / O serial Modbus with the Byte count , but if change the Bound variable " D400227 " to Uint16 (which is what I need) , the I / O serial Modbus server generates the frame without the Byte Count.
Best regards.