04-30-2009 08:37 AM
I am using a VISA configure serial port to open a serial port connection, to grab some data, do some array manipulation and display it.
My VI works perfectly untill I build it as an exe and transfer it to a laptop with a USB to serial port converter (as the laptop doesn't have a serial port).
Windows allocated the converter to COM9, but I can't see it in LabVIEW.
Do I need to use something like 'Find VISA Resource'? If it does find something how can I change the VISA resource name?
I have attached a screenshot to give you an idea of what I am doing.
Solved! Go to Solution.
04-30-2009 08:55 AM
You may for example use the visa find "Find VISA Resource" then feed the result to a Ring controller property node. Go find example and search for ring. Combine with an event structure, and you have what you want
Good Luck
04-30-2009 09:12 AM
You won't see "COM9" as that would be an alias. In MAX you have to explicitly create aliases such as "COM1", "COM2", etc. When you first install VISA and MAX if the computer has a serial port then an alias is automatically created for that port and is called "COM1". Normally serial ports are accessed as "ASRL[board][::INSTR]".
If you want to use the aliases then as I indicated you have to create them in MAX. The MAX Help file tells you how to do this, and it's pretty easy.
04-30-2009 10:06 AM - edited 04-30-2009 10:09 AM
Thanks for the reponses,
I am not to bothered about the "COM" names so long as I can use other ports, but this might be useful later, thanks.
This is what I have so far, but as I predicted it didn't work.
I am not sure how to then use this information to change the VISA resource name so it reads the correct port.
04-30-2009 10:15 AM
There is absolutely no reason to use all of that code. The original VISA Resource Name control should work just fine. Did you install the VISA runtime on the laptop? If so, did you also install MAX so you can verify the VISA resources on the latptop?
Also, since an exe will automatically run when opened, did you provide a mechanism to wait for a com port selection before the program starts the VISA acquisition?
04-30-2009 10:37 AM - edited 04-30-2009 10:47 AM
04-30-2009 11:30 AM
Ok, I have now installed VISA runtime. It's now picking up the ports. But when I select the the COM port I am using it's still not reading data in. I am beginning to think it's a problem with the RS232/USB converter I am using.
I am defiently receiving data (I can see my data in tera term) and it's not a problem with my VI because it runs perfectly on my PC.
04-30-2009 02:08 PM
05-01-2009 04:52 AM
There was no error just wouldn't read in my data. Though seems to have magically worked this morning!
I think my problem was that I hadn't installed VISA runtime.
Thanks for the help!