News:

  • June 07, 2026, 12:54:46 PM

Login with username, password and session length

Author Topic: EIPMSG - Single Bit Set  (Read 14860 times)

sgsims

  • Hero Member
  • *****
  • Posts: 127
EIPMSG - Single Bit Set
« on: August 25, 2016, 03:41:41 PM »
Is there a way to specify setting a single bit high or low using the EIPMSG instruction?

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: EIPMSG - Single Bit Set
« Reply #1 on: August 25, 2016, 04:44:33 PM »
I have not used EIPMSG before, but I believe that you will need to move a larger piece of data than just a bit. If you placed your data into D0 (for example), then you could use a MOVE: D0:0 to C0.
Does that help?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

sgsims

  • Hero Member
  • *****
  • Posts: 127
Re: EIPMSG - Single Bit Set
« Reply #2 on: August 25, 2016, 05:00:54 PM »
I was going the other way with the instruction...using the EIPMSG to SET a value on a server.  In my case I have a bit in a scanners memory that I want to toggle betwwen high and low.  But I don't want to change any of the bits above or below that bit.  I could certainly send over a byte of information set to 1 or 0 which would accomplish toggling the bit in question but then it would also set the bits to the Right to 0 in the scanners memory.


plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: EIPMSG - Single Bit Set
« Reply #3 on: August 25, 2016, 05:14:21 PM »
I do not know.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: EIPMSG - Single Bit Set
« Reply #4 on: August 25, 2016, 05:59:27 PM »
I have played with Do-more EIPMSG and it works very well. I don't see any ability to write a single bit, though Rockwell mentions something about Read-Modify-Write functions, but that sounds more like some capability that may be built into the PLC end.

If you don't expect those other bits to change, you could always do something similar to modify what is there, but if the data is changing at the scanner then I wouldn't expect that to work out.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: EIPMSG - Single Bit Set
« Reply #5 on: August 25, 2016, 07:14:31 PM »
Typically what you can read and write is rigidly defined by the target device, and is generally not like Modbus or DL comms...meaning...You get what you get. .
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

sgsims

  • Hero Member
  • *****
  • Posts: 127
Re: EIPMSG - Single Bit Set
« Reply #6 on: August 25, 2016, 07:45:05 PM »
So do you mean something like...the target device exposes bit 1 of a particular word and if the Do More sends a byte of information to that bit there will be some sort of match to the LSB of the byte I am sending over.  I probably butchered that reply but you probably get what I am asking:)

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: EIPMSG - Single Bit Set
« Reply #7 on: August 25, 2016, 09:45:58 PM »
Could you read the entire byte from the device, and then just change the bit you want and write it back?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: EIPMSG - Single Bit Set
« Reply #8 on: August 25, 2016, 09:55:54 PM »
If a particular field is one byte, you will read and write one byte, and anything other than one byte will be rejected. That's been my experience. Most devices are finicky.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

sgsims

  • Hero Member
  • *****
  • Posts: 127
Re: EIPMSG - Single Bit Set
« Reply #9 on: August 25, 2016, 11:45:10 PM »
PLC nut...yes,  I guess that approach would work but seems a bit clunky.  I am going to try to write a byte of information to the attribute which is 1 bit long and see what happens...hopefully Bob O is right and the 3 MSB of the Byte will be ignored or rejected.

sgsims

  • Hero Member
  • *****
  • Posts: 127
Re: EIPMSG - Single Bit Set
« Reply #10 on: August 25, 2016, 11:58:33 PM »
I guess I could test this by setting up a Do-More simulator as a Server and expose one word of memory then set-up another do-more simulator as a client with an EIPMSG instruction sending two words of data and see what happens.