Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay with serial read

Well, I was correct about the event structure not running. You do not have it inside a while loop. The only way you could get the appearance of it runnings is if you are using the run continuous button. That is not the correct way to execute a VI. I'm not sure exactly what the Programmed and Manual modes are supposed to do. I suspect that you could accomplish what you want by placing a case statement inside the while loop with a single Boolean wired to it. Have one state labeled Programmed and the other state labeled Manual.
0 Kudos
Message 11 of 13
(1,012 Views)
well i dont have it running continuously, i have it compiled into an .exe so unless it runs continuously by default it works
0 Kudos
Message 12 of 13
(1,007 Views)
I don't know how you configured the build but It's still bad style. You don't really want to run the whole VI. That would mean that with every iteration, you are also doing the VISA Configure Serial Port. That just wastes time. If you want to use an event structure, you can place one inside the while loop. In the timeout event, place the code you have now in there. Specify a time in milliseconds that would be how often you want code to run. Then, create a value change event for your Progammed button. Put the VISA Write and the VISA Flush I/O Buffer in that event. No need for a Manual event. Also, place the terminal inside the event structure. Something like the attachment.
0 Kudos
Message 13 of 13
(996 Views)