4.5 E
XEMPLE
//Lancement d'une classe pour gérer un MicroGraph LED par Ethernet
DisplayBoardManager
Technology.LED, Model.MICROGRAPH, CommunicationProtocol.Ethernet);
mgr.EthIPAddress = "192.168.0.123";
mgr.EthPortNumber = 21967;
//Ou par port série
/*
DisplayBoardManager mgr2 = new DisplayBoardManager
(Technology.LED, Model.MICROGRAPH, CommunicationProtocol.Serial);
mgr2.PortName = "COM1";
mgr2.BaudRate = 9600;
*/
// Ouverture de la connexion... (facultatif, s'ouvre à la première commande)
mgr.OpenConnection();
//contrôle de connexion
if
(!mgr.Connected)
{
//...
}
// Exemples de commandes
// Reset
mgr.StrongReset();
//Définition de la luminosité
mgr.SetBrightnessType(BrightnessType.MANUAL);
mgr.SetBrightness(50);
// Écriture chaîne avec protocole graphique X,Y
mgr.Font = GraphFont.HUGE;
mgr.WriteString(0, 0, "BIG");
mgr.Font = GraphFont.SMALL;
mgr.Alignment = Alignment.RIGHT;
mgr.WriteString(128, 22, "small");
//Écriture chaîne avec protocole alphabétique row,column
mgr.WriteString("A", 6, "medium");
// Définition Real Time Clock à 00:00 et affichage en X,Y
mgr.SetClock1(0,0,0,0);
mgr.Alignment = Alignment.LEFT;
mgr.ShowClock1(54, 22,TimeFormat.MM_SS,0);
//Nettoyage...
mgr.CloseConnection();
mgr.Dispose();
Microgate
mgr =
new
DisplayBoardManager(
MicroGraph LED Guide de l'utilisateur
Pag. 83 sur 88