Hi all,
I am working on a DAQ program that collects pressure data (voltage) and
controls a stepper motor (handmade interface to the motor) . For the TTL
pulses to the motor I use GPCTR0_OUT. Furthermore, GPCTR0_OUT is
connected to PFI3/GPCTR1_SOURCE to count the pulses on GPCTR1_OUT.
My program has 3 parts:
part 1 & 2:  the DAQ unit - a while loop with AL-READ.vi inside as well
as the "Events counter &timing.vi" to count the pulses on GPCTR1_OUTwith
the rate of the DAQ (100Hz)
part 3: Pulse Train generation for the motor. I am using Pulse Config.vi
and Couter start.vi outside a sequence to start the Pulse Train.
In the while loop of  AL Read the incomming data is compared to a
threshold and sets an occurence if th
at threshold is reached. This
occurence starts the sequence of the Pulse train. so it stops the pulse
train in frame 1 with counter stop. Then, in frame 2 I have a waiting
sequence of 10 sec and the motor direction is switched to  ccw, in frame
3 the motor should be started again with a finite puls train with the
number of pulses read at the first stop of the motor, but if it comes to
call the finite pulse train.vi I always get the error message "-10042
occured at CTR Control". If I run only Part1 and 3 or part 2 and 3 the
system is working fine but as soon as all parts should work together I
get the error message.
 I know that there must be something with the used counters...that I
might have to reset or reconfiger them before i call the finite pulse
train, but I do not know how to do that in detail (which config vi`s in
which order to use). I also think that the finite pulsetrain.vi might
uses 2 counters but again I do not know how to connect externally or why
they interfere with eac
h other.
I hope you can help me soon.
Thanks to all who can help me.
Have a nice day
TOM
T_Olbrich@hotmail.com
Sent via Deja.com http://www.deja.com/
Before you buy.