06-17-2014 12:01 AM
I am making a labview application which will run on the PC and can be used to control a microcontroller. The connection between the PC and the microcontroller is serial with the USB end of the cable going to PC and the serial i.e DB9 connector going to th microcontroller.
In my Labview application which will run on PC side, I have coded to allow VISA to read from COM port 5. So serial communication between PC and microcontroller will be on COM port 5.
But my problem is that whenever I plugin the cable into different PC's the connection gets assigned a different COM port and so the application does not work on other PC's.
If I want to make a .exe file of my application, I must ensure that when the application will be launched on any other PC, it will work. How to ensure that the application is assigned the COM port which I have coded for in my labview application?
OR IS THERE ANY OTHER SOLUTION YOU COULD SUGGEST?
06-17-2014 12:38 AM
06-17-2014 12:39 AM
06-26-2014 08:40 AM
I always use configuration files for instrument interfaces. Simply for the reasons you are running into. It is very simple up update a config file. All your application has to do is read it and set up the VISA session.
Be sure to go through the Config File palette (in the File I/O palette).