LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1) continuous​ly reading dynamic output from a LabWindows​/CVI DLL called from LabView or 2) Calling LabView DLL from LabWindows​/CVI code

Hi, I inherited a sophisticated program developed in Labwindows/cvi, which controls a robotic device (Call it "DevA"). I also have

developed a Labview VI which communicates to another device ("DevB") over a USB port.  I need to add some computation in the C code which monitors what's happening in DevA in order to properly control DevB w/ my labview code.  I have tried creating a DLL out of my labview VI and calling it from the C code, but something seems to be hogging up tons of memory, as it slows the DevA control (the LabWindows/CVI program and GUI) way down.  THe LabView DLL is just writing a command over the USB port.  I made sure I am not opening and closing the port EACH time the comptuation is performed and command sent.  Is calling a LabView DLL just inherently slow, or must I be doing something wrong?

 

I have also tried creating a DLL out of the C code and then calling it from labView. It runs nice and quickly but this DevA DLL does

not seem to communicate information to LabView once the DevA program has started. (so DevB never gets turned on or gets any control) -- the C code launches a GUI to control DevA. So, the Labview code runs, and then when it calls the C dll, it seems that the rest of the LabView functions that are wired to output from the DLL ("call function library node" output) do not execute and probably would not execute until I close the DevA GUI. In other words, I don't know how to continuously monitor and control DevB in real-time as the DevA program's outputs are changing.

 

Anyone have any ideas on what could be wrong w/ either of the approaches I'm taking? Or know of another way that's sure to work?

I am neither a LabWindows or LabView expert, so any help you could provide would be appreciated.

Thanks!

0 Kudos
Message 1 of 2
(2,127 Views)

Hi Mark CSULA,

 

It looks like you posted this here as well.  I've posted a response over there, so let's keep the discussion over there.

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,082 Views)