Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Control 2 stepper drivers 6036-E card?

I have 2 third party stepper drivers that take Step/Direction/Enable inputs.
Enable is low-active and I am not using it.
I want to control both motors from my 6036-E card and SCB-68, but do not need to control both at the same time.
The standard example code for pulse train generation running in parallel with standard example code for DIO line control does the trick for an individual stepper driver. 
 
The problem is when I try to do both.  I recognize that one pulse generator uses both counters, so I need to "release" the resources of the first pulse train generator before I attempt to control the second driver.  I configure ctr/0 and DIO/Line0 for stepper 0, and ctr/1 and DI)/Line1 for stepper 1.
 
I have been attempting to use event structures to perform the task in the "blind" hope that the event structure will fully process the first event and close the task before processing the next event.
 
Can anyone take a look at the attached VI and tell me what I am doing wrong, or point me the proper direction?
Thank You,
Barry
 
 
0 Kudos
Message 1 of 3
(3,468 Views)

Attached find a .VI that will provide Step and Dir outputs for X-Y movement using a multifunction DAQ card.  Written in Labview 8.2.  Only one axis can move at a time becuase the vi's used for the step output uses both of the board's counters in order to function.

Barry

0 Kudos
Message 2 of 3
(3,452 Views)

Hi Barry,

Using event structures is probably not the best way to ensure mutually exclusive access to the resources.  Even though the actions are contained in different events, LabVIEW still monitors the actions happening in the other event cases.  Your best bet would be to use a case structure to ensure that the actions are contained in mutually exclusive parts of the code...or possibly get another board so that you don't have to worry about sharing the counter resources...

Please let me know if that helps, or if you're still having trouble...

Regards,

Nicholas B, National Instruments

0 Kudos
Message 3 of 3
(3,447 Views)