News:

  • July 13, 2026, 10:54:28 PM

Login with username, password and session length

Author Topic: Discrete Input through Modbus  (Read 25876 times)

CJ

  • Newbie
  • *
  • Posts: 2
Discrete Input through Modbus
« on: March 21, 2014, 11:04:19 AM »
Hello Gentleman,

I am new to the DirectSoft5 software and the DirectLogic line of PLCs. So far I have enjoyed using and learning this system but have encountered a problem I was hoping I could get some help on.

So the project I am working on currently consist of communicating with 4 Siemens gas chromatographs to a DirectLogic 205 (CPU: 250-1) through an H2-ECOM100 module using Modbus protocol. I haven't had a problem communicating with any of the 40001 and 30001 addresses but just ran across a discrete input that the gas chromatographs use to indicate "Sample Flow" and "Bypass Flow" using Modbus addresses 11005-11008. So my question is how do I properly read that bit so eventually I can use it to indicate which stream is active on a C-More HMI touchscreen.

LD - K308
LD - K8
LDA - O40600 (O not a zero)
RX - GX1754

I guess my thought process was to look at just the first bit in each of the 40600 registers. Example: 40600 being C0, 40604 being C100...etc.

Is this even close? Your help will be greatly appreciated.

Thanks,

CJ

rlp122

  • Sr. Member
  • ****
  • Posts: 91
Re: Discrete Input through Modbus
« Reply #1 on: March 21, 2014, 02:46:06 PM »
Loading the bits into C registers is certainly the easiest way to go about it.  You could also load it into a word and look at bits out of the word by using something similar to B2000.0 (bit 0 of V2000).  Which is essentially what you are doing by using V40600 with the exception of having direct access to individual bits via the "c" registers.

CJ

  • Newbie
  • *
  • Posts: 2
Re: Discrete Input through Modbus
« Reply #2 on: March 21, 2014, 04:57:22 PM »
Thank you very much for the help. I decided to go with the word registers and look at the single bit. Everything is working great.

Thanks again for the help,

CJ