Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Reading input register 3x from third party modbus

Modicon PAC Forum

A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Industrial Automation
  • Modicon PAC Forum
  • Reading input register 3x from third party modbus
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
MatthewM
Lt. Commander MatthewM
8
RoozeeR
Lt. Commander RoozeeR Lt. Commander
7
Trinxs1
Lt. Commander Trinxs1 Lt. Commander
6
ciupol
Lieutenant ciupol
6
View All
Related Products
product field
Schneider Electric
Modicon Quantum

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Modicon PAC Forum
aamjad52114
Crewman aamjad52114
Crewman

Posted: ‎2022-01-17 11:37 AM

0 Likes
8
2499
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-01-17 11:37 AM

Reading input register 3x from third party modbus

 

Hi All

 

I am trying to read from input register 3x of skf analyst software using Quantum PLC ( 140 CPU 652 60 & 140 NOE 771 10) 

 

I tried MBP_MSTR but it didn't work.

 

Any ideas please. Please feel free to suggest other PLCs (m340, m580,etc) as well if quantum doesn't support reading 3x from 3rd party

 

Ali

Labels
  • Labels:
  • 00. Read me first
  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 8
bricesumner
Crewman bricesumner
Crewman

Posted: ‎2023-12-13 12:05 PM

0 Likes
0
2029
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-12-13 12:05 PM

Hi Ali,

 

Did you get this figured out?

If not, a couple of hints with the Quantum:

  • There is a register offset (requesting register %M1 gets you %M2)
  • The request in the data buffer follows the Modbus standard (attached see section 6.4 of Modbus Application Protocol)
Attachments
Reply

Link copied. Please paste this link to share this article on your social media post.

ciupol
Lieutenant ciupol
Lieutenant

Posted: ‎2023-12-15 05:26 AM

0 Likes
0
2010
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-12-15 05:26 AM

MBP_MSTR can read only 4x registers. To read 3x registers you can use READ_VAR.

Reply

Link copied. Please paste this link to share this article on your social media post.

GeoffChisholm
Lieutenant GeoffChisholm
Lieutenant

Posted: ‎2023-12-19 08:40 PM . Last Modified: ‎2023-12-19 08:50 PM

0 Likes
1
2006
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-12-19 08:40 PM . Last Modified: ‎2023-12-19 08:50 PM

Read_Var would be easier but this is not available in Quantum, and Read_Reg which is the quantum function does not read input registers.

you can use the MBP_MSTR function only you have to use mode 15 to send a Modbus Request and set the Modbus function code to read input registers. It is possible, it is just complicated. The help in Control Expert will help. The Modbus Function code you need is 04 to read input registers.

GeoffChisholm_0-1703046916793.png

 

Reply

Link copied. Please paste this link to share this article on your social media post.

bricesumner
Crewman bricesumner
Crewman

Posted: ‎2023-12-20 07:16 PM

In response to GeoffChisholm
0 Likes
0
1983
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-12-20 07:16 PM

Yes, you’re right. I just helped someone getting the read and write to coils working.

 

The hardest part is getting the bytes setup in the words properly. It’s easier to view everything in hexadecimal.

 

I also found that it made more sense to write everything out in decimal, ignoring the bytes, then converting to hexadecimal and adding the extra bytes (using the modbus manual). Then combining everything into the words. I can send examples on Tuesday.

Reply

Link copied. Please paste this link to share this article on your social media post.

bricesumner
Crewman bricesumner
Crewman

Posted: ‎2023-12-26 08:02 AM

0 Likes
0
1935
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-12-26 08:02 AM

In this example I'm writing to coils (%M):
From the Modbus Application Protocol manual this is the structure of my request (write multiple coils):
Function Code: 1 byte
Starting Address: 2 bytes
Quantity of Outputs: 2 bytes
Byte count: 1 byte (value is N*)
Outputs Value: N* bytes
Also from the manual N* is number of registers divided by 8 and rounded up.

 

In my application I have 2 registers I'm writing to starting at register 17 so my request is as follows:
Function code: 15
Starting address: 16 (0 based addressing)
Quantity of ouptuts: 2
Byte count: 1 (2÷8=0.25 but rounded up is 1)
Outputs value: 3 (turn both outputs on: 3 is 0000 0011 in 8 bit binary)

Convert to hex to make the bytes easier to read:
Function code: F
Starting address: 10
Quantity of outputs: 2
Byte count: 1
Outputs value: 3

 

Adding padded 0's to make all of the bytes is use visible:
Function code: 0F
Starting address: 0010
Quantity of outputs: 0002
Byte Count: 01
Outputs value 03

 

Combining them into a long stream the whole request looks like:
0F001000020103

 

Breaking up into the WORDS used in Control Expert and adding extra 0's to complete the last word:
0F00 1000 0201 0300

 

So using the example in control expert for MBP_MSTR operation code 15 the first part of my Data Buffer array should look like:
Buffer[1]: 16#0F00
Buffer[2]: 16#1000
Buffer[3]: 16#0201
Buffer[4]: 16#0300

 

My Control Array should look like:
Control[1]: 15
Control[2]: 0 (system reserved for error code on response)
Control[3]: 11 (the example had the buffer as a size 11 array)
Control[4]: 5 (I'm only using 4 registers, but I'll give myself some padding and since my array is size 11; then 2*5=10 so I won't go past the length of my array.
Control[5]: 16#0400 (first byte is the slot of my NOE, second byte is a lookup index (i.e. if you were using a bridge mux or a gateway))
Control[6]: 192 (next 4 are the IPv4 address, my example is 192.168.0.1)
Control[7]: 168
Control[8]: 0
Control[9]: 1
Control[10]: 7 (Length of request in bytes: 0F 00 10 00 02 01 03)
Control[11]: 0 (system reserved length of response)

 

So the rest of my Buffer is as follows:
Buffer[5]: 16#0000 (Padding from Control[4])
Buffer[6]: 16#0000 (First part of response)
Buffer[7]: 16#0000 (Second part of response)
Buffer[8]: 16#0000 (Third part of response)
Buffer[9]: 16#0000 (Unused)
Buffer[10]: 16#0000 (Unused)
Buffer[11]: 16#0000 (Unused)

 

From the Modbus Application Protocol the response is as follows:
Function Code: 1 byte
Starting Address: 2 bytes
Quantity of outputs 2 bytes

 

So if my device is following the Modbus standard my buffer should look like the following to mirroring my request:
Buffer[6]: 16#0F00
Buffer[7]: 16#1000
Buffer[8]: 16#0200

Reply

Link copied. Please paste this link to share this article on your social media post.

arvind121
Crewman arvind121
Crewman

Posted: ‎2024-05-13 03:36 AM

0 Likes
2
1532
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2024-05-13 03:36 AM

hi all im trying to read input variables from a modbus slaves device, i have tried to read variables using MBP_MSTR Function block but im not able to read variables, someone please refer the attached images and help me on this! thanks

Attachments
Reply

Link copied. Please paste this link to share this article on your social media post.

bricesumner
Crewman bricesumner
Crewman

Posted: ‎2024-05-15 06:18 AM

In response to arvind121
0 Likes
0
1467
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2024-05-15 06:18 AM

Should probably start this as a new post rather than hopping on someone else's, but a few things:

  • With a M580 why are you using MBP_MSTR? Read_Var can read input registers
  • As I think you've found, the enable pin has to be pulled high until the action completes, the attached screenshot is how I'd recommend performing the action.
  • In your MBP_MSTR_CONTROL variable you have a value of 4 in the first location in the array which is Clear Local Statistics, not Read/Write Data (23) nor Send Modbus Request (15).
  • Your MBP_MSTR_CONTROL variable is an array of 0 to 10, I think the block requires a 1 to 11.
  • What is in your MBP_MSTR_DATA variable? This is a buffer that has the heart of your request along with the response from the slave device.Screenshot 2024-05-15 061046.png
Reply

Link copied. Please paste this link to share this article on your social media post.

MatthewM
Lt. Commander MatthewM
Lt. Commander

Posted: ‎2024-05-15 12:11 PM

In response to arvind121
0 Likes
0
1495
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2024-05-15 12:11 PM

@arvind121 Consider using a READ_VAR with that hardware.

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of