07-01-2015 02:54 AM
Hi, all. I have to set variable samples per chanel for sample clock. I want to take that samples from counter input with different number of edges for every second (different speed of metal plate). What can i do for that task? Is there a god example for this problem?
Thanks.
Solved! Go to Solution.
07-01-2015 03:56 AM
Hi stefo,
what exactly is the problem?
You can set sample rate using DAQmxTiming function and you can read different amount of samples using the "number of samples" input of DAQmxRead function…
Btw. do you really need MatLab nodes to calculate those simple formulas in your screenshot?
07-01-2015 07:05 AM - edited 07-01-2015 07:07 AM
Hi, GerdW. Thanks for reply. I want Sample Rate and Samples per Chanel to come from couter. CI is a metal plate with 52 tooth. The speed of metal plate is 500 cycles/min but it is not constant ( may be 490-520). For example rate of cycles is 500/60=8.33 cycles/sec. Rate of edges (tooth) is 8.33*52=433 edges/sec, but when speed goes over or under 500 the rate is different. How to put that variable samples in sample clock on AI?
P.S. Matlab script is to calculate max samples per chanel for mean function in while loop. In the picture control "Speed cycles/min" is that 500 cycles/min speed. I have to put in that control the variable rate of edges. Other solution is to set 1 sample per edge, but i have problem here to :).
07-01-2015 07:25 AM