From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-27-2018 09:09 PM
hello,
I would be happy to receive help with the simple interface I prepared.
If you can tell me how I can arrange the code so that the data will remain on the screen and will not disappear after each press of a button or switch.
feels like it cleans the buffer like the command flushall();.
I attached the VI.
Solved! Go to Solution.
06-27-2018 09:15 PM - edited 06-27-2018 09:20 PM
There are some strange constructs in there. What does True greater than a boolean control supposed to mean? I had to test it out to find out the result is the same as using a NOT function.
And the code doesn't seem to do much. You have stuff going to a Command string indicator, sometimes. But it doesn't go anywhere else. I would expect it to to be sent to some instrument.
The problem is that you have number of tunnels in the case structures and event structure set to "Use Default if Unwired" and a number of cases where they are unwired. So numbers return zero, and strings return empty strings.
If you want values to maintain between iterations of the while loop, put the values on a shift register and wire the shift register through to the tunnels in any case where you don't want the value in the indicator to change.
06-27-2018 10:32 PM
At the end of the interface will call with a generator signal.
Regarding your question, this shift is made in order to prevent "working" with two frequencies, I want to avoid this possibility.
I understood what you are saying and just do not understand how to fix this issue because I know that you are using a shift register in loops
06-27-2018 11:02 PM
ok i found what to do thanks!
06-27-2018 11:13 PM
@Matanlaza wrote:
Regarding your question, this shift is made in order to prevent "working" with two frequencies, I want to avoid this possibility.
What are you talking about in this sentence when you talk about "this shift"?
06-27-2018 11:40 PM
Comparison
06-28-2018 08:59 AM - edited 06-28-2018 09:07 AM
Since True greater than a boolean is the same result as NOT, it would make more sense and be cleaner code to replace it with a NOT.
Since it looks like you are trying to make sure only one button is pressed, (This AND NOT button 2 AND NOT button 3 AND NOT ....), it would make more sense if you used a radio button control. Then when you press one button, any other button returns to False automatically. Right now it seems like you have to manually unclick one button and then click the button you want. Very user unfriendly.
If you do that, you don't need so many comparisons and case structures, you can have the radio button control drive a case structure directly.
07-01-2018 01:04 AM
You are absolutely right, I got your comment and it is very important to think about the user. I thought more about how to do the software itself to learn and I did not take into account the user.
Thanks!