LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run a VI in real time without a delay

Solved!
Go to solution

Hello,

 

I would like to communicate in real time with a sound level meter via serial port. I've already created my program but still I have a delay of 3 seconds, it  maybe not important but I do have to remove it for my application.

 

Is there any possibility to delete completely the delay?

 

Just for information, my Vi contains two local variables, could it be the reason? Or maybe because a certain timeout of the serial port?

 

If you need to see the program, just tell me.

 

Thank you in advance for your help.

0 Kudos
Message 1 of 25
(3,459 Views)
Yes, attach an image of your code. The 3 second reading does sound like you are getting a timeout. You get a timeout if you request too many bytes or you have enabled the termination character and the instrument does not send one or the one it does send does not match what you have programmed.

Local variables are usually just badly written code.
0 Kudos
Message 2 of 25
(3,454 Views)

Hi,

 

Thank you for your reply.

 

Here is a snapshot of the first frame of my sequence and the control panel of the program.

0 Kudos
Message 3 of 25
(3,406 Views)

Actually the best thing is to post the actual VI.  The next best thing is a snapshot of the block diagram.

 

Can't really tell anything from the front panel.  Are you talking about the dip?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 25
(3,399 Views)
The only thing I can say about your attachment is pretty ugly colors.
0 Kudos
Message 5 of 25
(3,392 Views)

@Dennis_Knutson wrote:
The only thing I can say about your attachment is pretty ugly colors.

Maybe it is being developed for a young girl who likes pink/purple...or a guy, not that there is anything wrong with that.

0 Kudos
Message 6 of 25
(3,364 Views)

my Vi contains two local variables, could it be the reason?


Local variables are one of the fastest data transfer method. 

But you should use them very carefully.

by  real time do you mean if you are sending some command then you should get reply within certain predefined amount of time??

 

0 Kudos
Message 7 of 25
(3,357 Views)
Doubtful but they are probably not needed.

You still have not shown any code. You do mention a sequence. A sequence structure is another hint at a bad architecture.
0 Kudos
Message 8 of 25
(3,352 Views)

Actually, I would like to receive the data from the instrument exactly at the same time it displays it on its own screen.

I'm using a stacked sequence, because I have two loops and I want that one runs before the other.

0 Kudos
Message 9 of 25
(3,336 Views)

@Yasmine90 wrote:

Actually, I would like to receive the data from the instrument exactly at the same time it displays it on its own screen.

I'm using a stacked sequence, because I have two loops and I want that one runs before the other.


I think we either need to see code (or even a picture of the block diagram) or discontinue the discussion.  It's like trying to diagnose what's wrong with a car but the owner won't let you near it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 25
(3,323 Views)