Hi, I’m at this moment in the midst of developing some client/server tools with some mobile/desktop Apps!
The only thing I’m missing is a kind of professional Module/Class or something like that for communication with Modbus RTU and Modbus TCP.
- Do you know about something Modbus within Xojo?
- Do you have it and do you want to share/sell it?
- Do you know how to create a plugin?
I did that before. I could add you the CRC function…
Isn’t it a little bit more than some CRC?
you send data packets to the device.
Those can be easily built with a memoryblock.
So I did it before for FileMaker.
The difficult part is the CRC, but I can copy the code to the Xojo plugins.
CRC would be nice for Lin/Win/Mac of course!
But a dedicated class for RCU and TCP would be very welcome!
For me it’s to difficult to understand in a short period of time when I look at simplymodbus
[code] dim m as new MemoryBlock(9)
m.UInt8Value(0) = 1 // start of package
m.UInt8Value(1) = 6 // command code
m.UInt8Value(2) = 0 // some data…
m.UInt8Value(3) = 0
m.UInt8Value(4) = 0
m.UInt8Value(5) = &h21
m.UInt8Value(6) = 0 // checksum comes here
m.UInt8Value(7) = 0
m.UInt8Value(8) = 4 // end of package
dim Data as string = m.StringValue(0,6)
dim CheckSum as Int16 = ModBusCalculateRTUMessageCRCMBS(data)
m.UInt16Value(6) = checksum
you build the queries, send them via Socket or SerialPort and parse result.
Thanks! Tomorrow I will have the right PLC in my office to do some tests!