Hello,
We have develop and tested a Java program which communicates with a Modbus device via a serial port.
We tested it successfully on our machine.
Then, we tried on our FX30 serial. We do have HSL0 and HSL1 ports and we configured the UART 1 in mode 17 (linux application) with mapuart command but the program did not work: nothing happens and no data were retrieved by FX30 from the Modbus device.
I guess it might be due to some configuration I am missing, or a Java library not compatible with the FX30, or a FX30 software issue.
In our Java application, for the Modbus library we use j2mod 2.3.4 which support jSerialComm.
Hi cchenry,
Yes, this is what I’ve done: I created a java application that read from the Serial port of the FX30. The java application use the jSerialComm library to communicate with the port.
Hi,
Yes, we have recompiled the Java sources in order to make them work on the FX30
On one side we have the modbus device that we configured and on the other side we have our Java application trying to read the register.
The Java application has a configuration file in which we specified the configuration of the serial (the port, here ttyHSL0, the baudrate, the stop bit, the encoding, …).
We tested this conf file from our dev machine and it worked correctly. Then when using the exact same conf file but on the FX30, it does not work.
How can I test echo and cat? Maybe something like
echo -ne "test" > /dev/ttyHSL0
? I tried with microcom already but I did not get any response from the modbus and I did not see the modbus receiving any data either.