05-19-2015 01:50 PM
Try running yoru VI with highlight execution on. Then you'll learn a lot about how your VI works.
You don't want to subtract from 2. You want to subtract 2 (at least according to your original message.).
Put a wait function inside your loop and the indicator back in there. That will slow down the loop execution also so you can see each and every step.
Finally. Actually First. TAKE THOSE TUTORIALS.
05-19-2015 02:07 PM
I have tried a lot of times, but I just need that for every time then loop goes from the first value would be subtract 2, 300-2 then got 298 and from the last value, 298, would be subract 2 again and so on. Could you might help?
Thanks
05-19-2015 02:12 PM
I did help. Make the simple changes I suggested.
05-19-2015 02:15 PM
I did, but I only got 298 and the value dont goes to for every 2 values.., hmz.., could you take picture for example how it should look?
Thanks
05-19-2015 02:16 PM
Attach your VI.
05-19-2015 02:28 PM
I have tried, but got message - The attachment's passvalue.vi content type (application/labview) does not match its file extension and has been removed. Could you create your own VI and attached I will download.
Thanks
05-19-2015 02:39 PM - edited 05-19-2015 02:41 PM
Like this.
05-19-2015 02:44 PM
Super!!!! It works, thank you very much. Respect 🙂
05-19-2015 02:45 PM - edited 05-19-2015 02:48 PM
The problem here is this task is so simple that we can't show you anything without basically doing your homework. You need to stop randomly trying things and think about the problem. This is common problem for people new to LabVIEW, they get tempted to just connect wires in new places and hope that will give them correct results. That's BAD because even if you do get correct results it may not work in all cases and you will have a bug that's very hard to debug.
So, In your last block diagram you are subtracting 300 from 2 (2 - 300 = -298) on the first iteration of your loop. Is that what you wanted to do... I don't think so. So fix that first. You also said Yes, it should stop at zero AND Yes, it should loop 300 times. Think about that and you'll see the two are mutually exclusive if you're subtracting 2. You need to pick one or the other.
EDIT: Oh well, never mind then.
05-19-2015 02:51 PM
@JohnP2356 wrote:
Super!!!! It works, thank you very much. Respect 🙂
You're supposed to mark Raven's Fan's post as the solution. Not your own.
Don't worry. This happens a lot and I think you can change it if you want. Just pick his post.