08-16-2023 10:28 AM - edited 08-16-2023 10:31 AM
@santo_13 wrote:
@mcduff wrote:
@santo_13 wrote:
VISA being intended for Instruments, I believe it would be the manufacturer's responsibility to ensure the termination character is not part of the data or use a term char that is not part of the data.Binary data is sometimes transmitted over VISA, e.g., a data stream from an oscilloscope. Here you can have termination characters mixed in.
In such scenarios, you tend to disable termination and read specific number of bytes given by the header.
Unless you are working with a device such as the HP (Agilent, Keysight) DDMMs that don't really work that way. Those have no STX, Size, preamble in the message structure. Then you tend to rely on the warning or write intermittently functional code.
08-17-2023 09:55 AM
@MaSta wrote:
I think I fell for this again, because it's not the first time. Damn! You don't think of that first.
It's not the VI writing the text, it's the VISA Read VI that truncates the message after having received 0xA.
I didn't configure the VISA session accordingly.
I was about to say that. 0A is usually a Visa terminate character and you mentioned Modbus ... 🙂
08-17-2023 10:09 AM
@JÞB wrote:
@santo_13 wrote:
@mcduff wrote:
@santo_13 wrote:
VISA being intended for Instruments, I believe it would be the manufacturer's responsibility to ensure the termination character is not part of the data or use a term char that is not part of the data.Binary data is sometimes transmitted over VISA, e.g., a data stream from an oscilloscope. Here you can have termination characters mixed in.
In such scenarios, you tend to disable termination and read specific number of bytes given by the header.
Unless you are working with a device such as the HP (Agilent, Keysight) DDMMs that don't really work that way. Those have no STX, Size, preamble in the message structure. Then you tend to rely on the warning or write intermittently functional code.
Good to know, though weird, such devices do exist.
08-17-2023 10:51 AM
Not quite weird, those and similar devices were designed before HPIB was stolen and adopted when IEEE established standard 488.
That physical layer has an 8 bit parallel bus and required handshaking lines.
NI-VISA had to emasculate the capabilities of GPIB in the first few versions until the bus specific properties could be exposed and many device manufacturers let NI set the LabVIEW Driver Standard.
08-23-2023 02:20 AM
@santo_13 wrote:
VISA being intended for Instruments, I believe it would be the manufacturer's responsibility to ensure the termination character is not part of the data or use a term char that is not part of the data.
Uhm, what? Data is data. And what is the definition of an instrument? Can be any device that is able to receive data of any form. The only logic can be "use termination only when explicitly enabled while the default is not enabled". Well, I learn new "weird stuff" almost every time I use LabVIEW and I use for quite a while now.
08-23-2023 02:23 AM
Yes, right. A ModBus message with binary bytes, received by VISA Read via an Ethernet interface. It was terminated at 0xA. Terminated until I switched off a serial setting while using an Ethernet interface...
08-25-2023 10:10 AM - edited 08-25-2023 10:11 AM
@MaSta wrote:
Yes, right. A ModBus message with binary bytes, received by VISA Read via an Ethernet interface. It was terminated at 0xA. Terminated until I switched off a serial setting while using an Ethernet interface...
Makes perfect sense! 😄
(I guess you should see it as using a Serial Protocol over Ethernet)