Download SERS Version V04 Installation and programming manual
Transcript
Stögra
SERS
Programming and operating the SERS
4. Programming and operating the SERS
4.1 Syntax - general notes
-
each line sent to the SERS must begin with the character ‘#‘ !
e.g.: #ON will switch on the phase current – the line begins with ‘#‘
-
each line must be finished with Carriage Return (Return-key of the keyboard
corresponds to the ASCII-character '#13' - decimal number 13 in the ASCII-table - when
writing a (e.g.) PC-program) or Linefeed (ASCII-character #10)
e.g. programming in PASCAL – a string with an assignment 'W=1000' sent to the
SERS via the COM-interface must be programmed as string := ‘#W=1000‘ + #13
-
Commands will be executed by the SERS already before receiving a Carriage Return!
E.g. when writing #ON and a following Carriage Return the current of the motor phases
will be switched on already before the Carriage Return !
-
There may be multiple commands and parameters in one line before writing a
Carriage Return – but maximum 60 characters in one line.
e.g.: #ON V=1000 W=2500 O=1 E may be written in one line and at the line end
finished with a Carriage Return.
-
Carriage Return (CR - #13) and Line feed (LF - #10) will be echoed with a 'ok' and
a digit by the SERS, in case the sent commands and parameters are free of errors. The
digit can be '0' to '4'.
'0' : Drive is running (P336=0 )
'1' : Drive is in position (P336 = 1)
'2' : Drive is running and a warning was created ( P12 > 0)
'3' : Drive is in position and a warning was created ( P12 > 0)
'4' : There is an error at the drive ( P11 > 0)
The characters, sent by the SERS are :
#10 ok1 #10 #13 or #10 ok4 #10 #13 → string with LF, ‘ok‘, digit, LF und CR
In the programming mode (4.5.3 page 30) there will be sent "pgm” instead of “ok“!
-
In the V24-mode each sent character to the SERS will be returned (echoed) from the
SERS (mode-selection via parameter P1017).
Attention : In the mode HANDSHAKE_RS485 the SERS will return only the "ok"
("pgm") after receiving a Carriage Return or Linefeed - there is no character echo !
-
If the commands or parameters are faulty, then error messages will be returned.
Error messages start with the character ‘*‘.
e.g.: ***limit switch open*** in case the drive is on a limit switch (input limit switch
is open) and a start command 'E' (execute positioning job) was sent to the SERS
When receiving faulty syntax, the SERS will return immediately an error message.
When receiving faulty values (e.g. to big) then depending on the values the SERS will
return an error message before or after a Carriage Return.
Attention : In the mode HANDSHAKE_RS485 (see parameter P1017 – Handshake)
error messages are returned always only after a finished line (Carriage Return
/ Line feed) !
- 23 -