02-15-2006 02:27 PM
02-15-2006 02:34 PM
02-15-2006 02:35 PM
The com port gets configured by VISA Configure Serial Port so if you only call this once in your program, it will only get configured once. Usually, a program has a while loop in which the main code resides. The configure would be done outside the while loop. You put a delay in the program with a Wait (ms) or Delay function. These are on your Time & Dialog palette. You flush the buffer with the VISA Flush I/O Buffer function. This is on the VISA>Visa Advanced>Interface Specific palette.
The example is just a starting point. The entire thing is not intended to be used as a subVI or run continuously. The configure serial port and the VISA close functions are things that would normally be done once you write your own program.
02-15-2006 03:32 PM
Hello,
What is MAX and how do your configure it to automagically configure the com port parms?
02-15-2006 04:03 PM
Hello,
I agree and understand the concept of having "the main program" inside a while loop and the com port fig is before the while loop starts and the com por close is after the main while loop ends. The problem I am having is the GUI/visual programming enviornment in Labview. So in order to present a screen/dialog to the user to specify the comport parms, do I have to create another while loop that when it is exited goes into the main while loop? So do I have a boolean button defined in the first while loop that is pressed when the com port config is complete that will allow the program to go into the "main while loop". I think that you are right is that I naively assumed that the Basic serial read and write example can be used as a standalone vi.
02-15-2006 04:51 PM
02-16-2006 10:08 AM