Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Serial communication with data acquisition device issue

$
0
0

Hello everyone,

 

I am using a DATAQ DI-145 data acquisition device to obtain values that will correspond to voltage amplitude. I have a working code for such using ActiveX controls, however it is a bit slow and dependent on externally provided software, so I am experimenting with serial communication. I read the (attached) device's protocol, and I installed visa drivers for the instrument to communicate in LV. Reading around, I created this code (attached sniplet), however neither the read nor write options seem to properly work. There is a series of basic commands in the protocol, out of which I also get no response (and occasionally the VISA timeout error). The same happens when I try the VISA test interface in MAX (for some reason i also get more ports than the instruments i have in). 

 

Specifically, I quote from the protocol: '' Responses to this set of commands include echoing the command, followed by a space (0x20),
followed by the response, and ending with a carriage return (0x0d). For example, the command "info 1" generates the following response ''info 1 1450(0x0D)'' . Does this mean I need a carriage return termination character to be enabled on read/write? I fiddled with both timeout (2s,10s) and termination character enable/disable in test panel and not much seems to change when trying to send info\s0 sommands etc.

I'm very new to serial communication so I might be missing something obvious (for example, why are transmit and receive buffers on 0? what does it mean?) or doing something wrong. Would appreciate some guidance.

 

Finally, since I am trying to avoid using the visa property bytes at port, does me setting a bytes to be read control make me miss any of the continuous stream? And is the empty string and feedback node sufficient to distinguish between different measurements?

 

Nafsika


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>