Videotec SM328B User Manual

Page 31

Advertising
background image

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

' when receiving goto Received

DO WHILE (1)
A$ = UCASE$(INKEY$)

' check keys to exit

SELECT CASE A$

CASE "1":

' switch camera 1 on monitor 1

PRINT #1, "[VA0PC1VidS1,1B]";

CASE "2":

' switch camera 2 on monitor 1

PRINT #1, "[VA0PC1VidS1,2C]";

CASE "S":

' automatic sequence on monitor no.1

PRINT #1, "[VA0PC1VidA1U]";

CASE CHR(27):

' exit from program with Escape
END

END SELECT
LOOP

Received:
DO WHILE NOT(EOF(1))
B$ = INPUT$(1,1)
IF B$ = "[" THEN PRINT
PRINT B$;

' print the characters received on the serial channel

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

Page 29/65

MNVCSM328A_0438

Advertising