Specifications

44
Curtis 1310 Manual, Rev. B
5 — VCL
If (ADC11_Output > 1000)
{
;Error! There is a short dragging down the supply
;or too much current draw.
}
If the sensor or encoder needs +12V power, that is available at J3-4 and the
output current is sensed at ADC-12.
Arrays
Strings are handled in a unique way in VCL. All the string definitions are
taken in THE order they appear in VCL and concatenated together into one
large string array that is attached to the end of the VCL program. The array
of strings is then indirectly addressed through their index into the array. If we
know the first message in the array, we can index off it to find the next. In this
way, a one dimensional array of strings can be made and addressed. This can
be useful in creating messages for the Spyglass.
The following example creates a 5-string array and outputs a new message
to the Spyglass every 500 ms, depending on a user variable.
Display_Offset equals User1
MSG_01 string “HELLO”
MSG_02 string “ARRAYS”
MSG_03 string “WITHIN”
MSG_04 string “VCL”
MSG_05 string “STRINGS”
Display_Offset = 0
Main:
Put_Spy_Text(MSG_01 + Display_Offset)
setup_delay(DLY2, 500)
while (DLY2_Output <> 0) {} ; 500 msec
Display_Offset = Display_Offset + 1
If (Display_Offset = 5)
{
Display_Offset = 0
;reset the offset if it is past the last message
}
goto Main