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.
07-14-2020 06:04 AM
Hello,
The attached vi is part of a code used to control in the Single-axis Stage Controller.
in the second frame of the flat sequence, I read the current position.
But in the third part, I will use this value of the current position in another goal.
Or, I want to show the current position during the while loop works.
As you see now. as the loop start. the update of the current position is stoped. Only the final value will appear after the loop is finished.
And also, if I build all the second part of the sequence (reading current position), inside the loop, the value will not be updated.
Do you have an idea of how to update the current value inside the loop.!!
Solved! Go to Solution.
07-14-2020 06:51 AM
A few cosmetic things you really need to fix:
1. Your terminals need to have labels. As it is now, you have no clue what control is wired up where. This will bite you hard very soon.
2. You should work on eliminating your local variables. You can simply wire values through your structures to propagate the value. I am specifically looking at the Port here.
As far as your issue, just copy the code in your second sequence frame into your loop and you can constantly update it.
07-14-2020 07:14 AM
Thank you for the advice,
I already try to copy the current statues code inside the loop, but i get nothing
07-14-2020 07:15 AM - edited 07-14-2020 07:17 AM
Hi BaJa,
as crossrulz said "no locals, no sequence frames":
Your (missing) subVIs should get the usual 4224-pattern connector and support error IO to allow for easier DATAFLOW programming!
Why did you hide all terminal labels in the block diagram???
(The loop probably needs some wait statements…)