Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

controlling axes on 2 PCI card simultaneously

Hi, I have a PCI 7350 and a PCI 7334 and I am using it to control 9 open loop stepper motors (6 and 3 axes for each card respectively). I also have a RTSI cable. I am not very familiar with the hardware here, it will be great if someone could help me with an example on how to control two axes on separate PCI cards simultaneously.
 
Thanks in advance!
-Karan
0 Kudos
Message 1 of 4
(3,960 Views)
Karan,

your motion control boards don't provide a native feature to synchronize the start of multiple axes on multiple boards. Typically this is done with a little onboard program that runs on the boards, waiting for a trigger from e. g. a RTSI line. Here is an example for LabVIEW that demonstrates this approach..

Unfortunately onboard programming is only supported on the 7340 and 7350 series but not on the 7330 series so this approach won't work for you. You could think of a solution like running the onboard program on the 7350 and generating a trigger signal with the breakpoint feature of the 7334 immediately after you have started the move on the 7334 but I doubt that this will result in a much better synchronization than just running the Start Motion function for each board in very close succession. As long as you make sure that no other tasks with extensive CPU usage run in parallel you should expect a delay better than 10 ms between the start of the axes on both boards.

I hope that helps,

Jochen Klier
National Instruments Germany
0 Kudos
Message 2 of 4
(3,956 Views)

Thanks for the reply.

How about this:

 I make a multithreaded program in java that runs program1.exe for board1 and program2.exe for board2 ? This is because the motion from the two boards is pretty independent.

 

import java.io.*;
import java.lang.Runtime;
import java.lang.Runnable;

class run2Progs{
        public static void main(String args[]){
        new programThread1("prog1.exe");
        new programThread2("prog2.exe");
}
}

class programThread1 implements Runnable{
        String name;
        Thread t;

        programThread1(String programName){
        name=programName;
        t=new Thread(this,name);
        System.out.println("New thread"+t);
        t.start();
        }

        public void run(){
                        try{       

                        Process p=Runtime.getRuntime().exec(name);}
                        catch(Exception e){}
        }

}

Is it also right that I can begin storing the programs on-board for both the boards and then run them separately?

I will post a new message for my question about on-board programing in a separate message for modularity.

Thanks,

-Karan

 

0 Kudos
Message 3 of 4
(3,947 Views)
Karan,

the NI Motion driver is multithreading save so I don't expect any issues to occurr with your approach.

"Is it also right that I can begin storing the programs on-board for both the boards and then run them separately?"

Onboard programs run independently from each other and from the host PC. But again: Your 7334 doesn't support onboard programming.

But maybe I have misunderstood you a bit. Of course you can run all axes simultaneously and control them from different programs (you also could control two axes on the same board from two different programs). It's just a bit of a challenge to synchronize the start of the axes on two different boards. As long as you don't need to do this everything should be easy.

Jochen

Message Edited by Jochen on 08-09-2006 09:01 AM

0 Kudos
Message 4 of 4
(3,938 Views)