08-25-2010 04:18 AM
Hi,
I have a dll which use to access gpio through com port but it need to create handler to access it.
So, how am i going to convert the Visa resources name to valid ID handler??
I have go through the KB : Can I Share Open VISA Sessions in LabVIEW with External Code?
Inside get mentioned:
However, the Call Library Function Node can perform this conversion. If you wire a VISA resource name or VISA refnum to a 32-bit integer input terminal of a Call Library Function Node, the node coerces the refnum into a valid VISession ID, which you can use in your external code.
How can i do this??
Thanks and Regards,
Simon
08-25-2010 05:10 AM
08-25-2010 06:01 PM
try refnum to session
08-25-2010 09:12 PM
Hi,
Let me explain the details: i need to access a hardware by usb-uart, after driver installation, it works like normal com, i have no problem to read/write. Now, i will control the gpio & been given dll, and i try on vb by create handler
hDrv = CreateFile(TEXT("COM1"), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
and is working fine.
Since labview return back visa resource name, so how can i convert to handle ID session to be use on external code module??
KateB,
where can i get the refnum to session property?
08-25-2010 09:36 PM
Use search in function palette, and search with the same function name.
08-25-2010 11:28 PM
Hi,
Do you mean search for visa in function paletta??
thanks and regards,
08-25-2010 11:30 PM
Search for "refnum to session" in function palette.
08-25-2010 11:36 PM
@KateB wrote:
Search for "refnum to session" in function palette.
What version of LabVIEW are you using? I don't see that in LV 2010.
08-25-2010
11:46 PM
- last edited on
01-10-2025
11:37 AM
by
Content Cleaner
Ok. That one comes with TestStand. So try http://digital.ni.com/public.nsf/allkb/FB001AA027C8998386256AAD006C142D