Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Axis resource allocation and the MID-7654

Hello All,
 
I am currently transferring my application over to use the MID-7654 instead of third party drives.  Below is the start up process I am using to allocate the axis resources:
 
  //kill and disable all axes
  flex_stop_motion(boardID,0,NIMC_KILL_STOP,0x000F);
  flex_enable_axes(boardID,0,3,0x00);
  //unmap all axis resources
  flex_config_axis(boardID,NIMC_AXIS1,0,0,0,0);
  flex_config_axis(boardID,NIMC_AXIS2,0,0,0,0);
  flex_config_axis(boardID,NIMC_AXIS3,0,0,0,0);
  flex_config_axis(boardID,NIMC_AXIS4,0,0,0,0);
  //map encoder resources to axes 1 and 2
  flex_config_axis(boardID,NIMC_AXIS1,NIMC_ENCODER1,0,0,0);
  flex_config_axis(boardID,NIMC_AXIS2,NIMC_ENCODER2,0,0,0);
  //enable axes 1 and 2
  u8 mask = MASK1|MASK2;
  status = flex_enable_axes(boardID,0,3,mask);
 
Basically, I want to use the encoder resources for each axis for position/velocity monitoring and control the analog outputs directly to change the torque of the motors.  Since my impedance control software is closing the position and velocity loops, I do not want to use the PID controller onboard the PCI-7344.
 
The above code worked fine with the third party drive.  However, after starting up my application with the MID drive, all of the orange inhibit LEDs turn on and remain that way (I assume it is to do with killing and disabling all of the axes and not mapping output resources to them).  Since I wasn't previously using the inhibit output from the motion controller, my application worked fine with the third party drive (I was still able to read the encoder feedback information).
 
Also, when I was using the MAX '1-D interactive' interface to verify my encoder feedback, if I move either encoder immediately after initialization the 'Motor off' and 'Following error' lights turn red.  I assume this is due to the encoder moving without a command sent from the motor).
 
Can anyone see any problems with the above code segment or suggest an initialization procedure that would solve my problems.  Or if all else fails, is it possible to control the inhibit signals directly to enable/disable the axes on my own?
 
Wow... I certainly rambled on a bit there....  If you need clarification on any points let me know.  Also, I am on a bit of a time crunch, so a prompt reply would be greatly appreciated.
 
Thanks,
Chad
0 Kudos
Message 1 of 3
(3,369 Views)
Follow up...
 
I managed to disable the inhibits using 'flex_config_inhibit_output()' and control them independently using 'flex_set_inhibit_output_momo()'.
 
Any feedback about other options or comments about my post are still welcome.
 
Cheers,
Chad
0 Kudos
Message 2 of 3
(3,366 Views)

Chad,

I'm a bit astonished that you don't want to use the PID controller on the board. Onboard PID control is one of the main reasons why you would like to use a motion control board instead of a simple multifunction I/O device. The onboard PID loop of the 7344 can run with up to 16 kHz with very low jitter whilst using the DACs directly from your host application will result in a control loop with less than 200 Hz and a high amount of jitter - even if you were using a real-time OS. This will result in poor control behavior.

This is caused by the architecture of the board. The DACs can be controlled directly by the DSP on the board with high rates in a determenistic way but the host can access them only through the board's µController that runs the host communication in 5 ms cycles that can't be synchronized with the application on the host PC. So for this usecase a combination of e. g. a PCI-6229 (multifunction DAQ board with 4 analog outputs) and a PCI-6601 (4 counters with direct quadrature encoder connectivity) would do a much better job at even a lower price.

With this said I really can't reccomend the usage of a PCI-7344 as a pure I/O-board. Please provide some information why you want/need to choose this approach. There are a lot of options to build customized motion control systems. 
A key feature of every control system is deterministic behavior so you will need to run your application on a real-time OS. Otherwise you won't be able to get a reliable control behavior.

I can give you some more specific advice if you post some background information about your application.

Best regards,

Jochen Klier
National Instruments Germany

Message 3 of 3
(3,358 Views)