LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument I/O Assistant

Sorry, this question should appear in LABVIEW! 

 

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 

Message Edited by nevica on 09-02-2009 11:21 AM
0 Kudos
Message 1 of 14
(4,768 Views)

Hello Nevica,

 

I want to try to replicate the problem, to help try and solve it. Can you tell me what hardware you're using and also there was one subVI thats included in your VI but wasn't attached in your post. Can you send the VI called Precise Timestamp.vi please.

 

What version of LabVIEW are you using?

 

Regards

Message Edited by Rico P on 09-03-2009 02:27 PM
Rico P
Smiley Very Happy
0 Kudos
Message 2 of 14
(4,746 Views)

Hello,

 

The instrumentation I am using is an MKS Type 670B High Accuracy Signal Conditioner. This unit can select one of three presssure gauges (ie @0000, @0001 and @0002). The pressure gauges are MKS Type 628B pressure transducers.

 

The problem I have is with @0002 (the 1 Torr pressure gauge) which does not read the E numbers of the pressure measurement so a truncation for 620E-3 will be recorded as 620 which is incorrect. I have no idea why this is happening. ALTHOUGH the following vi attached works and Hyperteminal in XP is able to acquire correct values.

 

The problem seems to be embedded within the interplay of the inner case structure and Instrument I/O Assistant. I have no idea what the problerm is.

 

Nevica

 

 

Download All
0 Kudos
Message 3 of 14
(4,743 Views)

Hello,

 

The hardware may send the value's units in mili, so if the value is 500e-3 it may just send 500. If this is the case then you will simply need to append the e-3 to the end of the string.

 

The other situation that it could be is that the hardware may send the data as a numberic value not a string, in which case you would need to change the type field in the query and parse tab in the instrument i/o VI to receive a numeric value.

 

Hope this helps

 

Regards

Rico P
Smiley Very Happy
0 Kudos
Message 4 of 14
(4,736 Views)

Hello,

 

The instrument sends the exact value with E number. It is read as a string then is converted to a number as can be seen in my code. The problem only occurs for @0002 (as selected within the innermost case structure). For the @0000 and the @0001 transducers the presure is read correctly, ie the E numbers are not truncated.

 

The vi works OK but the problem is when I build the vi to put onto another computer (this computer is set up in exactly the same way with the same com ports, and same type of pressure sensors, multiplexor etc).

 

So the problem I am having is with the build.  The vi I have attached works when I build it and put it on this same computer, BARA3.vi but the build of BARA_FINAL.vi does not work for @0002 as the E numbers are truncated!!

 

Nevica

Download All
0 Kudos
Message 5 of 14
(4,733 Views)

The problem occurs when I select the 1 Torr pressure gauge initially or I have cycled through to the 1 Torr Pressure Gauge after first selecting other pressure gauges. So this means that there doesn't seem to be a problem with the case structures and the logic of the vi but it is an actual truncation error. I suspect that I/O does not read enough characters.

 

Ie.

 

@020 600.47E-3

 

is truncated to

 

600.47

 

which is incorrect.

 

 

This leads me to think that the problem is in the Character Count (to end of data) below:

 

 

Does this not change length with each data point? I am thinking that the build may have altered this in someway? Nevica

 

Capture.JPG

0 Kudos
Message 6 of 14
(4,729 Views)

Hi,

 

I just want to confirm a few things from your posts.

-it works fine when you run it when developing it in LabVIEW

-it works fine when it's been built on your computer

-the built version doesn't work on another computer

 

So it's only the built version running on another computer that does the truncating?

 

Regards

Rico P
Smiley Very Happy
0 Kudos
Message 7 of 14
(4,725 Views)

Hi Rico,

 

No, I build the vi on a computer with LabView 7.0 which runs OK. Build an application in this computer and then install on another computer which has been installed with Runtime 7.0 and it is this computer which has the truncation problem. I haven't tested the built version on another computer or my own computer and I will do this today.

 

Nevica

Message Edited by nevica on 09-04-2009 03:04 AM
0 Kudos
Message 8 of 14
(4,716 Views)

Ok, here is the latest:

 

 

Computer number 1: LabView 7.0 (Build computer). Works Ok. No Truncation problems for 1 Torr Gauge. Used with SET NO1 Pressure Gauges.

 

Computer number 2:Runtime 7.0 running built exe file. Truncates incorrectly. Used with Set No2 pressure gauges.

 

Computer number 3:Runtime 7.0 running built exe file. No problems. Used with Set No1 pressure gauges.

 

 

Possibilties. Problem with Set No2 pressure gauges and multiplexer. I doubt this is the case since it works Ok with Hyperterminal and reads correctly on the MKS interface.

 

Nevica

0 Kudos
Message 9 of 14
(4,705 Views)

Hi Nevica,

 

Thanks for testing each computer with the built exe. If it's working fie with Computer 3 then it most likely will not be the build that's the problem (as long as it's the same version build on each computer). It may be Set No.2 pressure gauge. Is it possible to change the gauges round so you have

 

Computer number 2 with Set No.1 pressure gauges

Computer number 3 with Set No.2 pressure gauges

 

If it's Set No.2 that is the problem then Computer 3 should fail and Computer 2 should pass. If this happens then I would look to repair or replace the pressure gauges in Set No.2.

 

If there are settings on the pressure gauges it could be worth while to check them aswell.

 

Regards

Rico P
Smiley Very Happy
0 Kudos
Message 10 of 14
(4,680 Views)