I have an application for a 6602 where I need to do the following:
1) Route signals as such:
- GPIO (PFI0) --> RTSI0
- CTR1_Out --> RTSI1
- CTR2_Out --> RTSI2
- CTR3_Out --> RTSI3
- CTR4_Out --> RTSI4
Note that I don't need to use those specific PFIs and Counters, I can use any of them.
Furthermore, I also need to be able to do the following:
- The GPIO line is controlled independantly through SW.
- The Four counters are outputting synchronized square waves (CO FREQ), but at different phases (custom stepper pattern).
- This will be used in parallel with a SCXI system running an analog acquisition, and I need to be able to do one of the following:
- Pulse the counters a fixed number of pulses, then check the analog input from the SCXI
- Run the counters continuously, but synchronize the analog input to the rising edge of the first counter. I need to be able to, while running, to know the voltage at a specific coutner step number.
My first stab was to route PFI0 to RTSI1, then the four counters as above. Apparently this was the wrong order, becasue the PFI0->RTSI0 route interferes with the RTSI4 route. Unfortunately, the hardware we designed for this requires that the GPIO be on RTSI0.
I also am unsure how to get the counters synchronized; If I place them all in one task, they apparently are in sync, but I can't run a fixed number of steps (only continuously).
Will this work?
- Set up all 4 counters in 4 different tasks, using a fifth counter as a timebase. Start them.
- Start the fifth counter to run the other 4.
Also, to provide a sync signal for data acquisition for the M-Series card running the SCXI chassis, I would add another counter to the four that is set up exactly like CTR0, and then route that one over the RTSI5 pin to use as a scan clock for the SCXI.
What do you all think? The big thing is getting that GPIO signal on RTSI0.
Another option is to use a GPIO from the M-Series card on RTSI0, but can this be done if the board is running a SCXI controller?