LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

table

Hi I have this problem when it comes to the data written in the table. How do I remove those "0.0000" whenever my system does not read something?

 

I need answers please Smiley Happy thank you

0 Kudos
Message 1 of 14
(2,622 Views)

Put the part of the code that places data into the table in an event structure so that it only puts the data in when the value is not equal to zero.

0 Kudos
Message 2 of 14
(2,620 Views)

Simply don't write to the table when you don't read something. A simple case statement will do the trick.

 

You don't show the block diagram which is important!

 

p.s. Using the run continuous button is not recomended except for special debug purposes. Use a while loop.

0 Kudos
Message 3 of 14
(2,619 Views)

Here's the VI Smiley Happy Hope you could help me Smiley Happy Thank You Thank You... do I need to create a new loop?

 

-Gabriel

0 Kudos
Message 4 of 14
(2,605 Views)

No.  You don't need a new loop.

 

You do need to move the serial configure before the while loop and the VISA close after the while loop.

 

Detect if your Read string is empty.  Put all of your table building stuff in the false case of a case structure.  In the true case, just wire the 2-D array wire straight through.

 

I would get rid of the Bytes at Port stuff on the VISA.  Since you seem to be using the termination character, I would just read a large number of bytes with the VISA read.  The VISA read will end as soon as it receives the termination character.

0 Kudos
Message 5 of 14
(2,601 Views)

Thank You! I am trying it rght now but still can't figure out on what to do with the event structure itself. I am a newbie in LabView please assist me. Also, I am attaching the corresponding VI for you to check Smiley Happy Thanks a  lot!

0 Kudos
Message 6 of 14
(2,596 Views)

I never talked about an event structure.

 

And this VI looks identical to the one you posted a couple messages ago.

 

Here is a fixed VI.

0 Kudos
Message 7 of 14
(2,594 Views)

Sorry for the confusion about the event structure, there was a person tryng to help me too. Anyway I tried th VI that you edited. The problem is, it only lags data with 0.00 in it. Thank You for answering my questions. You are of great help! Smiley Happy

 

I attached the output as well as the VI I used.

Download All
0 Kudos
Message 8 of 14
(2,575 Views)

Swap the cases in the case structure!

0 Kudos
Message 9 of 14
(2,564 Views)

Hi sorry for the late reply. It worked Smiley Happy 

 

However, I have another problem - I am just using a programmed data to be read by LV; it tabulates. Now, my friend is sending me real time data (wherein if there is no data, the data to be sent bby the microcontroller is a random number) and the LV does not read anything. Is there a possibility that LV reads only predefined data? or is there a problem in the microcontroller codes? Thank you Smiley Happy

0 Kudos
Message 10 of 14
(2,530 Views)