LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem interpretation of data from serial data.... help please!

Then, which is the solution?.

I put the read reference inside of while loop, and it doesnt works!.
I am confused!. Is possible get it?.

Regards, Fonsi.
0 Kudos
Message 31 of 57
(2,017 Views)


@Fonsi wrote:
Then, which is the solution?.

I put the read reference inside of while loop, and it doesnt works!.
I am confused!. Is possible get it?.

Regards, Fonsi.



Well, I can see that you are confused !!! 😉
Apparently, you just forgot to wire the stop also to the outer loop !

CC
Chilly Charly    (aka CC)
0 Kudos
Message 32 of 57
(2,013 Views)
No, i put local variable to the control reference, even i put now the wire to the stop of oulet loop, and it doesnt run!.

Is curiostly, if i put the loop, the vi not use the reference from the bottom.
If i use the for loop, the error from the read serial vi, doesnt pass the for loop structure and the error doesnt arrive to the close serial vi...

Very strange. Can you adjust the vi, i became crazy with this litle vi.
The for loop is better, since i can stop before to finish the 120 readings of sensors, but...
Regards, Fonsi.
0 Kudos
Message 33 of 57
(2,006 Views)
Fonsi,
I have checked your vi. Since I have no serial device to test it, I have replaced all the serial com stuff with a simple random number generator (see the attached vi).
Everything works fine. I'm afraid I cannot do much more for you, since the problem seems to be specific to your own setup.
Keep your serial vi opened and try to track the problem using probes. Is the stop detected ?

Also avoid giving low star ratings to replies. Consider that a 3 stars rate is just an average. Lower rates can be perceived as punishments or insults. I know that that was not your intention, and I do not feel offensed. Just be carefull... ;). Simply do not rate answers when you feel they are not helpfull to you.

CC
Chilly Charly    (aka CC)
Message 34 of 57
(1,999 Views)
OK, I found it ! The problem is in the main vi :
You need to add a timeout value on the De-Queue Element vi, otherwise it will wait for ever...

CC
Chilly Charly    (aka CC)
Message 35 of 57
(1,997 Views)
Hi CC,

START WITH THE OPTION USING FOR LOOP IN THE SUBVI

Ok, looak at the avi file, you can see the problem.
If i put for loop, when i pressed the bottom stop from main vi, the vi stop when the for loop finish, in this case 120 readings.

Good, but as i told you, i stop the send data from the pic with external bottom, Then when i stop to send data, the subvi should stop when the timeout is over time. But it is not successed. Why?, you can see in the video, the problem is the for loop, the ERROR from read serial vi, is not be able to across the for loop!, like when i stop with external bottom the subvi is lossed inside of for loop, only will finish when cover the 120 readings... and its very slow when stop to send data.

The only solution, Is possible pass the reading of status from the for loop, without wait to finish the structure????. If i can read the status outside of for loop the vi will work good!.
Can you help me to get it?.

Sorry men with the start of replies, i dont know that.
0 Kudos
Message 36 of 57
(1,993 Views)
USING WHILE LOOP STRUCTURE

The program is better, when i pressed the external stop data sending from pic, the subvi wait to timeout and stop the vi. But success the inversal problem.
If i am sending data and i dont stop send data, i press the stop bottom in the main vi, the subvi doesnt stop and continue running....
If you look at the video, when arrive to the value read from reference.... it say FALSE!! and i have the bottom pressed!!. it must to say TRUE!. Thats why the program doesnt stop!. Even the reference bottom is inside of while, it must to read each cycle of structure... i dont understand!.

Do you know what is the problem?, i never saw the status correct of the reference.

Regards,Fonsi.


I could use the 2 structures, i dont worry use the for loop, and wait the 120 reading to stop with the bottom main vi, but also run if the timeout is over time....
Message 37 of 57
(1,990 Views)
Hey CC,

I know what was the problem!!, the button fail for 'the property node reset to default The vi'. I removed the p.node and it run ok!.

Now, when i send data from the pic, and press stop in main vi, the vis are stopped!.
And, when i stop with external bottom in the pic, the subvi stop when cover the timeout , in this case 5000ms, the subvi close....BUT NOW THE PROBLEM is, if i try to stop the main vi, i can not............

The error is in the queue vi. i believe it wait any new data...
Any fit to, when the subvi close i could to close the main when i want...???.

Regards,Fonsi.
0 Kudos
Message 38 of 57
(1,979 Views)
Hi Fonsi !

Seemsq that you are doing some progress !
Just add a timeout to the Queue vi in the main loop as I told you in my previous post...

CC

Message Edited by chilly charly on 04-03-2005 08:59 PM

Chilly Charly    (aka CC)
Message 39 of 57
(1,976 Views)
Hi CC,

Like this capture?.

Which value use?.

Regards.
0 Kudos
Message 40 of 57
(1,966 Views)