10-12-2018 03:09 AM
I am the one sending data manually using XBEE module and probe window. I'll work on your suggestion. But how can we check the data of the string queue? do we use "get queue status"?
And, the cases you refer are: 1st case (1A0 and the others) and 2nd case is what?
10-12-2018 03:11 AM - edited 10-12-2018 03:30 AM
Hi PJason,
So what can you suggest with the architecture?
What do you want to achieve?
Using a queue to decouple processes is quite common and recommended.
Maybe you first should make sure your processes (like that VISARead) is running smoothly and correctly…
And, the cases you refer are: 1st case (1A0 and the others) and 2nd case is what?
The other case is "default", when no tag of your tag list is found.
10-12-2018 03:29 AM
Yes, the VISA functions perfectly after I applied the suggestion of GerdW.
So how can we reframed the architecture? Should I have a Timeout in the Login dequeue and also in Data dequeue?
10-12-2018 04:10 AM
I've tried your solution and it seems that VISA read would only send the data once a timeout occurs and the data are in bulk. Also, the middle loop simply just matches the index of the current data and ff its true, the index will increment and starts match again with using the previous index
And as I what have observed, the response of the VI somewhat slows down. I'm confused now, please enlighten me. Please see the attached VI if there are any mistakes I've made
10-12-2018 04:31 AM
Even Now It wont work as Expected as you are dequeuing two queues in the same loop, as you wont get data for both queues at same time, so it will wait till both gets dequeued.
10-12-2018 04:33 AM
Hi PJason,
it seems that VISA read would only send the data once a timeout occurs and the data are in bulk.
You have configured your VISA connection to wait for TermChars. (Read the help for VISAConfigureSerialPort!)
That's why I removed BytesAtPort: the VISARead will output the received string as soon as it receives the configured TermChar! As it seems you don't use such a TermChar (or the wrong one) and VISARead waits until the timeout occurs: either set the correct TermChar or read just 3 chars (as it seems that's what you want)!
When reading just 3 chars: keep an eye on synchronization between your sender and your VISARead loop. (Using a TermChar would make that much easier…)