Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

one loop of two parallel not running

Hello,

 

I try to build a double loop structure. One loop runs the serial communication. The other runs the control components.

 

When I highlighted the running of the program, I found the loop with serial communication not running.

 

Can anybody help me with this issue?(Photo attached)

0 Kudos
Message 1 of 6
(4,832 Views)

From what I can tell you have 3 loops.

 

 

0 Kudos
Message 2 of 6
(4,813 Views)
You have a data dependency between the top loop and the bottom loop so the bottom loop will not run until the top one finishes. Basic dataflow.
0 Kudos
Message 3 of 6
(4,806 Views)

I want you build such a pattern in which one loop runs COM driver, data TX℞ The other one doing the data processing.

Currenly I made COM and processing in one loop, the COM doens't runs stably (error sometimes)

 

What is your advice?

0 Kudos
Message 4 of 6
(4,799 Views)
You need to first break the dependency. Pass the data to the processing loop via a queue like the producer/consumer architecture. Fix the serial read to eliminate the Bytes at Serial Port and the sequence structure. Neither are needed since you have enabled the termination character.

Provide the make and model of the instrument and attach the programming manual.
0 Kudos
Message 5 of 6
(4,793 Views)

Hi , thanks for solution. The error doesn't come (whether the same error will never come, let's see).

 

Thank you!

0 Kudos
Message 6 of 6
(4,768 Views)