Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputing a square wave through RTSI on PCI-7344

I am working with LabView 8.6, PCI-7344 card, UMI-7764 motion control

board, and NI-Motion 7.7. I have written code in LabView to run a stepper motor but would now like to output a square wave (rising edge)

to trigger a camera, which is being operated in another program, as soon as the motor begins to run. I have been told that this type of output can be done using the RSTI on the PCI-7344. I am currently coding in LabView to write to the RTSI bus using the block diagram in figure 1b from this website:http://zone.ni.com/devzone/cda/tut/p/id/352, but I am receiving error 70022. Do you have any idea how to stop this error from occuring? Is it even possible to output a rising edge wave form using the RSTI? If so, is there an easier way to do this output using the UMI-7764 Motion Control Board. I

am new to LabView so any help would be greatly appreciated!

 

Thanks

0 Kudos
Message 1 of 5
(4,371 Views)

I am not sure if this will be useful or not, but take a look at the following article and see if it helps.

 

http://zone.ni.com/devzone/cda/tut/p/id/4751

0 Kudos
Message 2 of 5
(4,321 Views)

Could you please specify your requirements a bit more in detail? Additionally the link that you have provided is not correct and if I remove the comma at the end, I get an article about ARINC, which is probably not the article you are referring to.

 

Here are some specific questions:

  1. What's your interface of the camera to your PC? Is this an NI frame grabber that accepts RTSI trigger signals?
  2. Do you need to trigger only the start of the image acquisition?
  3. Is there a need to trigger each image acquisition at certain positions of the axis?
  4. What's the frequency of the trigger pulse train that you want to generate?

As there is no way to synchronize the PWM generation (Burt's suggestion) with other operations on the motion board and as it's not possible to route this signal to RTSI, this is probably not a solution for your application.

 

Regards,

Jochen Klier

National Instruments

0 Kudos
Message 3 of 5
(4,316 Views)

Hello Jochen,

 

Thanks for your reply.

 

1. I am running the camera on a seperate computer from which I am running the motor and using MATLAB to aquire images. This MATLAB code is also used to aquire the motor position data with each image that is taken, and therefore a NI SCB-68 DAQ is used. The computer used to run the motor is operating with a PCI-7344, UMI-7764, and I am using LabView.The camera is a Allied Vision Technologies Guppy. I have it set for an external trigger and for this camera a rising edge is needed. I'm not sure if the camera would accept RTSI trigger signals but as long as it is a rising edge I assumed that it would work.

 

2. It would be useful to have a constant square wave being outputed to trigger the camera so that the rising edges could be used as a constant trigger. Currently the MATLAB code is aquiring the images in a loop and therfore it many be necessary to have a constant trigger. For earlier purposes we used a function generator that outputed a square wave and this allowed all images necessary to be aquired.

 

3. No this is not necessary, because the SCB-68 is already taking position data when every image is taken, and it does not necessarily have to be at certain intervals 

 

4. We have currently been using 1.0 kHz for the frequency and 10 Vpp for the amplitude. The camera still triggers with a frequency as low as 100 mHz. For our purposes we want the camera to aquire images fast and may need the higher frequency in order to do this.

 

 

Let me know if you have any other questions. I have been advised that the PWM would work but it would not be completely synced with the motion of the motor. As long as it is within a few milliseconds we should be ok but it doesn't seem that the PWM can be controlled in LabView. I just need something that can be done in LabView because I only want to push one button to start the motor and trigger the camera. Currently we have been using two: starting the motion through MAX and starting the function generator. We would like to stray away from this method to reduce error during testing. I know this problem could be easily solved by aquiring another SCB-68 DAQ so that there is one on both computers but this is simply not possible and it is required on the other computer to take motion data. I thought there must be an easy way to output a square wave to the UMI-7764 through the PCI-7344.

 

Thanks

0 Kudos
Message 4 of 5
(4,306 Views)

In this case Burt's approach might be an option for you. Still the PWM output is not ideal, as there is only a limited number of discrete frequencies available. So if one of these frequencies is ok for you, the PWM output might be an option.

 

freq list.gif

 

If this is not a fit for you, you could configure a spare axis as open loop stepper axis. This will allow you to generate a pulse train with a much better frequency resolution at the step output of this axis. Thsi axis could be synchronized to your real axes if required (e. g. simultaneous start). If you don't want acceleration ramps in your pulse train, you can set a base velocity for this axis, that is equal to the desired output frequency.

Please note, that RTSI is an internal bus that connects boards inside a single computer chassis, so it's not an option to use any type of RTSI signal to generate signals over distances longer than a few centimeters. Please note also, that both, PWM signal and step signal are 0 - 5 V signals.

 

I hope that helps,

Jochen Klier

National Instruments

0 Kudos
Message 5 of 5
(4,283 Views)