beautypg.com

Appendix a: programmer's guide, Annexe a: guide de programmation – Analog Way BROAD SCAN - Ref. BSC730 Programmer's Guide User Manual

Page 2

background image


APPENDIX A: PROGRAMMER'S GUIDE

A-1: INTRODUCTION

If you need to use your own Software Control program from a PC or

WORKSTATION with an RS-232 port, the device allows communication through an

ASCII code protocol.

The device treats any character that it receives on the RS-232 as a possible command

but only accepts legal commands. There is no starting/ending code needed in a

command string.

A command can be a single character typed on a keyboard and does not require any

special character before or after it. (It is not necessary to press "ENTER" on the

keyboard). A command can be preceded by a value (See chapter A-2: COMMANDS

STRUCTURE).

When the device receives a valid command, it will execute the command. Then it will

send back the status of the parameters that have changed due to this command.

If the command cannot be executed (value out of range, no signal on the selected

input), the device will just sends back the current status of the corresponding

parameters.

If the command is invalid, an error response will be returned to the control device. All

responses returned to the control device end with a carriage return and a line

feed signaling the end of the response character string (see chapter A-3:

ERROR RESPONSE).

ANNEXE A: GUIDE DE PROGRAMMATION

A-1: INTRODUCTION

Si vous souhaitez utiliser votre propre logiciel de contrôle avec votre PC, MAC ou

Station de Travail par un port RS-232, l'appareil peut communiquer par simple

émission / réception de caractères ASCII.

L'appareil traite tous les caractères reçus sur son port RS-232 comme des commandes

possibles; seules certaines commandes sont reconnues et acceptées.

Une commande est constituée d'un ou deux caractères sans code de contrôle ni avant,

ni après. Il n'est pas nécessaire d'appuyer sur "ENTER" du clavier. Une commande

peut être précédée d'une valeur (voir chapitre A-2: STRUCTURE D'UNE

COMMANDE).

Lorsque l'appareil reçoit une commande valide, il exécute cette commande puis

renvoie à l'appareil de contrôle l'état de tous les paramètres qui ont été modifiés suite

à l'envoie de cette commande.

Si la commande n’est pas reconnue (valeur en dehors de la plage, pas de signal sur

l'entrée sélectionnée), l'appareil renvoie uniquement les états des paramètres

correspondants.

Si la commande est invalide, une réponse d'erreur sera retournée à l'appareil de

contrôle. Toute réponse faite à l’unité de contrôle se termine par un retour à la ligne

et par un saut de ligne (CR / LF) signalant la fin de la commande de réponse. (Voir

chapitre: A-3: RÉPONSE D'ERREUR)

.

A-2: COMMANDS STRUCTURE

Commands are usually composed of a numerical value followed by the command

character. The characters used without any numerical value return the current setting

of the command.

Command = Value (optional) + Character.

A-2: STRUCTURE D'UNE COMMANDE

Les commandes sont généralement constituées d'une valeur numérique suivit par 1 ou

2 lettres de commande. Une lettre utilisée sans valeur numérique renvoie l'état de la

commande.

Commande = Valeur (optionnelle) + Caractère

Examples / Exemples:

Command / Commande

Response

Réponse

Description

Value/ Valeur

Character / Caractère