02-13-2007 04:52 AM
02-13-2007 09:26 AM
Only a couple generic little thoughts.
Have you tried ignoring the Z-index? Are you still off by a factor of 2? I know that using Z-indexing successfully with a two-pulse encoder tends to be tricky to get right. It may even be impossible to get completely consistent behavior in both directions, depending on exactly how the manufacturer chose to sync the Z-index to the Up and Down pulses.
Are you certain you've got your scaling set up properly, with the right value for "pulses per rev?" One way to troubleshoot:
Set up scaling with units="ticks." When you read the count value, read it as a U32 (an unsigned 32-bit integer). See whether the # of actual counts seems to be right. If so, then perhaps you've got a scaling problem.
Don't know anything at all about how to interact with a 6602 from Simulink. Is it possible that the interface to the board through Simulink only gives you a subset of the board's inherent functionality?
-Kevin P.
02-28-2007 09:26 PM
Dear Kevin,
yeah ! I was instructed by my Prof to use the PCI6602 with the xPC (Matlab) in controlling the machine. However, until today; I still cannot get any acceptable results from this connections!
In my project, I used ZYGO-ZMI 501 Laser Measurement System: ZMI 501 Displacement Measuring Interferometer System. I have set the output from the encoder as Quadrature output signal. Since this encoder is negative trigger signal, so I connect the Ch1_A* to SOURCE_0 (pin-2) and Ch1_B* to UP_DOWN_0 (pin-40) at PCI-6602; and same for the remaining four channels. Then I set 'Quafrature Mode X4' in the counting mode at the PCI-6602 block in Simulink-XPC.
The signal which I collected from the encoder seem nothing and useless when comparing to my previous work on another card on the same machine.
I am stucked and totally blank currently. No way for me to continue any more.
I really hope can hear some advices and suggestions from those experts who have read my message!
Thanks a lot!
-vivian
04-15-2007 03:51 PM