Author Topic: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map  (Read 4189 times)

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« on: June 30, 2016, 07:09:11 AM »
I am able to read holding registers 8101 (R/W) by using F48102. These are 16 bit floating point using ModbusTCP1Com1. I also need to write to registers. I have tried using ModbusTCPCom1.Write("F48102", "95") also ModbusTCPCom1.Write("F68102", "95").

Any Ideas.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #1 on: June 30, 2016, 07:33:39 AM »
The AdvancedHMI Modbus drivers do not support Modbus Enron mapping. You would need to use the RTU format.

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
I made a mistake not using Enron. I have been able to access registers using Modbus TCP Server/Slave on Scanner, just not able to write.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #3 on: June 30, 2016, 10:16:05 AM »
Try adding a BasicLabel and set both PLCAddressKeypad and PLCAddressValue to F48102. Run the app, click on the label and enter a value. Does that report any error?

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #4 on: July 05, 2016, 05:07:51 PM »
I used Basic Label and was able to Retrieve Value of F42018 and had the pop up of Input but no value was recorded. F42018 is a R/W 16 Bit Floating point Register. Did not get an error, just didn't record value.
 
Also displayed value this Way in TextBox.

        Dim MeterFactor As String
        MeterFactor = ModbusTCPCom1.Read("F42018")
        TxtMeterFactor.Text = MeterFactor


Tried Recording value this way as well:

ModbusTCPCom1.Write("F42018", "1.200")


Any Ideas?

Thanks



Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #5 on: July 05, 2016, 07:42:48 PM »
The best thing to do is run a WireShark capture during a write to see what the device reports in its response.

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
With Wireshark I see write Multiple Registers.
       ModbusTCPCom1.Write("F42002", "2")        '16 Bit R/W Integer

 No problem reading or writing to Integer as Noted Above.

  ModbusTCPCom1.Write("F42018", ".2")           '16 Bit R/W Floating

Problem is with Floating register.

Can read ok, just when I write as Wireshark indicates Write Multiple Registers , no error, data does not post to register.

Thanks




Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #7 on: July 07, 2016, 02:02:27 PM »
Can you post the request/response packets that are not working?

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #8 on: July 07, 2016, 02:32:55 PM »
Here is screen shot of WireShark on Floating not writing to register.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #9 on: July 07, 2016, 03:08:23 PM »
I need to see all of the bytes in the packets. It will give status codes that may tell why it won't write.

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #10 on: July 07, 2016, 04:20:44 PM »
Attached all.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #11 on: July 07, 2016, 06:49:16 PM »
That shows the bytes of data for the Request(Query), now I need to see it for the Response.

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #12 on: July 08, 2016, 07:26:04 AM »
Archie:

Hope this is info you need. I am new at WireShark.

Thanks for your help..

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #13 on: July 08, 2016, 07:43:23 AM »
Function Code 16 (10h)
Offset 2017 (07e1h)
Register count 0002
Byte Count  04
Values to Write  cc cd 3e 4c

That is the request packet send by the driver, but I still need to see the response packet that came back from the device.

lgrimm

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Modbus TCP/IP Cameron(Schlumberger) Scanner 3100 Enron Map
« Reply #14 on: July 08, 2016, 10:45:57 AM »
Archie:


Just going to send you file for wireshark. The IP we are looking at is 192.168.1.10 which is my computer with AdvancedHMI and 192.168.1.140 which is the Flow computer with registers I am trying to capture.

Thanks