5 — VEHICLE CONTROL LANGUAGE (VCL)
pg. 79
Curtis Model 1351 – December 2018
Variables and Constants
All 1351 VCL user variables and parameters are 32-bit signed integers. This greatly simplifies many
mathematical operations, as the risk of integer overflow is greatly reduced. Note that Constants are
limited to 16 bits.
VCL VARIABLE TYPES AND MEMORY
VCL provides dedicated memory space to store custom variables. The variable type determines whether
they are stored and used in volatile memory or stored non-volatile memory.
VCL uses 2 types of memory.
1. RAM (Random Access Memory) which is volatile memory for the VCL run-time variables.
2. FRAM, (Flash Random Access Memory) is non-volatile memory (NVM) for retaining variable
values for power-up/down logs.
RAM variables are stored only while power is on; they are lost at power-down. They must be initialized
upon power-up by explicit VCL assignments. The
user
and
autouser
variables are in this category (i.e.,
User1 = 12
).
FRAM variables can be saved at power-down and restored at power-on. The P_Users (parameters)
and NVUser variables are in this category (i.e.,
P_User12
and
NVUser12
).
At power-up, all variables values are loaded in to RAM for run-time operation.
P_User parameters are a special type of variable that is intended to be used to create OEM defined
CSS/1313 HHP programmer parameters. These parameters can be defined up to 32-bit by using the
P_User
(1-300) variables. These variables are typically written to FRAM through the CSS or 1313
HHP Programmer app (i.e., when a dealership technician changes these created parameter settings
using the 1313 HHP). These
P_User
variables can be used/changed in the VCL code, but changing
a
P_User
value with VCL will only change the variable value in RAM and will not change the value in
FRAM. Thus, these variables are intended for creating and defining CSS and 1313 HHP Programmer
app parameters only.
VCL can modify the control mode parameters in RAM by using the VCL variable name for the
programmable parameter. For example,
Driver_1_Ramp_Up_Time = 300 ; Change Ramp-up Rate to 300 ms
will change the RAM value of the Driver 1 Ramp Up; the new value will be used in determining the ramp-
up rate during operation. However, the value of the parameter’s stored in FRAM remains unchanged; so
when the controller is turned off, the run-time RAM value will be lost. The next time the 1351 system
controller is powered back on, the “old” value of Ramp Up will be restored from FRAM memory. To
save this RAM value in VCL, the VCL writer must use the
NVM_Write_Parameter
function ((i.e.,
NVM_Write_Parameter(Driver_1_Ramp_Up_Time)
).
Once again, Parameter values that are changed by using the CSS or 1313 HHP programmer are saved
directly to FRAM memory. The CSS and 1313 HHP changes will be retained and restored the next time
the 1351 system controller is powered back on.
Table 21 summaries the available 1351 system controller VCL variables by memory type.