01-14-2012 12:46 AM
Hello All
I have attached a zip file which containe some vi's. The vi's are downloadable from a manufacturers webiste to aid in the use of their products.
see here: http://www.phidgets.com/products.php?category=0&product_id=1018_2
The vi(s) are used with a board that has 7 digital inputs (0,1,2,3,4,5,6,7). However the attach vis' only allows a single channel read.
I will be reading a pulse train at each channel input, but don't want to replicate the code for each channel.
I have considered using a For Loop to handle the polling through the channels (with an array attached to the vi channel input control), but how to go about indicating the output of all the channels ( a puls train remember), I am totally at a loss.
Could you please suggest how I might modify the vi to allow all 7 channels to read a pulse train appearing at the inputs, and display it either as a graph or boolean (doesn't really matter which)
Thnaks for your assistance
Regards
Ray
Solved! Go to Solution.
01-14-2012 11:34 AM
I am not sure how your hardware would work, so you may have adjust the timing/s. For now I have disabled the h/w acquisition section and I'm generating random data. Hope this helps.
01-16-2012 01:54 PM
Hello .:aCe:.
That worked a treat. Thank you.
I can't see an easier way of doing it, so do you mind if I hijack this little snippet of code to use in my application?
I will mark this as the solution and give you the k's
Regards
Ray
01-16-2012 05:13 PM
Ace,
Your Decimate Array/Build Array combo looks like it could be replaced by Reshape Array. I don't know exactly what you are trying to do, so I can't say for sure.
01-16-2012 10:17 PM
Ravens Fan,
I was trying to extract every 8th element in to an array. This is an Implementaion using reshape array.
@Ray: please feel free to use the code as you wish, glad I could be of help.