Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: sgsims 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?
-
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?
-
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.
-
I do not know.
-
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.
-
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. .
-
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:)
-
Could you read the entire byte from the device, and then just change the bit you want and write it back?
-
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.
-
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.
-
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.