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.
01-26-2018 07:48 AM
Hello All!
I am looking for a solution where I can manipulate a FOR Loop to start iterating not at a value of 0 but e.g at 201 and continue the loop till the 500.
I am displaying the frame numbers of a video file from 201 to 500 by using a horizontal slider. Instead of the slider starting from 201 to 500, the slider displays the frame numbers from 0-299. In order to achieve this, I want to manipulate a FOR Loop to control the slider.
So can someone suggest me how to manipulate a FOR Loop to start the Iteration at 201 and not at 0.
Solved! Go to Solution.
01-26-2018 07:53 AM - edited 01-26-2018 07:54 AM
Hi enthusiast,
so you want to add an offset to your iteration count?
Then just do this: add 201 to the iteration count!
(Usually a FOR loop will not control a slider, but the slider will control the way the FOR loop works…)
01-26-2018 07:58 AM - edited 01-26-2018 08:04 AM
Yes, exactly. But , how can I give offset value to the 'i' term of the FOR Loop. It doesn't allow. Can you please show me how? I would be grateful to you.
PS:Below is the attached VI . Check only the State 2.
01-26-2018 08:07 AM - edited 01-26-2018 08:07 AM
@enthusiast4 wrote:
how can I give offset value to the 'i' term of the FOR Loop. It doesn't allow. Can you please show me how?
01-26-2018 08:24 AM - edited 01-26-2018 08:29 AM
Thank you. Can you tell me how I can control the slider such that it starts from 201 and stops at 500 i.e when frame numbers: 201-500 are displayed on the Image Display simultaneously the slider displays those particular frame numbers. I am not able to relate the both. Somehow the slider displays it starting from 0-299, instead of 201-500.
01-26-2018 08:42 AM
Use a property node to set the Data Entry Limits->Maximum and Minimum.
01-26-2018 08:48 AM - edited 01-26-2018 09:00 AM
Hello All!
I am trying to display the frame numbers of an AVI file by using a horizontal slider. I have programmed such that the AVI file runs only for the frames 201-500. Next, I want to display those frame numbers on a horizontal slider such that the slider starts from 201 and ends at 500.
But, the slider displays it starting from 0-299, instead of 201-500.
Can someone suggest me what I am doing wrong as I have spent hours trying to find a solution but I am stuck somewhere.
PS: Below is the attached Code. Check only the state 2
01-26-2018 08:54 AM
I have tried that too. The slider shows as 201-500 when I change the property node of the slider to min: 201 and max: 500. But, while run the VI the slider again starts from 0-299 instead of 201-500.
01-26-2018 12:01 PM - edited 01-26-2018 12:10 PM
Assuming the slider is an indicator, make sure it is wired to the output of the addition, not the iteration terminal. And make sure the slider terminal is inside the loop.
(Sorry, posting by phone, cannot look at your code)
If the limits are always the same, you don't need property nodes.
01-26-2018 02:08 PM - edited 01-26-2018 02:08 PM
@altenbach wrote:
Assuming the slider is an indicator, make sure it is wired to the output of the addition, not the iteration terminal. And make sure the slider terminal is inside the loop.
(Sorry, posting by phone, cannot look at your code)
If the limits are always the same, you don't need property nodes.
Thanks a lot. I will look into it again once I am back on Monday. Not a problem. Thanks again