10-09-2008 08:48 AM - edited 10-09-2008 08:51 AM
I want to control my motor using 5 functions per loop.
flex_read_adc16_rtn(boardID, ADC1, &adc);
flex_read_adc16_rtn(boardID, ADC2, &adc);
flex_read_pos_rtn (boardID, axis, &encoder);
flex_load_dac (boardID, DAC1, dac, 0xFF);
flex_load_dac (boardID, DAC2, dac, 0xFF);
But it takes 8ms/loop (125Hz).
It’s too slow to use in my application. I need 1KHz.
Later, I tried < Onboard > programming.
It takes almost 8ms/loop too.
It’s still slow.
Below are my programs.
<01.c>, <02.c>
Thanks
10-09-2008 06:08 PM
10-10-2008 03:09 AM
I have some programming problems with <7350 Motion Controllers (8axis)>.
I use VC++ 7.1 for programming.
For some reasons, I use AD/DA/Encoder functions for my motor control.
10-10-2008 09:31 AM
Hi jinyjie,
if you want to run your own control algorithm, the 73xx boards are definitely not the right product for you. The onboard DSP on NI motion control devices has fast and direct access to the I/Os and it runs the trajectory generation and the control algorithm. The host PC can access the I/Os only indirectly through the onboard microprocessor and this takes some time. There is no chance to run a control loop on your host PC with 1 kHz.
In fact if you want to implement your own motion control algorithm, you don't need a motion control board at all, but you should use a multifunction DAQ device in a - and that's important! - real-time environment. Stable software loop rates of 1 kHz and above are hard or even impossible to accomplish on a Windows based system. The best option that NI could offer for your approach is using LabVIEW Real-Time and the NI SoftMotion Development Module.
If you are familiar with C programming and don't want to switch to a graphical approach, LabWindows/CVI Real-Time is also a very good option for you. Even though the NI SoftMotion Development Module makes live much easier when developing a real-time based motion control application it is not mandatory. I mention that, as this module is only available for graphical programming and not for text based programming.
If you want more in-depth information, please be more specific about the scope of your application and I will be happy to discuss alternative approaches in more detail with you.
Thanks,
Jochen Klier
National Instruments
11-01-2008 02:28 AM - edited 11-01-2008 02:33 AM
hello.
I want use
flex_read_adc_trn();
but there are some noises in input voltage.
Is there adny method to reduce noises?
<7350 Motion Controllers (8axis)>.
<VC++2003 programming>
11-03-2008 02:35 AM
Jinyie,
as the 7350 is not a data acquisition device, there are no advanced features for signal conditioning available. With a hardware clocked device you could use some simple approaches like oversampling and averaging or digital filtering to reduce noise, but that's not an option for 73xx devices. The only thing you could do is using an external filter circuitry to reduce the noise of your signals.
Jochen
11-17-2008 03:21 AM
11-17-2008 03:36 AM
11-17-2008 05:53 PM
Hi jinyjie,
Your "control loop" on your DAQ 6221 will be completely software dependent. How fast are you looping your daq commands (analog input and output, I assume) in your VC program?
11-17-2008 10:35 PM
1~3ms for one loop.