02-14-2017 09:21 AM
Hi Guys,
I am trying to control a Syringe Pump valve from Cetoni using their Labview API. I did not write the dll. Before I ask them about it, I want to make sure I didn't make any mistake in programming it.
The particular function block runs without error when Highlight execution is ON. So there is some sort of timing problrm. It waits until the hardware changes position and then moves on. Without highlight execution it throws an error.
I tried with delays using sequence structure but to no use. How else can I make that function run slowly so that hardware finishes executing.
02-15-2017 02:50 AM
Hi,
can you provide us with the VI and the DLL as well as with the modified VI, where you added the waiting time.
Also it would be interested which error is thrown.
Best regards,
Christoph
02-15-2017 12:11 PM
@GoKu25 wrote:
The particular function block runs without error when Highlight execution is ON. So there is some sort of timing problrm. It waits until the hardware changes position and then moves on. Without highlight execution it throws an error.
I tried with delays using sequence structure but to no use. How else can I make that function run slowly so that hardware finishes executing.
This is not necessarily an indication that the problem is timing. It could be threading - as far as I'm aware, execution highlighting forces everything to run sequentially in a single thread, rather than in parallel as LabVIEW would usually do. If you configured the DLL to run in any thread, but the DLL is not thread safe, then you could run into a problem like this. It's also possible that LabVIEW allocates and reuses memory differently with highlight execution turned on, such that the DLL might corrupt important memory only when execution highlighting is turned off.
I would start by changing all the Call Library Function Nodes to "Run in UI thread" if they are set to "Run in any thread."
If you really think it's timing, can you show how you tried to use a sequence structure to add a delay?