The Command Line Interface (CLI) is an option that can be
ordered with the PRO version that allows an external optimization
tool to take control of SERVOsoft and utilize the Sequence Auto Update
feature. The external tool can be a profile generator, or more
typically, an optimizing tool (OT) that adjusts the Sequence with
each iteration. Sequences can be formed as any that can be created
or imported within the program including CAM Profiles, and
Polynomials and Splines in addition to dynamic payload and thrust
values.
An OT commands SERVOsoft using the CLI. When SERVOsoft is
launched in CLI mode, it opens the specified project file, and
launches the Sequence Auto Update feature
for the specified Slot Number. SERVOsoft then begins the
handshaking process of listening, processing and providing an XML
report for each new Axis Sequences (Seq.txt) provided by the OT in
the “Working Folder”. When the OT is done, the OT passes a final
“Done” sequence file. Then SERVOsoft shuts down.
The CLI uses a pipe “|” delimiter in the form:
SERVOsoft.exe
CommandType|VisibleState|ProjectFile|WorkingFolder|OperatingMode|[SlotNumber]
- CommandType
- Value: 100
- An integer representing the current interface type
- Can be expanded with different interface variations in the
future, with additional values
- VisibleState
- Values:
- 0 (minimized)
- 1 (visible)
- Whether the program runs minimized [0] or is visible [1]
- Can be used for debugging. Otherwise, run minimized for better
performance, where GUI updates are not called.
- ProjectFile
- The full path and filename of the SERVOsoft [.ssp4] project
file
- WorkingFolder
- Specifies where the “Seq.txt” file will be set
- Eg. “C:\WorkingFolder\Seq.txt”
- The results will be saved under “C:\WorkingFolder\Results”
- OperatingMode
- Values:
- 0 (Normal)
- 1 (Max-Stop)
- 2 (Backup Power)
- [SlotNumber]
- Values: 1, 2, … up to the slot number of last drive motor
mechanism in project file
- Specifies which slot/axis to be commanded
- If not specified, by default the first drive motor mechanism
axis in the project is used
The Seq.txt file format is defined by the user in the project
file Axis Sequence as per the Sequence Auto Update
feature. To end the process, the final Seq.txt file contains just
the word “Done”. To continue working on another axis in the same
project, then the Seq.txt file can add a second line specifying the
next slot number.
The syntax is as follows:
Done
{NextSlotNumber=X}
Where the {} brackets indicate an optional parameter and X is
the next slot number. X must be a valid slot number between 1 and
the maximum number of axes in the project, and the X Slot Type must
be “Drive Motor Mechanism” and not a module such as an Infeed,
Bleeder, etc.
For example, if after working on Axis 1, you want to start
working on Axis 2, the Seq.txt file will be:
Done
NextSlotNumber=2
And then if you want to switch to another axis, or for example,
go back to working on Axis 1, the Seq.txt file will be:
Done
NextSlotNumber=1
If [NextSlotNumber] has not changed, then the program will
remain on the current Slot Number and keep listening for the next
Seq.txt.
Note that the Slot Number must be a “Drive Motor Mechanism”
slot.
The Slot Number is a specific Axis in a project. For example, if
a project contains 2 Power Groups, each with an Infeed (Inf) and
Bleeder (Bld) Module + 3 axes – X, Y & Z. Ie. 5 slots in each
Power Group (PG). Then the 10 Slot Numbers are:
TreeView |
Slot |
Abbreviation |
Type |
|
- |
PG1 |
Power Group |
1 |
PG1.Inf1 |
Infeed Module |
2 |
PG1.Ax1 |
Axis |
3 |
PG1.Ax2 |
Axis |
4 |
PG1.Ax3 |
Axis |
5 |
PG1.Bld1 |
Bleeder Module |
|
- |
PG2 |
Power Group |
6 |
PG2.Inf1 |
Infeed Module |
7 |
PG2.Ax1 |
Axis |
8 |
PG2.Ax2 |
Axis |
9 |
PG2.Ax3 |
Axis |
10 |
PG2.Bld1 |
Bleeder Module |
In this example, Slots 2-4 & 7-9 are valid for the Command
Line Interface since they are “Drive Motor Mechanism” also referred
to as “Axis” slots, whereas Slots 1, 5, 6 & 10 are
“Infeed Module” and “Bleeder Module” slots. A “Module”
slot can be an Infeed, Bleeder, Capacitor or Energy Storage Module
(ESM). While the XML report includes the utilization for these
modules, these are not Sequence based axes, and therefore cannot
accept a Seq.txt file.
Related topics