LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA serial read error(s)

I am just getting involved with using LabVIEW to connect serially to the device I am working on.  I think I am running into a problem reading from my device.  I am trying to initalize my PC into the device's internal network.  What I need to do first is send a Discovery message to obtain the current network configuration.  I am running into a problem when I read the buffer after I send that message.  The data I am reading is in the correct message format for my device but they are all internal messages, such as the internal devices talking to themselves and none answering my request.

Here is the error that "VISA Read" is giving me.
Error: -1073807298  VISA: (HEX 0xBFFF003E) Could not perform operation because of I/O error.

I tried inserting a VISA Set I/O Buffer Size block after I configured the port and set the mask to 48, and left the buffer size at 4k.  When I did that I seemed to get the same kind of data but then I would get a framed data error, or something of that sort, I don't have the exact error code and description.  I can get that if that would be helpful.

I am using LabVIEW 7.0 and VISA 3.2
My COM1 port is set up correctly within MAX.

Attached is a NI-SPY Capture. (It wouldn't let me attach a .spy file so I added a .txt, just remove the .txt and the file should be a valid .spy file, that's annoying)

Any insight you can provide would be appreciated.
Thank to all who view and reply, this forum is great, and has helped me around some tough spots. Smiley Happy
LV 8.2.1
WinXP
0 Kudos
Message 1 of 2
(2,833 Views)
Use hyperterminal to see if the com link is OK.  Open Hyperterminal, setup the com port, then send your Discovery message.  Do you then get the correct response?  If so, then you have trouble in Labview.  If not, you have com port trouble.  Possible fixes are to ensure the correct baud rate, stop bits, data bits, parity, etc.  Also, pay attention to the termination character.  If you expect to receive binary data, don't use a termination character.  In Labview, you can wire a False to the initialize function's termination character enable input.  Binary data can happen to look like a term char, and that would upset the serial read.  If you are using a term char, make sure it is the correct one.  There are 0x0A (line feed), and 0x0D (carraige return), or both.  In Labview slash codes (\ codes), they are \l (lower case L) for line feed, \r for return, \n for new line (both line feed and return).
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 2
(2,821 Views)