05-04-2015 11:52 PM
I am using an EV3 Cube to scan a sheet that represents a binary number; i.e a black line represents a 1 and a white line represents a 0.
Using this, I generate a numeric array consisting of 1's and 0's and convert them by using an Index Array to divide them into a single digit, use a quick comparison (!= 0) to generate their Boolean values, then using the Build Array block, I turn it into a Boolean array.
However, despite this, while using the Convert Boolean Array to Integer block, I receive an error which I do know the reason to.
If anyone could help me, I would be greatful! Thank you.
(By the way, I am a Freshman engineering student with no prior knowledge of LabView, just a year of C++ and 2 years of Java to help me. So thorough explanations would be much easier for me to comprehend)
Attached are pictures of my code along with the error I receive.
http://i.imgur.com/oIT13Rt.png?1
Solved! Go to Solution.
05-05-2015 12:29 AM
I guess that function is not supported on the EV3, just guessing. What are the rest of the words in the error message (currently cut off)?
On a side note, I think you could dramatically simplfy the code by using "split array" and to the !=0 on the two arrays, then simply reverse the arrays to get the current output.
05-05-2015 12:32 AM
Thanks for your response!
I know for a fact the function is working on the EV3, because I have a friend who uses the same function on the same project we are working on. Hers works however mine doesn't despite being the same boolean Array!
Anyways, here it is:
http://i.imgur.com/1pXrK96.png?1
Yes, that probably would work as well, but in my case, if it works, don't fix it! lol
05-05-2015 01:22 AM - edited 05-05-2015 01:34 AM
Hi Miguel,
the error dialog clearly says "function not supported in current target"…
This is a replacement for your BooleanArrayToNumber use case:
(It also includes Christian's comments on your convoluted check of the array elements.)
Edit: you can in this use case get rid of the ReverseArray node and just reverse the array constant…!
Side note: Please attach images directly in the the forum message. Links to 3rd party website create problems when reading the forum through a company firewall…
05-05-2015 01:30 AM
This will work. Thank you very much for your time!
Miguel