LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

optimise serial operation

hi all,

I am new at labview and (unfortunately) using an older version of labview at my workplace (ver 6.1). I have attempted a user interface for a RS232 equipment but I am aware that the subVI's i used are archaic. Please do refer to the attached vi.

The update rate of the vi is bareable but it could definitely benefit from being faster. as of now the wait function sets the pace of read/write. is there a way of like using the carriage return termination as a 'trigger' to move on to the next read write operation?

I am open to any advice and suggestions.

Thanks in advance!
0 Kudos
Message 1 of 2
(2,186 Views)
Hi swngiam,
first of all, LV 6.1 does support VISA serial communication, that would allow you to benefit of character-terminated read operations.
If you don't want to rewrite all reads and writes, you can use a vi similar to the attached one, where the program wait for the trigger character and stop reading on receiving it.
Actually the vi sends a command and wait for a CR terminated answer, within a 3 s timeout. Adjust the timeout and the wait interval to tailor your needs.

A further remark: the vi diagram is a real mess.  Overlapping/clustering structures is not a good way to get maintainable code. I  suggest you to use an event structure, where each button could be managed in an independent way.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 2
(2,168 Views)