Welcome, Guest
Username: Password: Remember me

TOPIC: Modbus tcp with arduino

Re: Modbus tcp with arduino 10 years 9 months ago #5463

  • bobo13
  • bobo13's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Hi Toringej

I tried your advice but doesn't work. I don't know where is problem :evil:

diall.jpg
Last Edit: 10 years 9 months ago by bobo13.
The administrator has disabled public write access.

Re: Modbus tcp with arduino 10 years 8 months ago #5479

  • bobo13
  • bobo13's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Hi Claes

I'm still trying to find out problem. I'm reinstall ubuntu and install proview again, I don't know if exist log when occured some error during install package.
When I run runtime editor I have this log. Could you give me some advice when can I find some manual(debug, forum) which help me identify problem.


I Reading Boot file /usr/local/pwrp/modbus/bld/common/load/ld_boot_bobo-k93sv_0999.dat
I Created at 19-JUL-2013 22:38:29.99 for project: modbus
I This node vill run PLC file: plc_bobo-k93sv_0999_plc
I This node has node identity 0.1.1.1 (65793)
I Reading Node file /usr/local/pwrp/modbus/bld/common/load/ld_node_bobo-k93sv_0999.dat
I Reading volume file /usr/local/pwrp/modbus/bld/common/load/volmodbus.dbs
I Created 21-JUL-2013 08:52:09.00
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/rt.dbs
I Created 12-DEC-2012 11:00:00.00
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/pwrs.dbs
I Created 12-DEC-2012 11:00:00.00
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/pwrb.dbs
I Created 12-DEC-2012 11:00:00.00
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/basecomponent.dbs
I Created 12-DEC-2012 11:00:00.00
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/profibus.dbs
I Created 12-DEC-2012 11:00:00.00
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/otherio.dbs
I Created 12-DEC-2012 11:00:00.00
I Mapped /tmp/pwr_db_lock_999, base: f08fd000, size: 16
I Objects : 41343 : 16867944 bytes
I Volumes : 30 : 17040 bytes
I Classes : 300 : 55200 bytes
I Nodes : 10 : 8720 bytes
I Mount servers: 100 : 14400 bytes
I Alias servers: 50 : 4400 bytes
I Sub servers : 500 : 84000 bytes
I Sub clients : 2000 : 464000 bytes
I San servers : 200 : 25600 bytes
I Cache : 10000
I Cached classes: 300 : 220800 bytes
I Cached class volumes: 150 : 12000 bytes
I Sub class objects: 300 : 62400 bytes
I Pool isize : 17836504, esize: 2229563
I Rtdb isize : 4522848, esize: 565356
I Mapped /tmp/pwr_pool_999, base: f08aa000, size: 82024
I Mapped /tmp/pwr_po0001_999, base: ee2fb000, size: 17836504
I Mapped /tmp/pwr_rtdb_999, base: f0895000, size: 82024
I Mapped /tmp/pwr_rt0001_999, base: edeaa000, size: 4522848
I Mapped /tmp/pwr_po0002_999, base: f08fc000, size: 2736
I Reading volume file /usr/local/pwrp/modbus/bld/common/load/volmodbus.dbs
I Loading volume VolModbus ()...
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/rt.dbs
I Loading volume rt ()...
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/pwrs.dbs
I Loading volume pwrs ()...
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/pwrb.dbs
I Loading volume pwrb ()...
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/basecomponent.dbs
I Loading volume BaseComponent ()...
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/profibus.dbs
I Loading volume Profibus ()...
I Reading volume file /usr/pwr48/os_linux/hw_x86_64/exp/load/otherio.dbs
I Loading volume OtherIO ()...
I Created pwrNode, oid: _O1.1.1.1:2147483649
I Setting log file to: /usr/local/pwrp/modbus/bld/common/log/pwr_bobo-K93SV.log
I Mapped /tmp/pwr_qdb_lock_999, base: f08fb000, size: 16
I Qcom pool isize : 600000, esize: 300000
I Mapped /tmp/pwr_qpool_999, base: f0880000, size: 82024
I Mapped /tmp/pwr_qp0001_999, base: f07ed000, size: 600000
I Mapped /tmp/pwr_qp0002_999, base: f07ec000, size: 744
I BACKUP loading information from $pwrp_load/pwr_backup.bck
I Starting pwr_neth, file: rt_neth, prio: 18
I Started pwr_neth_999, prio: 18, pid: 2455
file: rt_neth
I Starting pwr_qmon, file: rt_qmon, prio: 19
I Started pwr_qmon_999, prio: 19, pid: 2456
file: rt_qmon
I Starting pwr_nacp, file: rt_neth_acp, prio: 17
I Started pwr_nacp_999, prio: 17, pid: 2457
file: rt_neth_acp
I Starting pwr_io, file: rt_io_comm, prio: 17
I Started pwr_io_999, prio: 17, pid: 2458
file: rt_io_comm
I Starting pwr_tmon, file: rt_tmon, prio: 17
I Started pwr_tmon_999, prio: 17, pid: 2459
file: rt_tmon
I Starting pwr_emon, file: rt_emon, prio: 17
I Started pwr_emon_999, prio: 17, pid: 2460
file: rt_emon
I Starting pwr_alim, file: rt_alimserver, prio: 17
I Started pwr_alim_999, prio: 17, pid: 2461
file: rt_alimserver
I Starting pwr_bck, file: rt_bck, prio: 16
I Started pwr_bck_999, prio: 16, pid: 2462
file: rt_bck
I Not starting pwr_linksup, file: rt_linksup
I Not starting pwr_trend, file: rt_trend
I Not starting pwr_fast, file: rt_fast
I Not starting pwr_remh, file: rs_remotehandler
I Not starting pwr_remlog, file: rs_remote_logg
I Starting pwr_elog, file: rt_elog, prio: 15
I Started pwr_elog_999, prio: 15, pid: 2463
file: rt_elog
I Not starting pwr_sysmon, file: rt_sysmon
I Starting pwr_webmon, file: rt_webmon.sh, prio: 15
I Started pwr_webmon_999, prio: 15, pid: 2464
file: rt_webmon.sh
I Starting pwr_webmonmh, file: rt_webmonmh.sh, prio: 15
I Started pwr_webmonmh_999, prio: 15, pid: 2465
file: rt_webmonmh.sh
I Starting pwr_webmonelog, file: rt_webmonelog.sh, prio: 15
I Started pwr_webmonelog_999, prio: 15, pid: 2466
file: rt_webmonelog.sh
I Not starting pwr_opc_server, file: opc_server
I Starting pwr_statussrv, file: rt_statussrv, prio: 15
I Started pwr_statussrv_999, prio: 15, pid: 2467
file: rt_statussrv
I Not starting pwr_post, file: rt_post
I Not starting pwr_report, file: rt_report
I Not starting pwr_sevhistmon, file: rt_sevhistmon
I Not starting pwr_sev_server, file: sev_server
I Not starting pwr_sim, file: rt_sim
/usr/pwr48/os_linux/hw_x86_64/exp/exe/rt_webmonelog.sh: line 41: /java: No such file or directory
sched_setscheduler: Operation not permitted
failed to set pid 2455's policy
/usr/pwr48/os_linux/hw_x86_64/exp/exe/rt_webmonmh.sh: line 40: /java: No such file or directory
sched_setscheduler: Operation not permitted
failed to set pid 2456's policy
/usr/pwr48/os_linux/hw_x86_64/exp/exe/rt_webmon.sh: line 41: /java: No such file or directory
sched_setscheduler: Operation not permitted
failed to set pid 2457's policy
sched_setscheduler: Operation not permitted
failed to set pid 2458's policy
sched_setscheduler: Operation not permitted
failed to set pid 2459's policy
sched_setscheduler: Operation not permitted
failed to set pid 2460's policy
sched_setscheduler: Operation not permitted
failed to set pid 2461's policy
sched_setscheduler: Operation not permitted
failed to set pid 2462's policy
sched_setscheduler: Operation not permitted
failed to set pid 2463's policy
sched_setscheduler: Operation not permitted
failed to set pid 2464's policy
sched_setscheduler: Operation not permitted
failed to set pid 2465's policy
sched_setscheduler: Operation not permitted
failed to set pid 2466's policy
sched_setscheduler: Operation not permitted
failed to set pid 2467's policy
I Adding application. aix: 1
I Starting pwr_plc_plc, file: plc_bobo-k93sv_0999_plc, prio: 5
I Started pwr_plc_plc_999_0, prio: 5, pid: 2501
file: plc_bobo-k93sv_0999_plc
I Process pwr_elog_999 exited with status 256
I Process pwr_webmon_999 exited with status 32512
I Process pwr_webmonmh_999 exited with status 32512
I Process pwr_webmonelog_999 exited with status 32512
The administrator has disabled public write access.

Modbus tcp with arduino 6 years 1 month ago #9614

  • ceccon
  • ceccon's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Hello all, I was reading this topic because I am tired about failure with Arduino USB comunication.

Can some one please resume, step by step, how I can install latested Arduino sketch to use Modbus TCP?

Thanks in advanced
/Ceccon
The administrator has disabled public write access.

Re: Modbus tcp with arduino 6 years 2 weeks ago #9654

  • ceccon
  • ceccon's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Hello all involved in Proview, Arduino and Modbus TCP

I am really needing some help/guidelines to try to put it working.
I already follow the advices from this topic but I could not put it working.
After careful reading I understood the modpoll is a tools were I can check if ModBus is working in Arduino and it is, when I run modpoll and change Arduino's pin 7 by LOW/HIGH I see the change in modpoll, very good.

I also follow all recomendations regarding how Modbus objects need to be configured, please see bellow my configuration

Modbus_Master
Modbus_TCP_Slave
--->Address 192.168.1.177
--->Port 502
Modbus_module
--->FunctionCode ReadCoils
--->Address 0
ChanDi
--->Number 7
--->Representation Bit8 (may be here is my problem)

I also add one DI and connect it with ChanDi above,

By reading on of the post I check Modbus_TCP_Slave status and for my surprise is informing:
--> Status (%NONAME-W-NOMSG, Message number 00000000) so different from Normal operating state.

Can some body help me on that? I am really need some support

Thanks in advanced
Best Regards

/Ceccon
The administrator has disabled public write access.

Re: Modbus tcp with arduino 6 years 2 weeks ago #9655

  • benoit
  • benoit's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 180
  • Thank you received: 1
  • Karma: 0
Hi Ceccon,
To define the format Modbus message you need to create under the Modbus_module the following channel objects:

Modbus_Module (FC ReadCoils, address 0)
\ ChanDi1 with 'number' = 0 (representation Bit8)
\ ChanDi8 with 'number' = 7 (representation Bit8)

note: even you don't use the ChanDi1, this channel object (with number attribute set to '0') is use to define the beginning of the modbus message, the length is define by the representation.

other example with more channel objects (with representation Bit8):

Modbus_Module
\ ChanDi1 'number' = 0 ...... beginning of message#1
\ ChanDi2 'number' = 1
\ ChanDi3 'number' = 2
\ ChanDi4 'number' = 3
\ ChanDi5 'number' = 4
\ ChanDi6 'number' = 5
\ ChanDi7 'number' = 6
\ ChanDi8 'number' = 7 ...... end of message#1
\ ChanDi9 'number' = 0 ...... beginning of message#2
\ ChanDi10 'number' = 1
\ ChanDi11 'number' = 2
\ ....etc

In this example, you have to create ChanDi1 and ChanDi9 (even if you don't use them). Other ChanDI objects are create only if there's used.

/Ben
Last Edit: 6 years 2 weeks ago by benoit.
The administrator has disabled public write access.

Re: Modbus tcp with arduino 6 years 2 weeks ago #9662

  • ceccon
  • ceccon's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Hello Ben, thank you a lot for your help

I did exactly how you wrote, but is not working yet.

You can see in the pictures attached that Modbus_TCP_Slave are receiving packets but nothing happen in the ChanDi with number = 0 until ChanDi with number = 7. I also Did a PlcPgm to check DI but nothing happen.

Please observe also modpoll screenshot and my 3 NodeConfig informations where Port are defined 22, can be something related to that?
There is some privilege access that I need to check?
There is another picture that I can attach to try to make your help easer for you?

I also attach my Arduino sketch in case you need it.

Once more thank you, I am really needing help.

/Ceccon
Last Edit: 6 years 2 weeks ago by ceccon. Reason: Files are not attached
The administrator has disabled public write access.
Time to create page: 8.182 seconds