01-21-2016 08:20 AM
Hello everyone,
I'm currently tring to make a LED lamp blink in 5 different freqencies due to differenceses in voltage. I have made the 5 differnet cases for 0-1, 1-2 , 2-3, 3-4, and 4-5
Is there any smart way to make the program decide which case to run. I hvae 5 boolean values to select the 5 different cases.
All help would be appritiated 🙂
Solved! Go to Solution.
01-21-2016 08:31 AM
Use the Boolean Array to Number. Right click the case structure and change the radix to binary. Binary will probably make it easier to understand which case is which.
01-21-2016 08:32 AM
01-21-2016 08:43 AM - edited 01-21-2016 08:49 AM
I like this solution
Instead of the attached VI you could use the Search 1D Array- function from the array palette.
It is important to say, that the enum has to be typed to U32 for the typecast to work!
01-21-2016 08:47 AM
Since it is not possible to attach a vi due to weird type mismatch of application/octet-stream I insert it as a snippet:
01-21-2016 08:52 AM
Hello m3gney.
You should better use an Array than several bolean displays. As the blincking frequency couldn't be the same as the acquisition frequency, you shouldn't do it in the same process.
The idea could be to create two loop, one for the acquisition and one for the blincking led.
I made you a VI
Good luck.
01-21-2016 09:48 AM
Put your 5 buttons in a Radio Buttons cluster, then just wire its terminal to the case selector.
01-22-2016 06:11 AM
Thanks a lot for all the great help! I managed to fix the case structure, but now I have a new problem. I'm getting two different error messages
Error (-201003) and (-200279) and I have no clue how to solve it. The rest of the errormessage (-200279) is below the picture.
Possible reason(s):
The application is not able to keep up with the hardware acquisition.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0
Task Name: MyVoltageTask
Again, thanks a lot for all the help.
01-22-2016 06:41 AM
You should start a new thread since this is another topic. This will increase the chance to get appropriate help.
01-22-2016 06:53 AM
Will do.
Thanks for all the help! ![]()