07-22-2013 04:24 AM
Hi, everyone
I build a dll from labview, the prototype is : double getchannelpower(double f, uintptr_t *VISAResourceName);
I don't know how to pass VISAResourceName to this function.
Is it related to the paremeter ViPSession in function viOpen(ViSession sesn,ViRsrc rn,ViAccessMode am,ViUInt32 ti,ViPSession vi)?
BRs,
lotusky
Solved! Go to Solution.
07-22-2013 05:54 AM
This was already discussed earlier:
1. Thread - Passing a VISA resource to a DLL created in C or LabVIEW
2. Can I Share Open VISA Sessions in LabVIEW with External Code?
07-22-2013 06:55 AM
I think this question is a bit different from what you listed.The items you list are about calling dll in labview, not in labwindows/CVI or in Visual Studio. In labview , we have visa resource name control,it contains lots of data types.
But in cvi or visual studio, it's different. We have to point out which type it is.So, I think it's meaningful to discuss this question.
lotusky
07-22-2013 07:00 AM
Ohhh, I'm sorry...!!
07-22-2013 07:24 AM
Still thanks for your attention. I want to make use of a functional module from labview in my current labwindows/cvi project, it will save much time. I thought it was easy. However, I spent half of a day and haven't figured out.
I can get the string of visa resource name (via viFindRsrc()) and also can get visession of visa resource name (via viOpen()),but I don't know how to pass the parameter.
07-22-2013 09:10 PM
Anyone can help me? I'm going to continue tyring
08-15-2013 03:01 AM
Hi, guys:
I have figured out how to pass the parameter.
In labview, you should replace visa io control with string control. In this way, the generated dll function has the input of the string type.
Hope this will help others!
lotusky