HomeProductsApplicationsOrder InfoF. A. Q.SoftwareFeedback


Commands for PC programming

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

 Available commands and command descriptions for PC programming 

All listed commands can be used with programmable DPS device connected to a PC.  The purpose of the extended list of commands is to create programs for collecting data from electromagnetic devices such as brakes or clutches to evaluate their performance, matching their performance, or to control a single device operation.  Such devices include:  small DC motors, electromagnetic (hysteresis, particle or friction) brakes and clutches and various kinds of electromagnetic actuators (pneumatic, solenoid, relays, etc.). 

G[CR]PC Mode Operation (>> [!] or [?]). Use the command to take control over the DPS with the PC or another controller connected to the DPS.

g[CR] - Manual Mode Operation (>> [!] or [?]). Use the command to allow manual control of the DPS.

The following are general descriptions of the Read Once and Read Continuously commands:

  • hXXXX[CR] - Read Once

  • HXXXX[CR] - Read Continuously 

hXXXX[CR]Read Once (>> [!] or [?])Reads (one time only) the data of Current, Control Signal or Scaling Value.  The “h” command can be used in both: PC Mode and Manual Mode operations.  The returned string of data (starting from data bit #1, data bit #2, etc.) will be as follows:

                           bit1    bit2    bit3     bit4   ..

XXXX XXXX XXXX XXXX… [CR] (>>[!]} or [?])

Note: For further details see below hXXXX[CR] & HXXXX[CR] description.

HXXXX[CR]Read Continuously (>> [!] or [?]).  Reads data of Current, Control Signal and Scaling Value continuously.  The “h” command can be used in both: PC Mode and Manual Mode operations.  The returned string of data (starting from data bit #1, data bit #2, etc.) will be as follows:

  bit1    bit2    bit3   ..

XXXX XXXX XXXX.. [CR]

XXXX XXXX XXXX.. [CR]

XXXX XXXX XXXX.. [CR]

XXXX XXXX XXXX.. [CR]

XXXX XXXX XXXX...[CR]} (>> [!] or [?])

The bit counts and the associated data for the command hXXXX[CR] and HXXXX[CR]:

  • bit 1 allows to read the Control Signal

  • bit 2 allows to read the Filtered Control Signal

  • bit 3 allows to read the Current

  • bit 4 allows to read the Filtered Current

  • bit 5 allows to read the Active Scaling

The command format is as follows:

  • hXXXX[CR] =>  h(0FED CBA9 8765 4321)[CR]

  • HXXXX[CR] =>  H(0FED CBA9 8765 4321)[CR]

Table II denotes the command structure used for reading Current, Control Signal and Scaling Value:

“X”

0FED

“X”

CBA9

“X”

8765

“X”

4321

Bit#

Command

hXXXX or HXXXX

Command Description

0000

0000

0000

0000

0

N/A

N/A

0000

0000

0000

0001

1

h0001 or H0001

Read Control Signal

0000

0000

0000

0010

2

h0002 or H0002

Read Filtered Control Signal

0000

0000

0000

0100

3

h0004 or H0004

Read Current

0000

0000

0000

1000

4

h0008 or H0008

Read Filtered Current

0000

0000

0001

0000

5

h0010 or H0010

Read Active Scaling

0000

0000

0010

0000

6

N/A

N/A

0000

0000

0100

0000

7

N/A

N/A

0000

0000

1000

0000

8

N/A

N/A

0000

0001

0000

0000

9

N/A

N/A

0000

0010

0000

0000

A

N/A

N/A

0000

0100

0000

0000

B

N/A

N/A

0000

1000

0000

0000

C

N/A

N/A

0001

0000

0000

0000

D

N/A

N/A

0010

0000

0000

0000

E

N/A

N/A

0100

0000

0000

0000

F

N/A

N/A

Some shortcuts are possible for creating a command of multiple “read” requests.  To read the Control Signal and Current (one time) it would be necessary to use the following command: h0001[CR]h0002[CR] or simply h0003[CR]The equivalent command for reading the Control Signal, Current and Active Scaling is as follows: h0015[CR] instead of h0001[CR]h0004[CR]h0010[CR].

In other words the sum of bit 1, bit 3, and bit 5 in binary form is:

0000 0001 + 0000 0100 + 0001 0000 = 0001 0101 and in hexadecimal format is equal to 0015.

Therefore, the command for reading the Control Signal, Current and Active Scaling is h0015[CR].  The same rules apply to the command H00XX[CR] – Read Continuously.

h0001[CR] – Reads the Control Signal one time only.  The returned value will be displayed in hexadecimal format where 0FFF=5000 mVdc. 

Example: value 0A00=3125 mVdc.

Explanation: Since 0FFF(Hex)=4095(Dec)=5000mVdc then 0A00(Hex)=2560(Dec)=3125 mVdc (because 2560/4095x5000=3125).

h0002[CR] – Reads the Filtered Control Signal one time only.  The returned value will be displaed in hexadecimal format where 0FFF=5000 mVdc.

Example: value 0A00=3125 mVdc.

Explanation: Since 0FFF(Hex)=4095(Dec)=5000mVdc then 0A00(Hex)=2560(Dec)=3125 mVdc (because 2560/4095x5000=3125). 

h0004[CR] - Reads the Current draw one time only.  The returned value will be displaed in hexadecimal format where value 0FFF represents the maximum current of the tested device (DPS).

Example: if maximum device current is set to be 7400 mA, value 0A00=4626 mA.

Explanation: Since 0FFF(Hex)=4095(Dec)=7400 mA then 0A00(Hex)=2560(Dec)=4626 mA (because 2560/4095x7400=4626).

h0008[CR] - Reads the Filtered Current value one time only.  The returned value will be displayed in hexadecimal format where value 0FFF represents the maximum current of the tested device (DPS).

Example: if maximum device current is set to be 7400 mA, value 0A00=4626 mA.

Explanation: Since 0FFF(Hex)=4095(Dec)=7400 mA then 0A00(Hex)=2560(Dec)=4626 mA (because 2560/4095x7400=4626).

h0010[CR] - Reads the Scaling value one time only.  The returned value will be displayed in hexadecimal format where value 0FFF represents the maximum device (DPS) scale of 100%.

Example: hexadecimal  value 0800 = 50%.

Explanation: Since 0FFF(Hex)=4095(Dec)=100% then 0800(Hex)=2048(Dec)=50% (because 2048/4095x100=50).  

Note: to read the Control Signal, Filtered Control Signal, Current or Filtered Current again, re-enter the “h” character only followed by the carriage return - (h[CR]). 

H0001[CR] - Reads the Control Signal continuously.  The returned value will be displayed in hexadecimal format where 0FFF=5000 mVdc. 

Example: value 0A00=3125 mVdc.

Explanation: Since 0FFF(Hex)=4095(Dec)=5000mVdc then 0A00(Hex)=2560(Dec)=3125 mVdc (because 2560/4095x5000=3125). 

H0002[CR] - Reads the Filtered Control Signal continuously.  The returned value will be displayed in hexadecimal format where 0FFF=5000 mVdc. 

Example: value 0A00=3125 mVdc.

Explanation: Since 0FFF(Hex)=4095(Dec)=5000mVdc then 0A00(Hex)=2560(Dec)=3125 mVdc (because 2560/4095x5000=3125). 

H0004[CR] - Reads the Current draw continuously.  The returned value will be displayed in hexadecimal format where value 0FFF represents the maximum current of the tested device (DPS).

Example: if maximum device current is set to be 7400 mA, value 0A00=4626 mA.

Explanation: Since 0FFF(Hex)=4095(Dec)=7400 mA then 0A00(Hex)=2560(Dec)=4626 mA (because 2560/4095x7400=4626). 

H0008[CR] - Reads the Filtered Current value one time only.  The returned value will be displayed in hexadecimal format where value 0FFF represents the maximum current of the tested device (DPS).

Example: if maximum device current is set to be 7400 mA, value 0A00=4626 mA.

Explanation: Since 0FFF(Hex)=4095(Dec)=7400 mA then 0A00(Hex)=2560(Dec)=4626 mA (because 2560/4095x7400=4626). 

H0010[CR] - Reads the Scaling value one time only.  The returned value will be displaedy in hexadecimal format where value 0FFF represents the maximum device (DPS) scale of 100%.

Example: hexadecimal  value 0800 = 50%.

Explanation: Since 0FFF(Hex)=4095(Dec)=100% then 0800(Hex)=2048(Dec)=50% (because 2048/4095x100=50).  

Note:  To stop continuous display execute (h[CR]) command. To read the Control Signal, Filtered Control Signal, Current or Filtered Current Active Scaling again, re-enter the (H[CR]) command.

 !I[CR] – R- Scaling Manual Mode (>> [XXXXCR] [!] or [?]).  Reads the DPS Manual Mode scaling hexadecimal value “XXXX”.

 IXXXX[CR]Scaling Manual Mode (>> [!] or [?]).  Writes hexadecimal value “XXXX” to the scaling register.  Use this command to assign a new value of scaling. Assigned scaling must be saved by the Save – ($[CR]) command. Command I0FFF[CR] will reset the DPS scaling register to the initial factory setting. The initial factory scaling is assigned based on the DPS rated current – see Product list for DPS specifications.

J[CR] – ON-Table Mode (>> [!] or [?]). Turns ON the Table Mode.  Executing this command will allow the user to have control over the DPS Table. Note: PRGRM LED will change to Red - applies to models EC and EO.

j[CR] – OFF-Table Mode (>> [!] or [?]).  Turns OFF the Table Mode and terminates communication with the DPS Table. Note: PRGRM LED will change back to Green - applies to models EC and EO.

K[CR]  - ON-Notifier (>> notification “[!] or [?]” is present).  Makes notification visible.

Therefore, any command executed after turning the notification ON will produce an error status - “[!] or  [?]”.  “!” - denotes OK; ”?” – denotes ERROR.

k[CR] – OFF-Notifier (>> no notification present).   Makes notification invisible.  Therefore, any command executed after turning the notification OFF will not show an execution status.

!L[CR]  - R-Control Signal (>> [XXXXCR] [!] or [?]). Reads Control Signal from the control register.

LXXXX[CR]Control Signal (>> [!] or [?]). Writes hexadecimal value “XXXX” to the control register. The value can be between “0” and “0FFF” (decimal equivalent of 0 to 4095).  The hexadecimal “0FFF” is the maximum value equivalent to 5 volts of control signal.  This command controls the current applied to the load connected to Load Terminal.

!M[CR] – R-Scaling Program Mode (>> [XXXXCR] [!] or [?]).  Reads the Program Mode scaling hexadecimal value “XXXX” from the scaling register.

MXXXX[CR] - Scaling Program Mode (>> [!] or [?]). Writes hexadecimal value “XXXX” to the scaling register.  Assigned scaling must be saved by the Save – ($[CR]) command. Command M0FFF[CR] will reset the DPS scaling register to the initial factory setting. The initial factory scaling is assigned based on the DPS rated current – see Product List for DPS specifications.

!N[CR] – R-Scaling Table Mode (>> [XXXXCR][!] or [?]). Reads the maximum Table Mode scaling hexadecimal value “XXXX” from the scaling register.

NXXXX[CR]Scaling Table Mode  (>> [!] or [?]).  Writes hexadecimal value “XXXX” to the scaling register.  Assigned scaling must be saved by the Save – ($[CR]) command. Command N0FFF[CR] will reset the DPS scaling register to the initial factory setting. The initial factory scaling is assigned based on the DPS rated current – see Product list for DPS specifications. 

!P[CR] – R-Soft Start (>> [XXXXCR] [!] or [?]).  Reads the Time Rate hexadecimal value “XXXX” from the Soft Start register.

!Q[CR] – R-Soft Stop (>> [XXXXCR] [!] or [?]). Reads the Time Rate hexadecimal value “XXXX” from the Soft Stop register.

      The following are general descriptionS for the Soft Start (current ramp up) and Soft Stop (current ramp down) commands:

PXXXX[CR]Soft Start (>> [!] or [?]).  Writes the Time Rate in hexadecimal value “XXXX” to the soft start register.  The values ranges from ‘‘0”’ to “EA60”.  The number EA60 used with this command will produce a Time Rate* equal to 12 [s/V] or simply, it will require 60 seconds to reach a full Control Signal of 5 Volts from its 0 Volt value.

Note: Command ”PXXXX”[CR] requires to be saved in case the DPS device is used for an application that always requires rising of power at a slow rate.  Use the “Save” (“$[CR]”) command to enable the Soft Start (current ramp up) capability.

QXXXX[CR]Soft Stop (>> [!] or [?]).  Writes the Time Rate in hexadecimal value “XXXX” to the soft stop register.  The values ranges from ‘‘0”’ to “EA60”.  The number EA60 used with this command will produce a Time Rate* equal to 12 [s/V] or simply, it will require 60 seconds to approach the Control Signal value of 0 Volt from the maximum of 5 Volts.

Note: Command ”QXXXX”[CR] requires to be saved in case the DPS device is used for an application that always requires decreasing power in slow rate.  Use the “Save” (“$[CR]”) command to enable the Soft Stop (current ramp down) capability.

* - Definition of Time Rate:  Time Rate is the extent of time required to raise or decrease 1V of Control Voltage signal.  The Time Rate units are in seconds per volt [s/V] or milliseconds per millivolt [ms/mV].

To calculate Time RatetR” for the given hexadecimal value of Step Duration “Sd, use the following formula:

 

tR = Sd /5000 [s/V] or (Step Duration /Control Volt - net change)

IMPORTANT:            in order to use the above formula, the value of “Sd” must be given in decimal form.

Example 1: for hexadecimal value Sd = 3A98 the equivalent of 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 value Sd = EA60.

To calculate Sd for a known Time Rate “tR”, use the following formula:

Sd =5000 x tR

Example 2:  if the new Time Rate is tR = 3 [sec/V] or [msec/mV] than 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] for the “Soft Start” or Q3A98[CR] for the “Soft Stop”.

!W[CR] - R-All TableReads all Table data (total of 4096 hexadecimal values). The data will be received in the following format:

XXXX_XXXX_XXXX_XXXX_XXXX_[CR] (>> [!] or [?])

w[CR] – S-Linear Table Data. Stores linear data (y = x) into the DPS Table. The date can be retrieved and utilized when the DPS is set to Table Mode.

W[CR] – S-Table DataStores the data in hexadecimal format into the DPS Table.  The date can be retrieved and utilized when the DPS is set to Table Mode.

IMPORTANT:            Stored data must fill up all available table space - from address “0000” to “0FFF” (total of 4096 hexadecimal values).  Data must be sent in the following format:

W[CR]XXXX_XXXX_XXXX_XXXX_XXXX_[CR] (>> [!] or [?])

  IMPORTANT:            Each hexadecimal value of data must be separated by space ( _ ).

!y[CR] – R-Factory Setting (>> [XXXXCR] [!] or [?]).  Reads the initial factory calibration of current. This is the rated current of the DPS device assigned by the factory at the time of product calibration.

!Z[CR] - R-Program.  Reads the program from the DPS memory.  The string will have the following format:

 XXXXXXXXXXXXXXXXXXXXXXX……X]} (>> [!] or [?]) 

ZABCD[CR] – S-Program.  Stores (save) the program data, in hexadecimal format into the DPS memory.  The data must have the following format:

         ZABCD[CR]TTTTXXXXX…]TTTTXXXX…]TTTTXXXXXXXXXXXXXXX…]TTTTXXXXXXX…]}

Expression TTTTXXX..XXX………….] represents a step in the program.  The step always ends with sign “]”.  There are no spaces allowed between steps or between commands within the step.  The program must always end with sign ‘}”.

Note: To erase the previously stored program, execute the ZABCD[CR] command alone.

IMPORTANT:            The first four hexadecimal characters (TTTT) are reserved for Step Duration (time) and then immediately after, follow the step commands. The step must include at least one command. Keep in mind that command must always end with [CR].

The Step Duration can be from a minimum of 0 msec up to a maximum of 10 minutes in 10 msec time intervals.

Therefore, in hexadecimal values:

 0msec   = 0000(hex)

10msec  = 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)

IMPPORTANT:   The maximum length of step is undefined and can include many commands.  The limit is defined by the size of the processor memory, which is 24 kB.

$[CR] - Save.  Saves the specific commands assigned to a DPS into the memory during the programming process.  After the command is saved, the programmable DPS device is able to execute the command the next time the DPS is turned “ON” again.  The “save” command is used in conjunction with the following commands: "#A[CR]",  "IXXXX[CR]",  "NXXXX[CR]", “MXXX[CR]”,  "PXXXX[CR]",  "QXXXX[CR]".

Note: Command ”PXXXX”[CR] or "QXXXX"[CR] requires to be saved only in case the DPS device is used for an application that always requires raise or decrease of power at a slow mode.  Use the Save command to enable the Soft Start or Soft Stop capability.

Back to Top


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

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