How can I calling LabView DLL within LabView and pass similar Data Types?
I am trying to use an Instrument Driver, which is created in LabView6.1 as a DLL. At this point I have only LabView to test this DLL. I was wondering, is there easy way to find out what sort of Parameter or Data Type I should be using.
How can I pass the following data with in LabView:
LVRefnum as Type?
LVBoolean as Type?
TD1 (a structure) as Type?
It is funny to see that I am able to create a DLL in labview but having trouble calling it within LabView. I thought, it would be easier to test the DLL within the same environment.
Basically, I am more worried about the VISA calls that are used in the driver to communicate with instrument. Because, there is no link to �VISA32.dll� in
the header file, is that handled by the LV Run-time engine? I guess more details are needed on using the LabView DLL within LabView from National Instrument Technical Support.
Attachments:
RL5000.h 1 KB
A LVRefNum seems to be an unsigned long data type (32bit). You can cast it
in LV then use that as a parameter to call the DLL. (an Occurrence type
seems to be a Ulong32)
When you created the DLL what was the resulting type for the LVRefNum?
Happy Holidays
"Enrique" wrote in message
news:[email protected]..
> I see...
>
> After doing some research, it seems to me that there is no easy way to
> find out the type of data, other than looking at the header file and
> have documents like Using External Code in LabVIEW handy. The
> following information is from that document:
>
> LVBoolean is an 8-bit integer. 1 if TRUE, 0 if FALSE.
>
> LabVIEW specifies file refnums using t
he LVRefNum data type, the
> exact structure of which is private to the file manager. To pass
> references to open files into or out of a CIN, convert file refnums to
> file descriptors, and convert file descriptors to file refnums using
> the functions described in Chapter 6, Function Descriptions.
>
> I know you are creating a dll in LabVIEW, but I am pretty sure the
> information applies as well and is useful. For your dll this can be
> interpreted that, rather than passing a LVRefnum, try passing the file
> descriptor.
>
> From the header file, is can be deduced that TD1 is a cluster in
> LabVIEW.
>
> You are right in saying that "more details are needed on using the
> LabView DLL within LabView from National Instrument Technical
> Support.".
>
> Enrique
Similar Messages
-
How can i call a DLL file from labview?
Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
Please Mark the solution as accepted if your problem is solved and donate kudoesAs far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
Have a look at this
/sletten -
How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App
How can I clear a form after submitting and saving the data in the iOS Acrobat Reader App
Darrell,
Thanks for this response. After I posted mine, I saw that the resetForm JavaScript method is documented as being supported starting with version 10.5: http://www.adobe.com/devnet-docs/acrobatetk/tools/Mobile/js.html
But I haven't been able to get it to work. Can you clarify if support was indeed added and if it works for you? -
How can i change my i cloud email and pass word?
please help me change my i cloud email and pass word
If you email address ends in @mac.com @me.com or @icloud.com you cannot change it, but you can change your password here.
-
How can I call a DLL from Borland C++Builder that was generated by LabVIEW?
In the linking phase, the linker of Borland C++Builder echoes the message shown below:
[Linker Error] 'Test.LIB' contains invalid OMF record, type 0x21 (possibly COFF)
'Test.LIB' was generated by LabVIEW Application Builder and had been verified working well with Microsoft Visual C++"Murray Chen" schrieb im Newsbeitrag
news:[email protected]..
> In the linking phase, the linker of Borland C++Builder echoes the
> message shown below:
>
> [Linker Error] 'Test.LIB' contains invalid OMF record, type 0x21
> (possibly COFF)
>
> 'Test.LIB' was generated by LabVIEW Application Builder and had been
> verified working well with Microsoft Visual C++
Hi Murray,
Borland C++ Builder uses a .lib format which is not equal with VC++. You
have to rebuild your .lib by using implib.
Try 'implib library.lib library.dll' to create a new .lib.
Greets
Henrik -
How can i call a DLL file using invoke node from labview?
I cant call a DDL function using call library function.so plz tell me how to use invoke node and call DLL using invoke node
Please Mark the solution as accepted if your problem is solved and donate kudoesPlease stay in the same thread.
- Cheers, Ed -
RE: How can I call Windows .DLL components in Java
Hi, there,
I have a wondows dll component registered on my server. I want to call this componet in my Java application(Servlet). Could you tell me the syntex or is this possible to do in this way?
TIA,
XinThank you for your reply. Did you suggest using JNI? Since this DLL is a comercial component and we can not recompile or modify it, I donot know how to use it. Could you give me some more detail ?
Thank you,
Xin
You can use either of the load or loadLibrary methods
in java.lang.System. The library has to be loaded at
the very beginning of loading of the class , if the
class were to access any native method in the
library.
Hence, it shoud be in a static block.
Syntax-
static {
try{
System.load("C:\\x.dll");
}catch( Exception e ) {
System.out.println(e); -
Hi All,
I Have two odata webservices When i click the listview items I have to call that two odata webservice and pass that data to next screen ?You don't have to pass the data to any page.
onInit method of controller set your oData model like this.
onInit: function() {
//var oModel = sap.ui.model.json.JSONModel();
var oModel = sap.ui.model.json.JSONModel("http://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json");
sap.ui.getCore().setModel(oModel,"oDataId");
After this you can access your model from any views by just binding the elements with your odata. Suppose i have a table in a view of my application then i can write like this.
var oTable = sap.ui.table.Table({
tableId: "myTable",
visibleRowCount: 5,
editable: false
oControl = new sap.ui.commons.TextView({text: "{CustomerID}"});
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Customer ID"}),
visible:true,
template: oControl
oControl = new sap.ui.commons.TextView({text: "{ContactName}"});
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Contact Name"}),
visible:true,
template: oControl
oControl = new sap.ui.commons.TextView({text: "{ContactTitle}"});
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Contact Title"}),
visible:true,
template: oControl
oControl = new sap.ui.commons.TextView({text: "{CompanyName}"});
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Company Name"}),
visible:true,
template: oControl
oTable.bindRows("oDataId>/value");
Here you can see i have binded the oData with table.
Just what i am seeing that you are trying to pass this model to a page. You don't have to do so. Just bind your oData with relevant elements lite table or anything by writing like this.
oTable.bindRows("oDataId>/value");
these functions are different for different elements.
for listItem you may write like this.
var oList = new sap.m.List({
inset: true,
items : [
new sap.m.DisplayListItem({ label :"Category ID", value : "{oDataId>/CategoryID}"}),
{oDataId>/CategoryID} this has been used for binding.
Regards
Dhananjay -
How can I read pdf files from LabVIEW with different versions of Acrobat reader?
How can I read pdf files from LabVIEW with different versions of Acrobat reader?
I have made a LabVIEW program where I have possibility to read a PDF document. When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
Jan Inge Gustavsen
Attachments:
Show PDF-file - Adobe Reader 7-0-5 - LV61.vi 43 KB
Read PDF file.jpg 201 KB
Show PDF-file - Adobe Reader 5-0-5 - LV61.vi 42 KBhi there
try the vi
..vi.lib\platform\browser.llb\Open Acrobat Document.vi
it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!" -
How can i load a VI from LABVIEW ver 6.0.1b3 to LABVIEW ver 6.1
How can i load a VI from LABVIEW ver 6.0.1b3 to LABVIEW ver 6.1......I want to load a vi but i'm getting this error:
LabVIEW load error code 9:VI version (6.1) is newer than LabVIEW version (6.0.1b3)
My LabVIEW ver is 6.1
Please help ......it's important
ThanksI am having similar issues with a *.exe from LV6.1. I have the runtime engine for 6.1 and recently upgraded to 8.2 from 7.1. I've never had 6.1 on my machine. I am able to install this executible and runtime engine on a machine with 7.1 and can run the *.exe fine.
I get a load error and am not sure why. I have had similar issues with old VI's that I have written in 7.1 executing on this machine w/ 8.2
any suggestions.
Attachments:
error.zip 14 KB -
How can I record a video with LAbview?
Hi,
I have a question: How can I record a video with labview?
I have a camera (AXIS 221) connected via rj45 on PC. I see the video of the camera in a browser.
And I would to acquire the video in labview.
Could someone help me?
Thanks
RafUnfortunately I haven't any experience with this camera. Iguess, you should install API, then crete new VI, place ActiveX container (palette Container->ActiveX) on the Front Panel, then right mouse click, then choose Insert ActiveX object..., then found you camera object and select it and press OK. Then you probably can see image from the on the front panel. Also probably you will be able to get image data in array (how easy is it - depends from the camera API).
If you able to see image from camera in the Internet Explorer, then another method - you can put Microsoft Web Browser as ActiveX object, then you should also see the image. Disadvantage of this method - you will be not able to get image data.
Andrey. -
How can i use activeX Control in labview?
how can i use activeX Control in labview?
please describe me step by step.
thanks.Well..that was quite helpful..but now I'm encountering certain problems. I've attached the VI I've made.
I don't need sound at the moment so I dropped it. (Although I tried to play it..but all I could hear was a very annoying sound.) Secondly I don't want to display any date or time..so i dropped that property too.
Now when I run this Vi...the webcam turns on, the screen of videocapx pops up..then the webcam light goes off..and another pop up appears saying..labview is not responding..and i have to close it reluctantly.
I haven't placed the stop capture property in this vi. i checked it by placing it too..but that doesn't work.
I would like to notify that my actual task is to acquire image and then compare it with another one already present on my pc. I want you to please help me out..solve my first query then I'll proceed with the latter part.
Attachments:
activexvideocaps.vi 20 KB -
Can i call winmain function in labview
hello everyone,
Well i have written a C++ code that uses the winmain function (windows function). i want to convert this code into dll and call that dll into labview.
Is it possible to call winmain function as one of the functions in labview. Please let me know as soon as possible.
Thank you.
Royal tiger......You didn't say what development environment you're using, so I'm assuming Visual Studio. It sounds like you created a Win32 app (as opposed to an MFC app). This has a "WinMain" function. The prototype for WinMain is geared towards it being called by the OS when you run the executable. You could just add the __declspec(export) directive in front of the return type, but you also need to change some build functions in Visual Studio to get a DLL. You probably also don't need all the arguments that WinMain uses. You're probably better off by starting with a new DLL project in order to get the framework for a DLL, and then copy and past the function code. That's what I would do.
I would also strongly suggest that you crack open the "Using External Code in LabVIEW" manual that gets installed when you installed LabVIEW. It's in the "manuals" directory, filename of "lvexcode.pdf". -
How can i call the certificate selection dialog box from source code?
How can i call the certificate selection dialog box from source code?
NB: Of course if i have more than one certificate in the Microsoft Keystore 'My'.
Thank You in advanceI found an example of the "TestStand UI Expression Control.ctl" and it works just the way I need it. (check the link)
Proper use of "TestStand UI ExpressionEdit Control" in LabVIEW http://forums.ni.com/ni/board/message?board.id=330&requireLogin=False&thread.id=10609
The "Expression Browser Dialog Box Button" F(x) stays disable while editing the VI, however it become available when the VI is called from TestStand.
Thank you,
Hecuba
Mfg. Test Engineer
Certified LabVIEW Associate Developer -
How can I Call the MainVI from its SubVI, and this happen recursively?
Hi All,
How can I Call the MainVI from its SubVI, and this happen recursively?
Actually, LAbView 7.1 doesn't support recurssion?
Plz help me out!Dear GerdW,
Thanks a lot 2 all of u guys,for all the brilliant responses.
Actually, my basic aim is to call the Main VI, containing a SubVI.....
Now, I want to call my main VI from this SubVI...recursively!!!!!..but whenever I tried to put the MainVI in this SubVI..an error message pops out saying recursive calling is not possible.
I also tried using "Call by reference" but tht also didn't worked...an d error is somewat like...VI is invalid..or type matching..or state matching error.
Here, Im attaching the snapshot of the MainVI... Im calling the SUBvi from it... It is running GOOD n FINE...
But prob arrives when I call the Main from the SUBvi, which looks like same as MainVI(with little differences).
I hope, Im clear in my words n not being ambigous.
Plz, correct me where ever im wrong.
Thank You.
Mishra_RnD
Attachments:
ScrShot.JPG 272 KB
Maybe you are looking for
-
Can anyone help with the following error message : Unable to Assemble Book There is a problem with the photo with the file name "DSC_0090.JPG" The full resolution version of this photo either cannot be located or is corrupt. Please replace the photo
-
Linking in a PDF Via coordinance or hover over
I have been looking for a way/tool/script/etc to create links to other PDF, or HTML, ETC from within a PDF. For example if you are viewing a PDF in a browser, the PDF has a picture of an orange and an apple, if you click on the orange it takes you to
-
I have tried at least a dozen times to update Flash on my Mac. It says it's updated, but when I go to try to use it, I get the 'update' screen again! What gives?
-
iPad 3 16GB; 6GB free; hard restart; upgrade via wifi to 8.1.2 failing, plugged in; scrolled to end of T&Cs before clicking on Agree.
-
Link to another WD application
hi all, By using link to action UI element how to call another webdynpro application? I have used create_external_window() but it is showing null pointer reference error.can anyone help me regarding this? thanks in advance, regards, Anusha