예제 #1
0
            public void uStep(bool state)
            {
                string c = (state) ? "CB2" : "SB2";
                string r = DMC1425.command(c);

                uStepState = state;
            }
예제 #2
0
            public async void MotorOff()
            {
                string m = (MotorType == tMotorType.DC) ? "A" : "B";
                string c = (MotorType == tMotorType.DC) ? "CB3" : "SB1";

                string r = DMC1425.command(c, "\r", ":", true); // Disable Power
                await Task.Delay(msgDelay);
            }
예제 #3
0
            public string SendValue(string command, string value, tMotorType moteur, bool abs)
            {
                string m = (moteur == tMotorType.DC)?"A=":"B=";

                if ((command == "PR") && (abs))    // seulement si PR --> PA
                {
                    command = command.Substring(0, 1) + "A";
                }

                command += m + value;
                return(DMC1425.command(command, "\r", ":", true));
            }
예제 #4
0
            public async void Move(string command, string value)
            {
                string relMov = "";

                if (!IsMov && MotorState)       // You cannot give another BG command until current BG motion has been completed EHe/Galil
                {
                    string m = (MotorType == tMotorType.DC) ? "A" : "B";

                    string r = DMC1425.command(command + m + "=" + value, "\r", ":", true);
                    relMov = DMC1425.command("PR ?,?", "\r", ":", true); // EHe

//                    await Task.Delay(msgDelay);     // EHe
//                    Thread.Sleep(msgDelay);         // EHe

                    DMC1425.command("BG" + m, "\r", ":", true);
                }
            }
예제 #5
0
            public async void MotorOn()
            {
                string m = (MotorType == tMotorType.DC) ? "A" : "B";
                string c = (MotorType == tMotorType.DC) ? "SB3" : "CB1";

                DMC1425.commandValue("SH" + m); // Both motors ! Reset erreur moteur DC // EHe 014.10.08
                string r = DMC1425.command(c);  // Enable Power
                await Task.Delay(msgDelay);

                int op = (int)DMC1425.commandValue("OP?");

                if ((((op & 4) == 0) && (MotorType == tMotorType.DC)) || (((op & 1) != 0) && (MotorType == tMotorType.PAP)))
                {
                    MessageBox.Show("Commutateur de puissance du moteur " + ((MotorType == tMotorType.DC) ? "DC" : "PAP") + " forcé sur DISABLE");
                }
                else
                {
                    await Task.Delay(msgDelay);
                }
            }
예제 #6
0
 public void resPos()
 {
     string m = (MotorType == tMotorType.DC) ? "A" : "B";
     string r = DMC1425.command("DP" + m + "=0", "\r", ":", true);
 }
예제 #7
0
 public void Reset()
 {
     DMC1425.command("RS", "\r", ":", true);
 }
예제 #8
0
            public string Stop()
            {
                string m = (MotorType == tMotorType.DC) ? "A" : "B";

                return(DMC1425.command("ST" + m, "\r", ":", true));
            }