06-15-2012 10:22 AM
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 thank you
06-15-2012 10:26 AM
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.
06-15-2012 10:27 AM
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.
06-15-2012 02:26 PM
Here's the VI Hope you could help me Thank You Thank You... do I need to create a new loop?
-Gabriel
06-15-2012 02:34 PM
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.
06-15-2012 02:46 PM
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 Thanks a lot!
06-15-2012 02:51 PM - edited 06-15-2012 02:55 PM
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.
06-15-2012 10:59 PM
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!
I attached the output as well as the VI I used.
06-16-2012 09:51 AM
Swap the cases in the case structure!
06-28-2012 03:43 PM
Hi sorry for the late reply. It worked
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