09-14-2017 07:04 AM
Hi,
I am interfacing a weighing scale to LabVIEW through VISA serial.
When weight is placed on the weighing scale ,it generates the string "[xxxxx]" where 'xxxxx' is the weight in grams.
The simple serial read VI that I have attached can read & display the weight very easily.
But I also need to count the number of readings with date/time stamp for recording & report generation.
I tried event based programming without success.
Any pointers please ?
Solved! Go to Solution.
09-14-2017 01:27 PM
First, a few questions.
Now to answer your requests.
09-15-2017 02:28 AM
Thanks for your reply Minions.
This is indeed a transmit-only device without any termination character. So I have to eliminate the '[' & ']' and get the weight string.
The scale transmission is asynchronous & unpredictable......it can come in any time.I have to record the no. of transmissions with a date-time stamp.
But my main problem lies in generating an event flag to indicate that a packet has arrived.It seems that the VISA serial input buffer is not getting flushed even if I deploy the flush buffer or clear buffer functions & is holding on to the last value.
09-15-2017 06:57 AM
Normally, you will see topics about avoiding the use of the "Bytes at Port" vi which is not the correct statement. It should be that in most cases, it is used improperly. You usage case is one of the appropriate times to use this function. See the modifications that I have attached in LabVIEW 2017.
09-15-2017 08:53 AM
Thanks a ton.
I shall try out & let you know as soon as possible.