Showing results for 
Search instead for 
Did you mean: 

Vi Code in visual c++


I am not a programmer at all and have a very little experience with Labview.

I have on one side a VI code that controls a Mirror (through a PCI6025E card). On the other side, a camera controlled with Visual C++ (Microsoft Visual C++ .NET version 7).
I want to link the 2 programs. My best options is to control the mirror with Visual C++ but I do not want to rewrite the VI code in VC++.
Should I buy the application builder.
The vi code is basically used to order and send commands to the driver of mirror. I could then make a dll (or something else ?) and call it from my VC++ program. Can this work with a more complex vi i.e. 1 VI calling 1 VI calling 1 DLL: I compile everything in 1 dll or exe so that VC++ can use it...

Thanks !
0 Kudos
Message 1 of 7
Purchasing application builder to build a DLL to call in VC++ is only a slightly easier problem than recoding the VI code since you say you're not a programmer at all. I'm not familiar with the hardware you listed but depending on how complicated the VI is you could simply see what low-level function calls are made to control the mirror. If it's a few simple function calls with minimal VI coding on top of them to make it work, it might be a wash for you to recode it, as compared to compiling and actually using a DLL, in terms of difficulty. However if the VI is complex with a lot of coding on top of the lower level calls, it very well may be worth it in your situation to purchase the Application Builder and create a DLL that VC++ can interface with.
0 Kudos
Message 2 of 7
You are right.
I think that it is not too difficult, I understood more or less everything, except the VI that allows to talk to the card. It is a basic call library function with inputs coming form nowhere...
But I may be the only judge to know if I wanna recode everything or not. At least, now i know that Application builder can do what i need...unless it is a pain too to set up.

Tank you,
0 Kudos
Message 3 of 7
Understanding the low-level library functions are what would allow you to port the code to VC++. Based on what you've said, I would recommend taking some time to understand them (call library nodes) before making a decision one way or the other
0 Kudos
Message 4 of 7

I'd like to use the non DAQmxBase VIs used in this attached VI in my C code (under GNU/Linux).

I found all the necessary functions about the DAQmx VIs with the drivers of this latter, but the signal processing VIs in the "Detect and count impulses" while loop are not part of it...

How can I use them ?

0 Kudos
Message 5 of 7
FYI--When posting a new topic like this it is best to post as a new topic and link to the old topic that you are referencing.  This way the NI Application Engineers will be able to give detail to your problem if it goes unanswered by others in the forum.  As it is, this post will not show up as a new unanswered post and the only people notified will usually be the ones who have subscribed to the particular discussion (usually because they posted one of the replies).
0 Kudos
Message 6 of 7

creating new post

0 Kudos
Message 7 of 7