HomeProductsApplicationsOrder InfoF. A. Q.SoftwareFeedback


Example o programming Master-Slave application

Introduction to programming

Connection and System requirements

Commands for PC programming

Commands for Master-Slave programming

Master-Slave connection diagrams

Setting Up a Master-Slave Application

Example of programming and operation of single DPS

Example of programming Master-Slave application

Diagram for programming example

Schematic for molding Medical Implantable RF Coil

Graph - sequence of operation steps example

The example program - storing program to DPS processor

The example below shows the programming possibilities by utilizing the Hyper Terminal program that is part of all Windows Operating Systems.  To begin programming, just setup the correct serial port and the Hyper Terminal session per the description shown in system requirements section.

Programming the Master DPS for Master-Slave application using Hyper Terminal

Program Name: “RF Coil Molding Process for Medical Implantable Devices”.

                The first step in programming the Master-Slave application is to assign the Address to every DPS including all Addressable Relays Driver (ARD-4) – one device at a timeThe Master DPS address must always be “0”.  For further description see command  "#A[CR]" - address.

Note:  If the Addressable Relays Driver (ARD-4) is used for the application,  to assign the Address, connect ARD-4 “Rx” to the PC  “Tx” (pin #3) and Gnd to PC (pin # 5).  For an ARD-4 connection (RS232) see the ARD-4 specification.

        The next step is to Network all DPS and ARD-4 devices.

Connect the Master “Tx” terminal with all Slaves “Rx” terminal and ground “Gnd” terminals as shown on diagram Fig.11. 

 Figure 13. The diagram shows the connection for the program example used in this paragraph.

Back to Top

                 Power "ON" all equipment and start the Hyper Terminal session.  At this point in time the system is ready for testing or programming of the Master and Slaves that will be used during the process.

Note: To program the Master controller it is not necessary to Network the Slaves.Schematic of program example for “RF Coil Molding Process for Medical Implantable Devices”.

Figure 14.  RF Coil Molding Process for Medical Implantable Devices - schematic for program example.

Back to Top

1.         To initiate the molding process, the electromagnetic (E/M) Valve #1 must be open for a sufficient time to fill the mixing container.

2.        The Epoxy Dispenser turns on for 15 seconds (acceleration time not included) and fills the Epoxy Mixer with 2 part (“A” & “B”) UV Epoxy. The dispenser is powered by the Master DPS which requires 3Vdc of Control Signal to generate sufficient current for Motor #1. The motor needs 5 seconds acceleration time to approach the desired speed. The step above occurs at the same time.

3.         After the Epoxy Mixer is filled with the epoxy, the mixer’s Motor # 2 turns "ON" and operates for 45 seconds then stops.  The mixer’s motor is powered by Slave DPS #2 and requires 4.5Vdc of Control Signal to generate sufficient current.  For smooth operation, the motor will accelerate from 0 up to the desired speed for 10 seconds.  After 30 seconds at full speed operation the current must gradually decrease back to “0” before the motor completely stops. The deceleration will take 5 seconds.

4.         The mixer’s motor is connected to a mixing propeller thru the electromagnetic (E/M) Clutch.  The clutch is powered by Slave DPS #3.  To mix the UV Epoxy the applied current is held for 45 seconds – the same time as the operation of Motor #2.  In order to generate sufficient current (torque), the Control Signal must be 1.2 Vdc.

5.         After the mixing operation is complete the E/M Valve #2 opens and the Pump turns "ON" slowly filling the mold with UV Epoxy.  The mold filling operation takes 1 minute.  The pump operates on AC power.

6.         After the mold filling operation is complete, the conveyor moves forward one step, and the epoxy in mold is cured with UV Light for another 15 seconds.

Note:  Although movement of the conveyor is synchronized with the mold filling operation, it isn’t s part of this program.

7.         To start the programming, first construct the sequence of operation steps for the Master and all Slaves that are part of the process.

Figure 14. The graph shows the sequence of operating steps for the Master and all Slaves attached to the Network

Back to Top

         This paragraph will show how to establish hexadecimal values for Step Duration, how to calculate Time Rate “tR”, and how to calculate the “Sd” value. The Step Duration is a defined time and can be a minimum of 0 msec up to a maximum of 10 minutes in 10 msec time interval. Therefore, in hexadecimal values:

0 msec    = 0000(hex)

10 msec = 0001(hex)

1sec        = 1000ms = 0064(hex)

1min        = 60sec = 60000msec = 1770(hex)

10min      = 600sec = 600000msec = EA60(hex)

Example:  Hexadecimal value of step duration of 35 sec= 35x1000/10 = 3500 (dec) = 0DAC(hex)

 To calculate the Time RatetR” for a given hexadecimal value “Sd” use the following formula:

tR = Sd /5000 [s/V]

IMPORTANT:  In order to use the above formula, value Sd must be interpreted from hexadecimal into decimal value.

Example: For hexadecimal value Sd = 3A98 the equivalent of the decimal value is 15000. Therefore, Time Rate tR 15000 / 5000 = 3 [sec/V] or [msec/mV].

The “slowest” Time Rate tR = 12 sec/V (or 12 msec/mV).  To generate this Time Rate the value of “Sd” must be equal to 60000 or in hexadecimal system Sd = EA60.

To calculate the “Sd” value for known Time Rate “tR” use the following formula:   Sd =5000*tR

Example: If the new Time Rate is tR = 3 [sec/V] or [msec/mV] then Sd = 5000 x 3 = 15000 and hexadecimal value of Sd = 3A98.

          Therefore, the command for the new Time Rate tR = 3 [s/V] is: P3A98[CR].

      Building the commands structure

            Commands for RESET STEP - to reset all connected DPS devices, the program must be initialized with global commands:

0000L*0000

R*0

]

 

  • Reset Step Duration: Time: 0 sec = 0000(hex)

  • All DPS devices (Address = *) Control Signal 0 Vdc: =>L*0000[CR]

  • ALL Relays: (Address = ) RL1,RL2,RL3, RL4  “OFF” => R*0[CR]

            Commands for STEP #1 will be as follows:

01F4P0208D

R31

]

 

  • Step #1 Duration: Time: 5 sec = 01F4(hex)

  • Motor #1: Time Rate: tR = 5/3 =1.6666667

  • Motor #1: (Address = 0) Soft Start: P = 5000*1.6666667 = 8333.333333(dec) = 208D (hex) => P0208D[CR]

  • E/M Valve #1: (Address=3) RL1  “ON” => R31[CR] (see #RA[CR] - Addressable Relay command).

           Commands for STEP #2 will be as follows:

05DCL00999

]

 

  • Step #2 Duration: Time: 15 sec = 05DC(hex)

  • Motor #1: (Address = 0) Control Signal 3 Vdc:3000*4096/5000 = 2457.6(dec) = 0999 (hex) => L00999[CR]

  • E/M Valve #1:Since RL1 is already “ON” there is no need to execute command      R31[CR].

           Commands for STEP #3 will be as follows:

03E8L00000

P12B67

L203D7

R30

]

 

  • Step #3 Duration: Time: 10 sec = 03E8(hex)

  • Motor #1: (Address = 0) Control Signal 0 Vdc: =>L00000[CR]

  • Motor #2: Time Rate: tR = 10/4.5 =2.222222

  • Motor #2: (Address = 1) Soft Start: P = 5000*2.222222 = 8333.333333(dec) = 208D(hex) => P12B67[CR]

  • E/M Clutch: (Address = 2) Control Signal 1.2 Vdc: 1200*4096/5000 = 983.04(dec) = 03D7(hex) => L203D7[CR]

  • E/M Valve #1: (Address = 3) RL1 “OFF” => R30[CR]

                      Commands for STEP #4 will be as follows:

0BB8 L10E66

]

 

  • Step #4 Duration: Time: 30 sec = 0BB8(hex)

  • Motor #2: (Address = 1) Control Signal 4.5 Vdc: = 4500*4096/5000=3.686.4(dec) = 0E66            (hex) => L10E66[CR]

  • E/M Clutch: Since E/M Clutch Control Signal does not change, there is no need to            execute command L203D7[CR] again.

           Commands for STEP #5 will be as follows:

01F4 Q115B3

]

 

  • Step #5 Duration: Time: 5 sec = 01F4(hex)

  • Motor #2: Time Rate: tR = 5/4.5 =1.111111

  • Motor #2: (Address = 1) Soft Start: P = 5000*1.111111 = 5555.5555(dec) = 15B3(hex) => Q115B3[CR]

           Commands for STEP #6 will be as follows:

1770L10000

L20000

R42

R54

]

 

  • Step #6 Duration: Time: 60 sec = 1770(hex)

  • Motor #2: (Address = 1) Control Signal 0 Vdc: =>L10000[CR]

  • E/M Clutch: (Address = 2) Control Signal 0 Vdc: =>L20000[CR]

  • E/M Valve #2: (Address = 4) RL2 “ON”: => R42[CR]

  • Pump: (Address = 5) RL3 “ON” => R54[CR]

           Commands for STEP #7 will be as follows:

005DCR40

R50

R68

]

 

  • Step #7 Duration: Time: 15 sec = 05DC(hex)

  • E/M Valve #2: (Address = 4) RL2  “OFF” => R40[CR]

  • Pump: (Address = 5) RL3  “OFF” => R50[CR]

  • UV Light: (Address = 6) RL4  “ON” => R68[CR]

           Commands for STEP #8 - END of program will be as follows:

0000R60

]}

 

  • Step #8 Duration: Time: 0 sec = 0000(hex)

  • UV Light: (Address = 6) RL4 “OFF => R60[CR]

  • END of program: =>}

         Before transferring the program to the Master DPS processor, combine all steps and precede all chain of commands with command ZABCD[CR].

Consequently, the complete program will now look as follows:

ZABCD

0000L*0000

R*0

]

01F4P0208D

R31

]

05DCL00999

]

03E8L00000

P12B67

L203D7

R30

]

03E8L10E66

]

1770L10000

L20000

R42

R54

]

005DCR40

R50

R68

]

0000R60

]}

      Transferring the program to the Master DPS processor

1.         Connect the Master DPS to the PC as in Figure 3.

2.         Setup serial port and Hyper Terminal as shown in Figure 4,5,6, & 7

3.         Begin with command “G[CR]” (2.1) to take control over the DPS switching to PC Mode Operation.

4.         Copy the entire program command sequence as shown in above and paste it all into the Hyper Terminal window.

Doing so, will conclude the program transfer to the Master DPS.

To execute the program, connect (Network) all devices, then press and hold the PRGRMpushbutton of the Master DPS. An orange LED indicates Program Mode operation.

The program can be directly written into the Hyper Terminal.  However, it is easier to write it in plain text using any text program such as Windows Notepad, WordPad or Microsoft Word, then copy and paste all into Hyper Terminal.

Conclusion: The method of programming using Hyper Terminal, as described above, is the most basic and simple way of programming Magtorx Programmable DPS’.  The other, more preferable method would be using a development program such as LabView, Quick Basic, Visual C++, or MatLab®.  For example, using LabView, you can develop a user interface program that will allow you to enter the command in a more friendly fashion where the user can create units conversion VI’s or the specific commands sub VI’s such as “Control Signal” in place of cryptogram like “LXXXX[CR]”.

Back to Top


[Home][Products][Applications][Order Info][ F. A. Q. ][Software][Feedback]

Copyright © 2004  [MAGTORX]. All rights reserved. Rev. 1.1