01-19-2006 02:06 AM
01-19-2006 02:07 AM
01-19-2006 02:08 AM
01-19-2006 07:15 AM
Hi HFZ,
I do not have LV installed at my PC at the moment. I will look at your vi's as soon as I can.
"i cant control a while loop by a start/stop switch as Global variable!"
You have to be careful when using Global Variables... I will need to see how you implemented it. It should be easy to solve.
Ray
🙂
01-19-2006 08:44 AM
01-19-2006 12:02 PM
Hi HFZ,
It is interesting how you are using Globals as controls. I would recommend not using them for this.
Let’s start with the Start/Stop switch. Yes, it will control the Case Structure, but that’s about it.
Please explain how you wish to control the outer loop and why you are using a Global. You can force no action by sharing the stop logic with other Case Statements, but we’ll talk about better approaches later, for now, I would clean up the globals. Unless it is used somewhere outside the jpg picture, I would remove the Start/Stop global. If you want the outer loop to stop upon selecting Stop, the wire the switch directly to the Loop Control (remove the T/F selector) and set the while loop control to “Run If True” (right click on it to change selection. This is if the switch is True in the Start position, otherwise reverse the logic at the loop control.
5000 char limit, so this is part 1
01-19-2006 12:02 PM
here is part 2 (they need to extend the 5000 char limit 😉 )
You may want to pay attention to the data flow between the Data Read and the rest of the vi’s components… we’ll cover that later as well. But basically, you can control the flow of data (or events) by cleverly routing the Error Cluster wire
You can move the VISA Resource Name 2 closer to VISA Write, unless it is being used by other vi’s. I try to keep items closer.
Try to remove the following samplerate global by wiring it directly to the Num to String vi
Also wire the two Boolean controls “Data” and “flow” directly to the selector.
I suspect that the vi is not yet finished, because you have a Case Statement with a [C] which goes nowhere. Same with the VISA Resource Name 3.
Now I see your problem. You are trying to stop the inner loop by looking for an empty string after the subset of a carriage return. Actually, this will not work unless you terminate your string with a carriage return, at the moment, it ends with pw=a go, so you’ll never get a matching situation with an empty string. Define what should stop the inner loop.
This is a start. Hope it helps.
Ray
01-19-2006 12:07 PM
That is strange... Below only has 1961 characters... so why do I keep getting exceed max char 5000 limit???
Anyway, here is another try to post my original message: (sorry)
Hi HFZ,
It is interesting how you are using Globals as controls. I would recommend not using them for this.
Let’s start with the Start/Stop switch. Yes, it will control the Case Structure, but that’s about it.
Please explain how you wish to control the outer loop and why you are using a Global. You can force no action by sharing the stop logic with other Case Statements, but we’ll talk about better approaches later, for now, I would clean up the globals. Unless it is used somewhere outside the jpg picture, I would remove the Start/Stop global. If you want the outer loop to stop upon selecting Stop, the wire the switch directly to the Loop Control (remove the T/F selector) and set the while loop control to “Run If True” (right click on it to change selection. This is if the switch is True in the Start position, otherwise reverse the logic at the loop control.
You may want to pay attention to the data flow between the Data Read and the rest of the vi’s components… we’ll cover that later as well. But basically, you can control the flow of data (or events) by cleverly routing the Error Cluster wire
You can move the VISA Resource Name 2 closer to VISA Write, unless it is being used by other vi’s. I try to keep items closer.
Try to remove the following samplerate global by wiring it directly to the Num to String vi
Also wire the two Boolean controls “Data” and “flow” directly to the selector.
I suspect that the vi is not yet finished, because you have a Case Statement with a [C] which goes nowhere. Same with the VISA Resource Name 3.
Now I see your problem. You are trying to stop the inner loop by looking for an empty string after the subset of a carriage return. Actually, this will not work unless you terminate your string with a carriage return, at the moment, it ends with pw=a go, so you’ll never get a matching situation with an empty string. Define what should stop the inner loop.
This is a start. Hope it helps.
Ray
01-20-2006 08:12 AM
01-20-2006 02:06 PM
Hi HFZ,
You are welcomed and you can post your vi.
Ray
😄