You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old May 24th, 2022, 03:39 AM   #1
LogixLad
Member
United Kingdom

LogixLad is offline
 
Join Date: May 2022
Location: London
Posts: 2
MICRO800 CCW Modbus messaging

I'm still a beginner when it comes to PLC's programming in general but I've had a fair bit of experience with SLC 500's and micrologix, but I've been playing about recently with the micro 800 and I was doing some modbus messaging to an ABB Acs550, it took many reads and rereads of the manuals to get it going and I can read holding registers and write to coils just fine. However the only way I figured out how to write to coils was mostly just by guessing..

So CCW uses words to read and write modbus messages, which was confusing coming from RSLogix 500 where it uses bits. The part I don't understand is why I have to write 1,2,4,6,8, etc to set coils 40001,40002, 40003, 40004, 40005? This may seen very basic to some people but after some research I still can't figure it out.
Attached Images
File Type: jpg Screenshot_20220524_083701_com.linkedin.android.jpg (124.0 KB, 34 views)
  Reply With Quote
Old May 24th, 2022, 07:06 AM   #2
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,152
Welcome to the forum!

Which Modbus Function Code are you using to write to the output coils: 05 (0x05; Write Single Coil); or 15 (0xF; Write Multiple Coils)?
_
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
  Reply With Quote
Old May 24th, 2022, 07:29 AM   #3
LogixLad
Member
United Kingdom

LogixLad is offline
 
Join Date: May 2022
Location: London
Posts: 2
I've been using function code 15
  Reply With Quote
Old May 24th, 2022, 07:59 AM   #4
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,152
At this link, you can see and example how the Modbus protocol encapsulates the values of each group of eight coils into one byte comprising eight bits, and each bit of a byte corresponds to one coil to be written. The mapping may seem a bit () odd, as the 16-bit words in the Modbus protocol are supposed to be MSByte-first, but it does work.

If you do not understand how bits compose bytes, then let us know.
_
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
MicroLogix 1200 Modbus RTU Slave how fast g.mccormick LIVE PLC Questions And Answers 16 March 25th, 2019 12:19 PM
Help! Modbus issues richleva LIVE PLC Questions And Answers 14 October 11th, 2018 01:29 PM
Modbus Master not polling the Modbus Slave through an EtherNet/IP Connection mihiri LIVE PLC Questions And Answers 3 July 15th, 2010 03:41 AM
the connection of citect with MODBUS and IP Master (ISYGLT) Marc_s LIVE PLC Questions And Answers 0 August 16th, 2007 02:46 AM
MODBUS dialects. JesperMP LIVE PLC Questions And Answers 10 March 9th, 2005 02:37 AM


All times are GMT -4. The time now is 10:39 PM.


.