Configuration file
General information
Read the "USB port" section first if you have not already done so.
The configuration file cfg.txt
has the purpose of preassigning values for the object
directory to a specific value at start up. This file is kept in a special syntax to keep access to
objects in the object directory as simple as possible. The motor controller evaluates all
assignments in the file from the top downwards.
Note |
---|
Should you delete the configuration file, the file is recreated (without content) at the next motor controller restart. |
Reading and writing the file
To access to the file:
- Connect the voltage supply and switch on the voltage supply.
- Connect the motor controller to your PC by using the USB cable.
- After the PC has recognized the device as a removable storage medium, navigate with the Explorer to the
directory for the motor controller. The file "
cfg.txt
" (in case of a PD4-C the file is named "pd4ccfg.txt
") is stored there. - Open this file with a simple text editor, such as Notepad or Vi. Do not use any programs that use text styles (LibreOffice or suchlike).
After you have made changes to the file, take the following action to apply the changes:
- Save the file if you have not already done this.
- Disconnect the USB cable from the motor controller.
- Disconnect the voltage supply from the motor controller for approx. 1 second.
- Reconnect the voltage supply. At the next motor controller startup, the new values in the configuration file are read out and applied.
Tip |
You can also copy an empty file This restarts the motor controller. The file |
Structure of configuration file
Comments
Lines that start with a semicolon are ignored by the motor controller.
Example |
|
|
Assignments
CAUTION |
---|
Beforeyou set a value, find out about its data type (see the "Object directory description" section). The motor controller does notvalidate any entries for logic errors! |
<Index>:<SubIndex>=<Value>
-
<Index>
- This value corresponds to the index of the object and is interpreted as a hexadecimal number. The value must always have four digits.
-
<SubIndex>
- This value corresponds to the sub-index of the object and is interpreted as a hexadecimal number. The value must always have two digits.
-
<Value>
- The value that is to be written into the object is interpreted as a decimal number. A
"
0x
" is to be added to the front for hexadecimal numbers.
Note |
---|
|
Example |
|
Setting object 6040
h:00 to the value "6":
|
Short-circuit evaluation
DIP switches can only be used for executing certain assignments. The following syntax is used for short-circuit execution:
#<No>:<Assignment>
-
<No>
- The number of the DIP switch printed on the switch is given here. Permissible values are 1 to 4
-
<Assignment>
- The assignment specified here is described in the "Assignments" section.
Example |
|
The following code is set by the object 2057 h:00h "Clock Direction Multiplier"):
|