ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import a basic command write in C++ , visual basic ...

HEllo,
I have an extern peripheric connected to the pc by USB and I have basics commands to control him written in C++ ( or visual basic ) and I would like to import all those commands on Labview to control the peripheric ( I a naab in  Labvieww 😞 ).
If this is impossible how do you advise me to control this peripheric if I have these basics commands.
Little precision to say you that this perepheric is a new peripheric ( created in laboratory but no by me ^^ ) and the person who create this divice ask to me to control it with Labview.
Thanks a lot.
0 Kudos
Message 1 of 4
(3,342 Views)
The quickest solution for you might be to compile your C++ code into a DLL which you can then call from LabVIEW. Did you write the C-code or did somebody else? Calling a DLL from LabVIEW isn't difficult, as long as you're dealing with simple data types. There's a really good example that ships with LabVIEW that shows you how to do this. Check the "Help->Find Examples." and then click the "Search" tab and look for "DLL".
0 Kudos
Message 2 of 4
(3,324 Views)
Also, if you have access to the API from VB, it might already be setup as a COM or ActiveX object. If that is the case, you can easily call it from LV using the ActiveX nodes.
Message 3 of 4
(3,311 Views)
I don't write myself the C++ commands but the idee to import the dll with labview is good I will have a look on the examples you say and if I need help I will come back.

I don't habe the VB commands so it's over for your solution Lycangeek 😞

thanks for these answers
0 Kudos
Message 4 of 4
(3,303 Views)