Welcome, Guest
Username: Password: Remember me
Components and Libraries for HMI/SCADA applications, discussions, problems and suggestions

TOPIC:

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6389

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Hello,
I have problem with modbus RTU. It's work fine through the hardware serial port or usb-ft232, but when I want to connect through the Moxa device in real com mode, it doesn't work correctly. I'm use Moxa De211 or Moxa 5110.
I can send data from HMIedit (label, tag), but i can't receive any data.
I'm working on the windows (XP, win7, 8.1) and CT 5.1.
Trying to change baudrate, stopbits etc. and nothing. Had Someone that problem?
Below few logs from serialport:
is-19 18:25:33.272, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 18:25:33.272, iocWriteRead, Result=iorTimeOut  , Received: 00 00 00 
lis-19 18:25:35.023, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 18:25:35.023, iocWriteRead, Result=iorTimeOut  , Received: 00 00 00 
lis-19 18:25:36.773, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 18:25:36.773, iocWriteRead, Result=iorTimeOut  , Received: 00 00 00 
lis-19 18:25:37.507, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 18:25:37.507, iocWriteRead, Result=iorOK       , Received: 01 03 02 
lis-19 18:25:37.507, iocRead     , Result=iorOK       , Received: 03 20 B9 6C 
lis-19 18:25:38.304, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6390

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
I worked with a similar device, and this happens due configuration mistakes or driver problems on these devices. You said that if you connect in your device through the hardware serial port, it works fine, so I presume that your device is a RS-232. Do you have set your Moxa to communicate over RS-232?

I don't know If your Moxa can open TCP/IP port. If moxa supports it, you can use a TCP_UDPPort instead of TSerialPortDriver to connect directly on your moxa, avoiding settings on your operating system nor driver installation.

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6391

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Thanks for Your reply,
Yes, it's RS-232 and as I wrote earlier --> config is on Real Com Mode. Moxa supports the TCP_UDPPort, but the PLC i use have only RS-232 Modbus RTU interface (can't support Modbus TCP/IP protocol ). I don't thik that the problem is with the configuration or drivers. See the logs - send and recieve data. Also i tried Moxa with other scada and the configuration was the same. It was worked without any problems.
:( :(
is-19 19:59:00.921, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 19:59:00.921, iocWriteRead, Result=iorOK       , Received: 01 03 02 
lis-19 19:59:00.922, iocRead     , Result=iorOK       , Received: 00 4D 78 71 
lis-19 19:59:01.126, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 19:59:01.126, iocWriteRead, Result=iorOK       , Received: 01 03 02 
lis-19 19:59:01.127, iocRead     , Result=iorOK       , Received: 00 4D 78 71 
lis-19 19:59:01.332, iocWriteRead, Result=iorNone     , Written:    01 03 00 00 00 01 84 0A 
lis-19 19:59:01.332, iocWriteRead, Result=iorOK       , Received: 01 03 02 
lis-19 19:59:01.333, iocRead     , Result=iorOK       , Received: 00 4D 78 71

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6392

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
I understand: others scada systems worked with moxa?

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6393

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Yes, other scada worked with moxa.

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6394

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Apart from this problem , I would say that PascalScada is very good job! Many thanks from Poland:)
I hope, that You will find the solutions of my problem.

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6395

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
Can you use PortMon to diagnose what is the difference of PascalSCADA serial open procedure than other systems?

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6396

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
Thanks! :)

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6397

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
I will check it probably next week, I don't have the PLC at that moment.

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6407

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
I don't understand (again :D): You don't have a PLC now, so you are using a simulator connected to the moxa?

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6408

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
Please attach the log of pascalscada here, ok?

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6409

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Sorry Sir, My English is poor :( so maybe You can't understand of my post.
I tested it with a PLC, but now the PLC is installed on the cabinet far away from Me. PLC is connected to the PC with a RS-232. It's working, but there is a lot of errors communications, because of a long cable between PLC and PC(about 7 meters ). But you 're right, I also use the simulator, it's also not working. You can try it with mod_RSsim and Virtual serial port driver. Have the same effect without a moxa device. I tested PascalScada <--> program mod_RSsim - can send value from Hmi and can see the changes in Mod_RSsim, but can't see the changes on the HMI PascalScada when i try send the value from the simulator. Then I test the commercial Scada with mod_RSsim and I can see that: I can change the value on "Promotic" SCADA. When I tried to send some value in a simulator i can see the same value in "Promotic" SCADA. With PascalScada, when I'll send some value from simulator it' does't change on the HMI. Once again sorry for my English.

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6411

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1

File Attachment:

File Name: modbus.txt
File Size:16 KB

I attach the log file. Communication PascalScada - realcom moxa and simulator .
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 4 months ago #6412

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
A properly working here PascalScada 1-computer connected via USB <- > RS - 232 and 2-computer RS-232 and simulator.

File Attachment:

File Name: modbus2.txt
File Size:50 KB
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 3 months ago #6416

  • avra
  • avra's Avatar
  • Visitor
  • Visitor
From your logs, sending 01 03 00 00 00 01 84 0A from PascalSCADA to MOXA results in a timeout, and sending the same 01 03 00 00 00 01 84 0A directly results in valid response. From this I have a conclusion that PascalSCADA tries to send the same thing both times, so it's not a problem with PascalSCADA. What you should do is to try to send the same sequence with moxa and directly, using some terminal software both times. You can also try free MODPOLL command line software and report results. Your claim that other SCADA software supports MOXA means nothing if it was confirmed in some other environment, and not exactly yours (running PascalSCADA application and some other scada application from the same pc, using same cabling to plc, testing one after another). There may be many other things, but I suspect cable problem, baudrate too high (try lowering speed if PLC allows), and no or wrong RS485 termination (if you use RS485 on PLC side).

Please Log in or Create an account to join the conversation.

Last edit: by avra.

PascalScada Modbus RTU with Moxa problem 9 years 3 months ago #6418

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1

I have a conclusion that PascalSCADA tries to send the same thing both times, so it's not a problem with PascalSCADA.


But what is with this log:
lis-29 09:58:56.438, iocWriteRead, dResult=iorNone , dWritten: 01 06 00 00 00 2D 49 D7
lis-29 09:58:56.438, iocWriteRead, eResult=iorOK , eReceived: 01 06 00
lis-29 09:58:56.438, iocRead , aResult=iorOK , aReceived: 00 00 2D 49 D7

I undestand that: Pascal scada write 01 06 00 00 00 2D 49 D7 and simulator response 01 06 00 00 00 2D 49 D7 but PascalScada can't read this? - ( in simulator the value was change correctly but in the HMI value was changed to 0. In PascalScada LOGs You can read 01 06 00 00 00 2D 49 D7 without the result on HMI :huh: )
Next:
lis-29 09:58:57.672, iocWriteRead, dResult=iorNone , dWritten: 01 03 00 00 00 01 84 0A
lis-29 09:58:57.672, iocWriteRead, eResult=iorOK , eReceived: 01 03 02
lis-29 09:58:57.672, iocRead , aResult=iorOK , aReceived: 00 2D 78 59

In the simulator program i change the value from 0 to 45, Pascal ask with 01 03 00 00 00 01 84 0A and response from simulator is 01 03 02 00 2D 78 59.
Why in logs PascalScada can read correctly from simulator but can't decode it and send to the HMI from tag1 :unsure: ?

I suspect cable problem, baudrate too high (try lowering speed if PLC allows), and no or wrong RS485 termination (if you use RS485 on PLC side).


Cable is 1m betwenn 2 PC , baudrate was changed to the lowest, I use RS-232 for test.
I also try rise the WriteReadDelay time and nothing :( .
I don't know what I'm doing wrong :(

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 3 months ago #6419

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13
Sorry by reply to late...

I wrote a message through my smartphone, but it was not sent. Try a "stupid" idea: Put two HMIEdits linked with the same tag, and set, in both, FreezeOnFocus = false.

If this don't work, we have a big problem on another part of PascalSCADA.

Please Log in or Create an account to join the conversation.

PascalScada Modbus RTU with Moxa problem 9 years 3 months ago #6420

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Yes, it's working with two HMI linked with the same tag and FrezeOnFocus=false :) .
Do You already know the reason?

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 3 months ago #6421

  • Marcin
  • Marcin's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 29
  • Thank you received: 1
Even now, if I'm deleted one of HMI it's working!.

EDIT:

:( But working only with PascalScada <-> WirtualPortDriver <-> Simulator --> before with this configurations does't work.

(PascalScada <-->Moxa RealCom RS-232)< -cable->( RS-232 <-> Simulator) it's the same -not working :( .

EDIT2:

But if I do that:
(Simulator <->Moxa RealCom RS-232)< -cable->(RS-232 -<-->PascalScada)

it is working. I do'n understand that.

Please Log in or Create an account to join the conversation.

Last edit: by Marcin.

PascalScada Modbus RTU with Moxa problem 9 years 3 months ago #6422

  • Fabio Luis Girardi
  • Fabio Luis Girardi's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 13

swicio1 wrote: Even now, if I'm deleted one of HMI it's working!.


Well, I'm not very good with property names. FreezeOnFocus don't explain to you what this property does on THMIEdit? Please tell me if yes or no, and if possible, suggest a new property name :)

Even if this property has a good name, I´ll explain what it does. If TRUE, when the HMIEdit receives the focus, it stops their update when the tag value changes. This was made for a more comfortable typing on it. If you set it to false, it only stops their update procedure if someone made some change on HMIEdit content.

Please Log in or Create an account to join the conversation.

Moderators: Curt