Autor Thema: Modbus RTU and Modbus TCP from scratch ! :(  (Gelesen 14857 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Offline mbruck

  • Newbie
  • *
  • Beiträge: 8
    • Profil anzeigen
    • E-Mail
Modbus RTU and Modbus TCP from scratch ! :(
« am: 08. Oktober 2013, 12:17:11 »
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



Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: Modbus RTU and Modbus TCP from scratch ! :(
« Antwort #1 am: 08. Oktober 2013, 17:51:12 »
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
« Letzte Änderung: 08. Oktober 2013, 17:54:11 von peewit »

Offline mbruck

  • Newbie
  • *
  • Beiträge: 8
    • Profil anzeigen
    • E-Mail
Re: Modbus RTU and Modbus TCP from scratch ! :(
« Antwort #2 am: 08. Oktober 2013, 19:45:48 »
Hi peewit !

Zitat
the 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.

Zitat
you 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)

Zitat
the 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.


« Letzte Änderung: 08. Oktober 2013, 19:48:30 von mbruck »

Offline mbruck

  • Newbie
  • *
  • Beiträge: 8
    • Profil anzeigen
    • E-Mail
Re: Modbus RTU and Modbus TCP from scratch ! :(
« Antwort #3 am: 09. Oktober 2013, 00:39:42 »
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.

:) :)
« Letzte Änderung: 09. Oktober 2013, 00:53:54 von mbruck »