5Baud Rate And Data Format; 6Example Of A Program; Command List; 1Acknowledge - Videotec SM328A Manuel D'instructions

Table des Matières

Publicité

Les langues disponibles
  • FR

Les langues disponibles

  • FRANÇAIS, page 141
4.3.1.5
Baud rate and data format
The baud rate is the same as the one set by the DIP switch for communications with the keyboards. Its
format is 8,N,2.
4.3.1.6
Example of a program
The following is a simple test program in BASIC, which can be used as a guide when creating more
complex control systems.
The program makes use of serial port COM1 with baud rate 9600.
OPEN "COM1:9600,n,8,2,bin,rb1000,ds0,cs0,cd0,rs" FOR RANDOM AS #1
COM(1) ON
ON COM(1) GOSUB Received
DO WHILE (1)
A$ = UCASE$(INKEY$)
SELECT CASE A$
CASE "1":
CASE "2":
CASE "S":
CASE CHR(27):
END SELECT
LOOP
Received:
DO WHILE NOT(EOF(1))
B$ = INPUT$(1,1)
IF B$ = "[" THEN PRINT
PRINT B$;
LOOP
RETURN
4.3.2

Command list

The following is a list of commands for remote control of the matrix. The list includes the switching
commands and a number of commands for reading matrix status.
4.3.2.1
Acknowledge
The matrix responds in three ways:
it transmits [ok] on receiving a command for immediate action without asking for the status
it transmits a value if a parameter status is asked for
it transmits [err] if there is an error (parameters outside the allowed range or checksum error).
4.3.2.2
Typographical conventions
The PC message has a fixed heading ( VA0PC1) and is indicated below by the symbol #; the checksum is
indicated by $. For example, [#Clr+ n$ ] with n=1 represents the command [VA0PC1Clr+1W] .
In the matrix responses described in the following table the space (blank ASCII 32) is represented by _
4. Advanced Functions
' when receiving goto Received
' check keys to exit
' switch camera 1 on monitor 1
PRINT #1, "[VA0PC1VidS1,1B]";
' switch camera 2 on monitor 1
PRINT #1, "[VA0PC1VidS1,2C]";
' automatic sequence on monitor no.1
PRINT #1, "[VA0PC1VidA1U]";
' exit from program with Escape
END
' print the characters received on the serial channel
Page 29/66
MNVCSM328A_1511_EN

Publicité

Table des Matières
loading

Table des Matières