Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Serial Driver not reading when created in EXE...

I am running into a roadblock with an RS232 serial driver that reads from a PLC.

 

I get a perfect read from the device prior to making the executable, I have an INI file that reads in the COM port to the serial sub-vi.  When I go ahead and make the executable, and when running the executable I cannot get a COM connection.

 

I've troubleshooted the following: 

 

(1) the INI file is in the correct directory so the EXE can read from it

(2) the USB driver is correctly installed

(3) ??????? what else could be doing this?

 

I have an EXE version made in LV 7.0 that I can plug right in and read from it (on the same PC) just fine.  Though, when making it in 8.5 I cannot.

 

Help on this one would be great.

 

Thanks.

0 Kudos
Message 1 of 5
(4,111 Views)

jonathanupr,

 

Make sure you have the correct version of NI-VISA Runtime installed on the pc where you are running your .exe.  Version should match version of NI-VISA installed on development machine.  You could also have a timing issue.  Code will usually run faster in .exe form.

Message 2 of 5
(4,083 Views)
Remember that you can have only 1 version of the VISA Runtime at a time.  the same version will not support 7.0 and 8.6

"Should be" isn't "Is" -Jay
Message 3 of 5
(4,078 Views)

The same version will support both 7.0 and 8.6. I would recomend installing the latest.

 

If there are still problems after checking with MAX and making sure the com ports are listed, make sure you are correctly reading the ini file. Remember, if you use a function such as Get Current VIs path, it will be different with an exe.

0 Kudos
Message 4 of 5
(4,070 Views)
thanks guys... I'll take a further a look into it.
0 Kudos
Message 5 of 5
(4,057 Views)