From d633314f5dbcbdf7e864542866a9ad07612ea977 Mon Sep 17 00:00:00 2001 From: Alain Klotz <alain.klotz@irap.omp.eu> Date: Thu, 4 Jul 2024 19:44:46 +0200 Subject: [PATCH] Update README.md --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a69fdfb..0f67fe3 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,27 @@ GuitAstro is a Python module that provides classes and methods to write easily P [GIT repository: https://gitlab.in2p3.fr/irap-omp/guitastrolib/guitastro.git](https://gitlab.in2p3.fr/irap-omp/guitastrolib/guitastro.git) -Guitastro device Siemensae02 complete Guitastro to provide access to SIEMENSAE02 focuser drivers: +Guitastro device Siemensae02 complete Guitastro to provide access to SIEMENSAE02 PLC drivers: [GIT repository: https://gitlab.in2p3.fr/irap-omp/guitastrolib/guitastro_device_siemensae02.git](https://gitlab.in2p3.fr/irap-omp/guitastrolib/guitastro_device_siemensae02.git) ## Few basic examples of use -First example: To connect a Siemensae02 controler and drive a focuser: +First example: To connect a Siemensae02 controler and drive a PLC: ``` import guitastro import guitastro_device_siemensae02 -dev = guitastro_device_siemensae02.Device_Siemensae02() +name = "AE02" +delay_put_read = 0.1 +end_of_command_to_receive = "@" +hostname = "192.168.10.59" +port = 4002 +dev = guitastro_device_siemensae02.Device_Siemensae02("TCH_TCP", transport="TCP", port=port, hostname=hostname, delay_put_read=delay_put_read, end_of_command_to_receive=end_of_command_to_receive, name=name) dev.open(False) -dev.commandstring("focuser SET target 50000") -dev.commandstring("focuser GOTO") + +state = dev.commandstring("relays DO STATE") +state = dev.commandstring("relays DO ACTION 'Close TOIT_SUD'") ``` ## Guitastro functionalities -- GitLab