LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing in EXE not working

I am running a LabVIEW program under V5.1.1 and use the Serial Write VI to
print via the parallel port.
This works fine at design time, but returns the Error 37 (device not found)
in the compiled EXE version.
I have the serial devices="Com1;Con2;LPT1" defined in the labview.ini file
and so call port 2 (all OK).
What am I missing here for it not to work only when compiled to an EXE file?
0 Kudos
Message 1 of 5
(3,086 Views)
Dennis,

If the file "serpdrv" which can be found in the directory is not
located in the same directory as the EXE you built, calls to serial port
VIs will result in an error. The same is true for DAQ VIs, but the file
"daqdrv" is the one required.

-Jim

"Dennis Gibson" wrote:
>>I am running a LabVIEW program under V5.1.1 and use the Serial Write VI
to>print via the parallel port.>This works fine at design time, but returns
the Error 37 (device not found)>in the compiled EXE version.>I have the serial
devices="Com1;Con2;LPT1" defined in the labview.ini file>and so call port
2 (all OK).>What am I missing here for it not to work only when compiled
to an EXE file?
0 Kudos
Message 2 of 5
(3,086 Views)
"Jim Kring" wrote:
>>Dennis,>>If the file "serpdrv" which can be found in the directory
is not>located in the same directory as the EXE you built, calls to serial
port>VIs will result in an error.

The serpdrv file was included in the support files at build time and appears
in the task destination directory along with the EXE file. I wonder if the
problem is more incedious: Since the ports are defined in the labview.ini
file (serial.devices=) which is not necessarily available in the destination
PC, how are the ports defined from the EXE file's point of view?
0 Kudos
Message 3 of 5
(3,086 Views)
> The serpdrv file was included in the support files at build time and appears
> in the task destination directory along with the EXE file. I wonder if the
> problem is more incedious: Since the ports are defined in the labview.ini
> file (serial.devices=) which is not necessarily available in the destination
> PC, how are the ports defined from the EXE file's point of view?

Bingo. You need to copy our labview.ini file and rename it to match
your EXE
namae. This is done to allow for each EXE to have its own config settings.

Greg McKaskle
0 Kudos
Message 4 of 5
(3,086 Views)
Dennis Gibson schrieb:
>
> I am running a LabVIEW program under V5.1.1 and use the Serial Write VI to
> print via the parallel port.
> This works fine at design time, but returns the Error 37 (device not found)
> in the compiled EXE version.

I had a similar problem with a program that uses both com ports on my
pc. At design time the programm recognized both ports, in the *.exe
version it recognized just com1 but not com2 (with error 37). Serpdrv
was located in the same directory as the *.exe file.

Then i installed the runtime engine which i got from the ni website
(lvrte511g.zip, should also be on CD) and tried again. Now it works
fine.
0 Kudos
Message 5 of 5
(3,086 Views)