Modbus RTU and Modbus TCP from scratch ! :(

Begonnen von mbruck, 08. Oktober 2013, 12:17:11

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

mbruck

Hi !

I have SC24IEC DIP32 package module from BeckIPC company. This is very nice module with programming in CodeSys 2.3. It is more like microcontroller.
Bad story is that BeckIPC is not write ANY kind of support for any industrial protocol. Even there is very good hardware base (Ethernet, 2XUsart , CAN).
What there is support for only basic 485 (serial) and TCP/IP routines (EasyIP).   
I forget to say that SC24 module basically came as RTOS module programming in pure C. CodeSys language is only optional, and not a flagship product. Unfortunate for me, it BeckIPC support is under any reasonable value, since they are not interested to write this functions for CodeSys language.  Fortunate full CodeSys IEC 61131-3 languages are supported.
Now I have to write Modbus RTU and Modbus TCP support, at least that module behave as master PLC that can R/W I/O on extension board. I know this is huge work, but this is only what is left for me, since I have 10pcs of this modules + SDK board... All payed about 1000 Euros...

So, my question is.....

What basic routines/functions I need from BeckIPC 485 and EasyIP libraries to rewrite/translate oscat modbus routines. For example block read, byte read/write from serial and ethernet.

Regards !

Mladen Bruck



peewit

#1
in OSCAT network there is no serial communications blocks
we have only Ethernet-based function blocks

the core block IP_CONTROL coordinates the access to ethernet with the help of SysLibSockets.lib

this is a very difficult task

you made a bad buying   ;)
the easiest way would be to buy a reasonable control, where the manufacturer provides full support and major libraries has already finished

mbruck

#2
Hi peewit !

Zitatthe core block IP_CONTROL coordinates the access to ethernet with the help of SysLibSockets.lib
Ok. That's some start. :)
There is SysLibSocket.lib in beckipc library list. So it seems to me I can try. Can lose nothing.  As I see, Oscat routines are written in ST. When I get stuck, I hope you can help me to try to correct problems.

Zitatyou made a bad buying
Yes.... And that's without VAT and custom fee.  However, modules are quite cheap ~80 euro, and SDK is about 350. If I manage to recode OSCAT libraries...Well that would be idea for manufacturing small PLC controllers. (joke)

Zitatthe easiest way would be to buy a reasonable control
I'm considering Wago since it support CodeSys, and seam to me not too expensive comparing Siemens or ABB. Other vendors like Mueler, Telemechanique or Omron use other software not CodeSys (IEC61131), which I'm not ready to learn from start again.



mbruck

#3
YEA .... :)
At end, It seams it goes without problems. Because of memory constraints it is not possible to implement both basic and network libraries at same time. However I imported all necessary function blocks into network lib.
Compiled without problems !!!
Now I should assemble hardware from module than try.

:) :)