Vicking electronics
Pag. 17
Send data to RS232 port
127
(dec)
+ Data string
The WORKmate sends the Data string on the RS232 serial port of the WORKmate.
The baud rate and the protocol of the RS232 port can be set in the setting menu.
The 127 code is followed by the data to be transmitted, the data can not be longer than 95 bytes.
After the 127 code no other workmate commands can be used only data to be transmitted.
After the complete data is transmitted the workmate will respond with a function code , so the software can
execute the next task for the workmate. See the chapter “The terminal output function codes”.
The characters in the Data string must be between 1 and 127.
The code 13(dec) (Carridge return) can’t be used, the online protocol uses 13 as a block terminator.
Use 1(dec) instead, this will be translated to 13 before it is transmitted on the RS232 port.
Long strings of the same characters can be transmitted shorter with this 3 byte code:
2(dec) , Repeat 31 , ASCII code of character
For example a string of 40 times a minus ‘-‘character 2(dec) 71(dec) 45(dec)
ONLINE example
Transmit: 127Total time01 10 02 71-
Send to serial line command, send text ‘Total time’,
Carriage return, Line feed, send 40 times ‘-‘
OFFLINE direct example
CHAIN $SERIAL%127
CHAIN $CRLF%1%10
PRINT $ADRES,$SERIAL,”PRINT TEST”,$CRLF : SEND
OFFLINE parameter example
Is not possible with parameters
Real time clock display
2
(dec)
and 3
(dec)
A workmate has no real time clock, if you want to show the current time and date on the workmate display it
has to be transmitted repeatedly.
Because it would be difficult to program this in VIPRO the concentrator takes care of this.
The codes described below are generated automatically in an off-line concentrator by the VIPRO language.
In an on-line concentrator you have to send them yourself.
3 (dec) activate read time clock display :
With this command you prepare the WORKmate to display the time and date in a certain way.
The settings are cleared when you clear the screen or when a data input is finished on the WORKmate.
For example you want to see the time in the main menu of an application program. Every time the main
screen is send to the WORKmate you also have to send this command, in the sub-dialogs where you don’t
want to see the time, you don’t send this command.
This command has 2 variations.