APPENDIX A — VCL FUNCTIONS
Curtis Model 1351 – December 2018
Return to TOC
pg. 124
Function Name
new/unique to 1351 = (✔)
Arguments Short Comment Description
Get_Map_Segment 2 Return the Segment Containing X This function returns the segment (0 to 7) of the
input variable using the specied map. If the
X input is less than the lowest X value in the
table, then the segment number will be 0. If the
X input is greater than the highest X value, then
the segment number will be equal to the number
of XY pairs in the table plus one. For example, if
you have a table with three X/Y pairs (44,123,
100,230, 300,5000) then: setting FP2=33
would return 0 " FP2=88 " " 1
" FP2=150 " " 2 " FP2=400 "
" 3
MulDiv 3 Multiply the Input by Multiple, then
divide by Divisor
This function returns the value of its input
multiplied by Multiplier parameter and then
divided by Divisor parameter. If the divisor is
equal to 0, and both multiplier and value are
greater than zero or, if both multiplier and
value are less than zero, then the output will be
MAXIMUM = 32767; otherwise, the output will be
–32768
Automate_MulDiv 4 Run the Multiply/Divide function
automatically
This function returns the value of its input
multiplied by Multiplier parameter and then
divided by Divisor parameter.
Get_MulDiv 4 Multiply the Input by Multiple, then
divide by Divisor
This function returns the value of its input
multiplied by Multiplier parameter and then
divided by Divisor parameter. If the divisor is
equal to 0, and both multiplier and value are
greater than zero or, if both multiplier and
value are less than zero, then the output will be
MAXIMUM = 32767; otherwise, the output will be
−32768
NVM_Write_Parameter 1 Write a parameter to non-volatile
memory
This function writes the value of the parameter to
non-volatile memory. Be aware, writes typically
take 6ms to complete. You should monitor
NVM_Status to determine when the operation
nishes and/or check the function return value
to make sure that the write was accepted.
The parameter's value is saved in this routine
(although you should not write to it again until the
write operation has completed).
Automate_PID 8 Set the PID Loop up to run
automatically
This function allows you to set up a PID that
runs automatically on each clock tick. You
can specify any Variable for the parameters:
Setpoint, Feedback, Kp, Ki and Kd. The value of
Kp is normalized to a value of 16384. What this
means is that, when both the Setpoint and the
Feeback variables range from 0 to 32767, a value
of 16384 for Kp will cause the loop to track the
setpoint. A lower value for Kp will result in the
output being less than the setpoint, while a higher
value of Kp will cause the output to exceed the
setpoint. The MulDiv and/or Scale functions may
be needed to adjust the values of Setpoint and
Feedback.
Reset_PID 1 Reset the PID Loop Variables This function resets all of the PID loop variables