LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"VISA Flush I/O Buffer" initialize modbus RTU serial, mask 192 mask xC0

a mask for "VISA Flush I/O Buffer"
that is not documented in the help:

In nimodbus.zip:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F1582737BACF5CA8E0340003BA7CCD71

I found a "MB serial init.vi" and in this VI they use
a mask input parameter for the "VISA Flush I/O Buffer" that is not explained in the help.
It is "192" (decimal) or "C0" (hexadecimal). Has someone an idea?

Regards, Stefan
0 Kudos
Message 1 of 2
(3,293 Views)
Sorry,

I'm a beginner, I found the answer myself:
In the help there is written:
"mask designates the buffer to flush. Combine the buffer masks by bit to flush more than one buffer simultaneously. Use logical OR, also known as OR-ing or adding, to combine the values."

mask 64 or 0x40(hex)
Flushes and discards contents of the receive buffer.

mask 128 or 0x80(hex)
No I/O to the device.

So, if you want to combine both just add the values:

128 + 64 = 192
or
0x40(hex) + 0x40(hex) = 0xC0

Regards, Stefan
Message 2 of 2
(3,290 Views)