11-22-2019 01:21 PM - edited 11-22-2019 01:59 PM
I'm very new to block programming, this is the first VI I've had to make so far, but i see more in the future coming up. I'm using a cDaq, and I'm having a heck of a time blocking in a counter for my system. Either what I put keeps the system running in a continual while loop, or it doesn't count. I've tried using the "Fill VI" to set a count, but I'm not having success.
Essentially, I'd like for a single count to be added every fill.
Solved! Go to Solution.
11-22-2019 01:33 PM
The same way you'd be annoyed if I sent you a PNG of a 300 line Matlab program (with very tiny type) and asked your help in fixing it, I'm very annoyed if you provide a (very tiny) picture of your LabVIEW code. I cannot easily examine the code, I certainly can't edit it, I can't see the "hidden Cases" of Case Structures, and I can't try to run it (unless I spend my own time trying to "copy" and reproduce your code).
Please help us to help you by attaching your VIs.
Bob Schor
11-22-2019 01:55 PM
It would also be good to include the hardware and software you are using for this data acquisition.
11-22-2019 02:03 PM
Cards: 9205 x 3, and a 9482. Apparently the snipped that was attached didn't function.
11-22-2019 02:04 PM
Two tips, unrelated to counters.
1. You don't want to create and clear tasks every iteration of your while loop. You should create before the loop starts, clear after its done. Only put the Reads in the Loop.
2. You are at risk of locking up your VI cold. You have a lone event structure set to wait for the start button, but the event is set to Lock Front Panel until Event Completes. That is fine the first time you press the start button. But if you happen to press it again, you'll lock up your VI and there is no execution path to get back handling that event in the event structure again. Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help
11-23-2019 11:51 AM
Thanks all. I've noted the comments, and will wait for help with some of the more experienced folks in my company so that however the final write is made, anyone of them can work on it at a later time.
Have a great day Bob Schor.