This is an automated email from the ASF dual-hosted git repository.

hutcheb pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 303892317c fix(plc4py): Add more to fix documentation
303892317c is described below

commit 303892317c8db967b0b4dbe0d53f84c8ab6bad18
Author: Ben Hutcheson <ben.hut...@gmail.com>
AuthorDate: Mon Mar 4 19:58:35 2024 +0100

    fix(plc4py): Add more to fix documentation
---
 src/site/asciidoc/users/getting-started/plc4py.adoc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/site/asciidoc/users/getting-started/plc4py.adoc 
b/src/site/asciidoc/users/getting-started/plc4py.adoc
index 2a6e04d92d..83d5509e85 100644
--- a/src/site/asciidoc/users/getting-started/plc4py.adoc
+++ b/src/site/asciidoc/users/getting-started/plc4py.adoc
@@ -32,11 +32,12 @@ Navigate to the sandbox/plc4py directory and run. This will 
install plc4py in yo
 You now should be able to use PLC4Py in your application. A minimal example is 
shown below.
 
 ----
+import asyncio
 from plc4py.PlcDriverManager import PlcDriverManager
 
-connection_string = "modbus://192.168.1.174:502";
-
+connection_string = "modbus://192.168.1.174:502"
 driver_manager = PlcDriverManager()
+
 async def communicate_with_plc():
     async with driver_manager.connection(connection_string) as connection:
         with connection.read_request_builder() as builder:
@@ -47,6 +48,7 @@ async def communicate_with_plc():
     await future
     response = future.result()
 
+asyncio.run(communicate_with_plc())
 ----
 
 PLC4X generally supports a very limited set of functions, which is not due to 
the fact, that we didn't implement things, but that PLCs generally support a 
very limited set of functions.

Reply via email to