Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger based on Position when using analog feedback

I fixed the minor bug in the onboard program, I increased the program time slice to 10mSec, and added a 500 mSec delay between starting the onboard program and starting the motion. After correcting the data for the timing of the trigger points, the triggers now oscillate between 6 mSec early and 6 mSec late. See attached graph.

Could this be due to when the onboard processor updates the buffer states? Can you suggest any tools that would help me evaluate what is happening onboard the motion card?

Thanks for all your help.

Brian Jahraus
0 Kudos
Message 11 of 14
(1,482 Views)
Brian,

How did you obtain the data for the timing graph? What exactly do you mean with "early" or "late" What's your comparative value for these data?
I don't think that the issue is related to the update mode of the onboard CPU. Probably the jitter comes from the general way onboard programs are processed. Unfortunately there is no way for users to debug onboard programs. As I have already written the deterministic behavior of onboard programs is not very good. The 68331 CPU is running multiple other time critical tasks resulting in a low priority for onboard programs and this can result in a high amount of jitter.

Jochen
0 Kudos
Message 12 of 14
(1,471 Views)

Jochen,

Thanks for trying to help.

I am using the system that is being triggered to measure the timing. I used a seperate, reliable source to provide a 2 Hz signal, and it was precise within 1 mSec. It triggered at 0.000, 0.500, 1.000 and 1.500  Secs relative to the first point. So the triggered system is not the problem.

The signal I am using as a test case has the first few triggers at points 32, 81, 132, 181,  and 232 of the contour. Subtracting the first point from the rest, this yields a delta of 0, 49, 100, 149, and 200 points. At a contour interval of 10 mSecs these triggers should occur at 0, 0.490, 1.000, 1.490, and 2.000 Secs relative to the first trigger. When I ran this, the  triggers occured at 0, 0.484, 1.000, 1.484, and 2.000. Every second trigger is early by 6 mSecs. I had calculated the delta to the next trigger wrong in the graph I sent before.   I ran the test several times with varying results. Without changing any setup the triggers can vary greatly from a low of 5 mSecs to a high of 15 mSecs from the expected values. I have attached a spreadsheet showing 3 typical runs. You can see that the first 2 runs are similar. The third run varies greatly. There were no changes in setup between the 3 runs. It appears as if the updating of the buffer state or communication with the onboard program is not being done in a consistent fashion.

Is there any other way to accurately generate a trigger based on the contour point number when using analog feedback? The algorithm for triggerring based on the actual position is much more complicated and would require even more processing time for the onboard program. If I can't get the contour buffer based trigger to work I doubt I would have any better luck with the position based triggers.

I am not looking for uSec accuracy. This hardware should be able to do this. I need the trigger to occur consistently within 1 mSec of the expected time. I can adjust for systematic delays as long as they are consistent.

 Thanks for any guidance you can give. I am afraid I have to tell the scientist that we should have bought different hardware.
 
Brian
 
 
0 Kudos
Message 13 of 14
(1,466 Views)

Hey Brian,

You can use one of National Instruments Multifunction DAQ boards (M-Series) to do what you are trying to do. The DAQ board will allow you to accurately generate a trigger (either an analog output or a digital pulse) based on your analog feedback. You will also still be able to use the Motion Controller that you have in your overall setup. You can even bring the feedback signal into both the motion controller and the DAQ board. I hope this provides a solution that you can implement into your application. Let me know if you have any further questions. Thanks and have a great day.

Regards,

DJ L.

0 Kudos
Message 14 of 14
(1,440 Views)