diff --git a/README.md b/README.md index a69fdfb87b572ed73956fc2b4bd85733fa8341c8..0f67fe3f6f59fc84f305c73f46f9722cbcc4596d 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