Recent

Author Topic: LAMW - is jTCPSocketClient can do modbus for PLC ing?  (Read 5564 times)

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
LAMW - is jTCPSocketClient can do modbus for PLC ing?
« on: October 07, 2021, 03:25:03 pm »
Anyone already used it? for reading modbus.

i got this insterseting modbus library in jar file, maybe some one could wrap it to jTCPSocketClient.

https://github.com/zgkxzx/Modbus4Android

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #1 on: October 07, 2021, 06:33:50 pm »

What about a LAMW "jModbus"   wrapper component?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #2 on: October 08, 2021, 12:36:46 am »
is it already available on LAMW?
« Last Edit: October 08, 2021, 03:21:36 am by Mongkey »

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #3 on: October 09, 2021, 04:09:00 am »
Is there any detail manual for wrapping jar library for LAMW?

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #4 on: October 09, 2021, 04:23:42 am »
Quote
Is there any detail manual for wrapping jar library for LAMW?

You can get from here: (opendrive.com)

https://od.lk/f/Ml8xOTc0OTIwNzNf

a complete tutorial (from image1 to image34) how to add an "online" library to LAMW [new jComponent]!!!

However the "datalogic"  APIs tested in LAMW code returned nothing (nil)...

In fact the library source code pointed by Android Studio is clearly returning null in several APIs....

Edited:

1) Added to LAMW "Docs": "How_to_add_an_online_library_to_LAMW.txt"

2) I will create a initial jModbus component,  so we can try improve it!

« Last Edit: October 09, 2021, 05:35:10 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #5 on: October 09, 2021, 07:37:09 am »
May be in my free time, i could create new library component for LAMW.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #6 on: October 09, 2021, 09:17:17 am »
Done!

New! jModbus component (Alpha)

New demo: "AppModbusDemo1"  (Alpha)


Thank you!


PS1. Please, need tests!

PS2. Now I'm going try to sleep a little....
« Last Edit: October 09, 2021, 09:18:50 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #7 on: October 09, 2021, 11:34:22 am »
Ok, thank you! I'm gonna test it  :D

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #8 on: October 10, 2021, 04:19:27 am »
this jmodbus cannot connect  %)
« Last Edit: October 10, 2021, 05:17:12 am by Mongkey »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #9 on: October 10, 2021, 04:58:30 am »
Quote
this jmodbus cannot connect

Well, you can try help me! (I do not understand anything about Modbus   :-X)

Please,  go to  method "Connect" in " jModbus.java" [".......\android_wizard\smartdesigner\java"]

Maybe, you can found and fix some bug!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #10 on: October 10, 2021, 05:17:25 am »
i found another with example, may be it would be easy porting to LAMW

doc:
https://www.kynetics.com/docs/2018/modbus_android/

source:
https://github.com/kochedykov/jlibmodbus

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #11 on: October 10, 2021, 05:18:54 am »
how to delete failed component from LAMW palette? trying to wrap modbus jar, but failed  :D

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #12 on: October 10, 2021, 05:31:26 am »
Quote
how to delete failed component from LAMW palette?

Why??

But you can!  go to "register_extras.pas"  ["......\android_bridges"]


Quote
trying to wrap modbus jar

How?
 
The tutorial is here: "how_to_create_new_components.txt"      [".....\docs"]
« Last Edit: October 10, 2021, 05:33:03 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #13 on: October 10, 2021, 05:34:28 am »
i build from android studio modbus4android -> ha ha cannot connect also  :D, i dont understand why it got many stars, but cannot do the job  :o
« Last Edit: October 10, 2021, 05:39:34 am by Mongkey »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: LAMW - is jTCPSocketClient can do modbus for PLC ing?
« Reply #14 on: October 10, 2021, 05:44:07 am »
Quote
i build from android studio modbus4android -> ha ha cannot connect also  :D, i dont understand why it got many stars, but cannot do the job  :o

Ok.

But don't give up!  try find the error! "Android Studio" can help you!

(you "net" is ok?  you have a IP/Port for  Modbus server?)
« Last Edit: October 10, 2021, 05:46:19 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018