02-27-2012 08:36 PM
I have imported an application I wrote in LabVIEW 7 Express that used the "old" serial VI's that used an Integer I32 for the Port Number, rather than the new VISA Resource name.
When I loaded it into LabVIEW 2010 I did not get any broken arrows, but the Serial interface would not communicate with my instrument.
So my questions are:
1) If I want to build an application executable for a Windows 7 PC using LabVIEW 2010, MUST I replace all the old Serial VI's with their VISA equivalents?
2) I remember when upgrading to a new version of Vision, NI had included an "upgrader" app. that automatically changed some old IMAQ Control to it's new equivalent - is there some tool like this for converting the old serial VI's to VISA?
Chris
02-27-2012 09:16 PM - edited 02-27-2012 09:19 PM
The replacement is automatic assuming you have not done something silly like save to an llb with vi.lib functions included. Just open one of the serial functions once you've loaded it in 2010. You should see VISA functions.
02-27-2012 09:56 PM
Hi Dennis,
Oh yeah you're right. Well I don't get what the problem is then.
If I use the "new" VISA Resource Name of COM12 it works, but if I use the "old" serial VI's and use the Port Number 11, I get the error -1073807343, which means:
VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
Looking into the Open Serial Driver.vi I see it converts the I32 Port Number into a VISA Resource name of "ASRL12::INSTR" (see attached image),
but I'm guessing I have to include an alias string or something that says COM12 = ASRL12::INSTR is that right?
Chris
02-27-2012 10:17 PM
02-27-2012 10:43 PM
Oh! COM12 is defined as ASRL14::INSTR in MAX.
If I set the Port Number to 13 it worked fine great!
OK so how can I use the VISA Resource Name Control and select COM12, but then convert that into an I32 integer as the Port Number of 13 so it will be compatible with all the old serial VI's?
I thought maybe I could use something like the TypeCast VI, but when I tried converting COM12 to an I32 I got the value 1129270577 instead of 13.
Chris
02-27-2012 11:40 PM
02-28-2012 01:17 AM
Thanks Dennis that did the job.