LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa bytes at serial port

In modbus comm i am sending request for holding regesters as

01 10 0001 0002 04 000A 0102 C6F0

 

so at bytes at port i am getting 13 bytes

 

Output response should be 11 01 0001 0002 1298 This is 8bytes

 

but in ni examples to visa read byte count,  bytes at serial port(13) output is sending as input for visa read. we should

give actually 8 .

 

so which is correct to give from bytes at serial port property or giving directly 8 to visa read byte  count.

0 Kudos
Message 1 of 3
(3,896 Views)

It depends on what you are doing. If you know how many bytes to read, then you can wire an explicit number. If you don't know how many bytes are going to be there, then you use the byte count property to read however many bytes are there. This is typically done in a loop when receiving long messages, and you read until you see a specific character (or series of characters, such as the text "END") to indicate the end of the message.

 

P.S. Do you really want to use your phone number as your username?

0 Kudos
Message 2 of 3
(3,884 Views)

thank you . i changed my profile name as well

0 Kudos
Message 3 of 3
(3,871 Views)