LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication - program is slow

Solved!
Go to solution

Hello community,

 

I have a problem: I am using LabVIEW to communicate with a uC with RS232, but the program is extremly slow. In this configuration (it's a minimal example), it takes about 8 seconds to send a new string. What could be wrong? (I'm a beginner)

 

The program has the task to prepare a string with incremented values and send it over UART.

 

Thanks for your help!

 

Greetings!

0 Kudos
Message 1 of 7
(3,763 Views)

There is nothing in your VI that would cause it to take 8 seconds.  It is pretty basic.  Is there any other VI that calls this VI?

 

 

How do you know it is taking 8 seconds?  Isn't it possible the problem is within your microcontroller code?

 

There is a way you could do this without using the express VI, but the express VI shouldn't be causing 8 seconds worth of problems.

0 Kudos
Message 2 of 7
(3,747 Views)

The uC doesnt communicate with the PC, it just recieves the single string all the time, which works well. It's only a one-way communication. The string I send causes the uC to change an analog current, so i can see on my DMM, that it changes after 8 seconds. In addition I am tracking the signal chain in LabVIEW with the yellow bulb, where i can see, the programm executes very slow.

 

Nothing else is opened, i have no idea, whats the problem... 😕

0 Kudos
Message 3 of 7
(3,735 Views)
Solution
Accepted by topic author mspguy

The yellow bulb is Highlight Execution.  It is strictly a debugging tool.  Your turn that on to slow down execution and be able to see how the data flows through the wires.

 

Turn off highlight execution and it will run full speed.

 

But how are you running this VI?  You don't have a while loop, and you haven't told me if another VI calls this VI.  So this VI only runs once then stops.

 

(Please don't tell me you are using the run continuously button which is also strictly a debugging tool.)

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Message 4 of 7
(3,728 Views)
Solution
Accepted by topic author mspguy
With highlight execution on, the program is supposed to execute pretty slowly. Turn it off and determine the actual speed with a flat sequence structure and the tick count functions.

I'm posting by phone so I can't look at the code. Can you attach an image?
Message 5 of 7
(3,719 Views)

Oh damn, I'm so sorry for wasting your time...

 

It was the bulb...

 

Now it's too fast, but I think i can handle that 🙂

 

thanks a lot!

0 Kudos
Message 6 of 7
(3,707 Views)

Just use one ot the timing functions to control loop iteration speed or use an event loop


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(3,702 Views)