Execution Sequence of Operations within a gp_test mode
The Test Manager (gp_test) uses a unique language for specifying actions within a test mode for setting control targets, requesting fuel readings, setting variable values, and so on. The gp_test language is not a scripting language where the sequence of operation is based on the sequence in which the operations are specified. Instead, there is a hard-coded sequence of operation. The following describes the sequence of actions when a test mode is started. This sequence is unrelated to the order in which the corresponding keywords are entered in the gp_test procedure file.
- Perform conditional tests to see if the mode is to be skipped. The conditional test are @IF_TRUE, @IF_FALSE, and @SWITCH. If the tests indicate that a new mode or test procedure should be started, then the mode is exited and none of the other actions are executed except those which have a start_code of “AT_END”.
- Any @PARAMETERS or @SET_DISPLAY_STATUS values will be set.
- Any control loop operations are executed. (@SPEED, @TORQUE, @DYNO, @THROTTLE, @USER_LOOP, @PID_GAINS, @ENGINE_CONTROL_MODE, @PID_GAINS, @FEED_FORWARD, @GET_PID_GAINS, @GET_FF_GAIN, @CONTROL_TOLERANCE)
- Send any events specified by @SET_EVENTS.
- Configure any limits specifications specified by @LIMIT_SPECS.
- Configure any ramping operations specified by @RAMP or @RAMP_DYNAMIC
- Configure fuel reading operations specified by @FUEL_READING, @PAM_DATAPOINT, @FUEL_READING_SYNC, and @FUEL_READING_STATS
- Communicate with any applications launched by @AUXILIARY_TASK or @TEST_TABLE
- Configure any stability operations specified by @STABILITY_SPECS
- Perform communications specified by @ASC
- Perform all ECM communications specified the @ASAM3…. Keywords
- Perform any file writing operations specified by @WRITE_VALUES
- Launch background scripts specified by @BACKGROUND and @BACKGROUND_TASKS
- Perform AK and DEVCOM communications
- Perform an CYBER related configuration commands
- Send any specified emails specified by @EMAIL
- Perform UNICO related communications with the dyno controller
- Configure operations specified for multi-filter changers (@MFC_CMD)
- Configure operations specified by @CHAIN_EVENTS (cyflex.6.3.0 and later)
- Configure state machine operations specified by @STATE_MON_ACTIONS and related STATE_MON keywords.
As an example, if you use@AUXILIARY_TASK to read a value from a file, you specify the index in the file (often using the ‘count’ integer variable ). In the gp_test procedure file you could do the following:
########################################################
@AUXILIARY_TASK
AT_START MODE_TERMINATE 99
/cyflex/bin/vrbl_to_file “specs/gp/myfile READ count”
@PARAMETERS
AT_START count 100
This would cause vrbl_to_file to read index 100 from “myfile”, because @PARAMETERS are executed BEFORE @AUXILIARY_TASK operations. So, it really doesn’t matter where the @PARAMETERS keyword is positioned within the mode, that operation happens before the value of the ‘count’ variable is sent to vrbl_to_file.