04-15-2013 03:17 PM
I think you can do this if you set the VISA timeout so the serial read will error if it doesn't receive data after a certain time. Just make sure you handle this error. Basically, the serial read will error-out, say every 100ms, so the exit button can be evaluated.
04-15-2013 03:43 PM
@Japper wrote:
I have cleaned this up a bit
You have still way too much duplicate code. I would use a string array with the key characters, the use "search array" to process further. Maybe the attached draft can give you some ideas.
(I did not fix your wait issue).
04-17-2013 03:39 PM
@altenbach wrote:
@altenbach wrote:
You have still way too much duplicate code. I would use a string array with the key characters, the use "search array" to process further. Maybe the attached draft can give you some ideas.
Thanks Altenbach-
It does seem to be a more direct way of doing it but very messy when I add all 62 buttons:
04-17-2013 03:59 PM - edited 04-17-2013 04:18 PM
Put your bools in a cluster....then use array to cluster and set the size insert into the for loop, making sure your reorder of the bools matches your assigned array element indexes...and then you can hide the cluster border by making it transparent