LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi breaks when built into a real time executable

I have a system with 4 tasks (VI's).  One to read data, one to crunch the data, one to log the data, and one to display the data.  They are designed to run on a PXI computer system.  When I run them from the labview development enviornment (they still run on the PXI system this way) everything works fine.  When I build them into a real time executable and set up the PXI computer to load the executable at startup the data acquisition VI no longer works.  The VI is designed to run at a rate of 20 Hz.  It reads data from both a serial port and a analog input board.  When I run it from the IDE it works fine.  In the real time executable it sometimes reads the data, but the serial port does not work.  Because I'm using VISA to read from the serial port the user must select the port from a drop down box (Visa Resource Name).  This drop down box does not get populated when the VI is a part of the RT executable, but does populate when run from the IDE.  I've also had a lot of problems where the VI would stop reading data altogether, but only when it is run from the RT executable.  Some things I have tried that sometimes make a difference is that I now store the RT executable and all of its helper files in C:\ni-rt\system and added a 5 second delay at the beginning of the VI..  I have also seen this error message in the log.

####
#Date: Fri, Jun 16, 2006 1:23:13 PM
#OSName: PharLap
#OSVers: 12.0
#AppName: PH_EXEC
#Version: 8.0.1
#AppKind: AppLib

LVRT.DLL reference address: 0x002F8BAA


I have reinstalled the OS on the PXI which helped get the data back, but I still have the problem with the VISA Resource Name.  Is there any way I can put a constant in the block diagram instead of using the VISA Resource Name drop down box?  What could be causing the problems I'm seeing?
0 Kudos
Message 1 of 2
(2,496 Views)
Hi brenden,

I hope you're doing well.  The problem you are seeing is because an RT application does not have a front panel per se, so the control you are having the user select for the VISA Resource Name is not being used as expected.  As you mentioned, creating a constant is probably the best way to go in this case.  If you have the VI targeted to your RT PXI Target, you should be able to drop down one of the VISA VIs, right-click the VISA Resource Name input terminal and select Create Constant, and the constant will be blank since there are no VISA Resource Names configured on the target.  You can then enter the specific resource you would like to address from here.  Let us know if this is helpful!

Thaison V
Applications Engineer
National Instruments

0 Kudos
Message 2 of 2
(2,480 Views)