NdiayeeCheikh commented on issue #1212:
URL: https://github.com/apache/plc4x/issues/1212#issuecomment-2863611344
Hi can someone help.
I just have a simple code for testing the connexion,
but i dont undestand the output prompted:
He's the code :
package com.example.plcapp;
import org.apache.plc4x.java.api.PlcDriverManager;
import org.apache.plc4x.java.api.PlcConnection;
import org.apache.plc4x.java.api.messages.PlcReadRequest;
import org.apache.plc4x.java.api.messages.PlcReadResponse;
import java.util.concurrent.TimeUnit;
public class ModbusClient {
public static void main(String[] args) {
System.out.println("Bonjour");
// Adapter le port s..rie selon ton syst..me (ex: COM1 sur Windows,
String connectionString = "modbus-rtu:serial://dev/ttyV0?request-tim
// System.out.println(plcConnection);
try (PlcConnection plcConnection = PlcDriverManager.getDefault().getC
} catch (Exception e) {
System.out.println("---------Bonjour---------");
e.printStackTrace();
}
}
}
OUTPUT:
/media/sda4/plc4x/plc-demo # mvn exec:java -Dexec.mainClass="com.example.plc
app.ModbusClient"
[INFO] Scanning for projects...
[WARNING] This build will only read from the build cache, since the clean
lifecycle is not part of the build invocation.
[INFO]
[INFO] --------------------< com.example.plcapp:plc-demo
>---------------------
[INFO] Building plc-demo 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar
]---------------------------------
[INFO]
[INFO] --- exec:3.1.0:java (default-cli) @ plc-demo ---
Bonjour
[com.example.plcapp.ModbusClient.main()] INFO
org.apache.plc4x.java.DefaultPlcDriverManager - Instantiating new PLC Driver
Manager with class loader
org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader@9a88a92
[com.example.plcapp.ModbusClient.main()] INFO
org.apache.plc4x.java.DefaultPlcDriverManager - Registering available drivers...
[com.example.plcapp.ModbusClient.main()] INFO
org.apache.plc4x.java.DefaultPlcDriverManager - Registering driver for Protocol
modbus-ascii (Modbus ASCII)
[com.example.plcapp.ModbusClient.main()] INFO
org.apache.plc4x.java.DefaultPlcDriverManager - Registering driver for Protocol
modbus-rtu (Modbus RTU)
[com.example.plcapp.ModbusClient.main()] INFO
org.apache.plc4x.java.DefaultPlcDriverManager - Registering driver for Protocol
modbus-tcp (Modbus TCP)
[com.example.plcapp.ModbusClient.main()] INFO
org.apache.plc4x.java.transport.serial.SerialChannelFactory - Configuring
Bootstrap with
org.apache.plc4x.java.transport.serial.DefaultSerialTransportConfiguration@39377e46
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]