LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument I/O Assistant

Hello,

 

I have created a vi which uses the I/O assistant. I am having a problem in that when I create a runtime build from the vi which I have written (attached) I find that the data it extracts from the com port using I/O assistant is truncated. This only happens for the built vi. I install the built vi on a different computer but almost identical in setup.

 

The problem I have is that the data is truncated so it is not shown correctly. Ie 500E-3 will be read a 500. This seems to be a problem with long data about 7 or 8 characters long which is truncated incorrectly. It seems to be a problem with character count shown below. But I thought this command was not set and varies for each data point read not matter its length. It does say 'to end of data' so I must presume it reads to the end of the data. I nave tried Hyperterminal and it seems to acquire the full data point with E numbers so it seems to be a parsing problem. All I do after data acquisition is remove the first five characters leaving the reading. Any ideas.

 

Capture.JPG

0 Kudos
Message 1 of 3
(2,505 Views)

Put an indicator on the string wire that comes out of the I/O assistant.  That will at least tell you whether you are getting all the data in  your read.

Put an indicator ont he wire coming out of the string subset function to make sure you are getting the portion of the data you want.

 

Which I/O assistant are you working with?  Are you sure you are using the one you think you are?  It seems like overkill to have 3 of those in different cases.  If you were using lower level VISA functions, you could put your serial write and read in the loop and just have the case structure select between different string constants to write.  One problem with the I/O assistant is that it opens and closes the com port every time it is called.  It is possible you are getting some amount of data in during the time the com port is actually closed.

 

The default data in your I/O assistant doesn't make sense.  When I open up the 2nd one, it has .02e-3 in it which is a weird way to express a scientific notation number.  But it still seems to go through the string to fractional number okay and show up as 2e-5.  However in your message, you are talking about a 500e-3 number in your example.

Message Edited by Ravens Fan on 09-03-2009 12:13 PM
0 Kudos
Message 2 of 3
(2,484 Views)

Hi All,

 

This is a duplicate of the post listed here.

 

Many thanks,

Andrew McLennan
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,467 Views)