RX3i GE write a decimal to input to set bits in binary

NetNathan

Lifetime Supporting Member
Join Date
Nov 2011
Location
Corona, CA
Posts
2,191
Using GE RX3i PLC with Machine Edition SW...
I have a decimal %R number (value is "1150") that I want to write to a set of 16 %I bits to set 1 and 0 according to the binary equivalent of "1150".

Is this clear enough?
 
Last edited:
Is this clear enough?

Sure. Is there a question, or are you simply letting us know that you plan to do this?

I haven't worked with an RX3i PLC, but in a Series 90 PLC, I'd just do a MOVE with data type WORD.

Of course, the data would be overwritten by the IO image table at the end of the program sweep.
 
I think you want to copy the bit pattern from %Rxxx to the 16 bits starting at %Iyyy. Is that correct?
Assuming the variable addressed to %Rxxx is an INT, create an INT variable addressed to %Iyyy and use a MOVE_INT instruction. %Ixxx will nee to be on a byte boundary.
 
Yes the %R is a 16 bit value.
so if it is %R0413 that stores my 1150 number...and my %I starts at %I0601.
I use a Move_INT (with a length of 16) and move %R0413 to %I0601?
 
Last edited:
Not quite. You'll first need to create an INT variable addressed to %I601. Then use a MOVE_INT instruction with a length of one to copy the data from %R413 to the INT variable addressed to %I601. Don't try to copy to a BOOL variable addressed to %I401. Proficy Machine Edition is strict about typecasting.
Bit bucket's concern is valid also. You need to make sure that %I601 is not addressed to an I/O module anywhere.
 
Done that I have verified that nothing is looking at %I601 thru %I616.

Next challenge.....I want to convert %Q601 thru %Q616 to be read into %R414
Same procedure...Make %Q601 an INT and use Move_INT to %R414... or not so simple?


why...
This involves writing and reading a Control word and Status word to/from Profinet on ABB VFD.
 
not sure if i'm following correctly, but anyway...

if you want to break out the individual bits of a word, %R1 for instance, you can use move_word with the input %R1 and the output %G1. Then %G1 through %G16 will be populated the individual bits of %R1 sequentially. I'm pretty sure you can reverse the process to pack boleens into a word.
 
not sure if i'm following correctly, but anyway...

if you want to break out the individual bits of a word, %R1 for instance, you can use move_word with the input %R1 and the output %G1. Then %G1 through %G16 will be populated the individual bits of %R1 sequentially. I'm pretty sure you can reverse the process to pack boleens into a word.

Yeah, I prefer using the "word" data type for such data moves, since that will result in copying the exact bit pattern without regard for decoding two's complement representations of signed numbers.
 
not sure if i'm following correctly, but anyway...

if you want to break out the individual bits of a word, %R1 for instance, you can use move_word with the input %R1 and the output %G1. Then %G1 through %G16 will be populated the individual bits of %R1 sequentially. I'm pretty sure you can reverse the process to pack boleens into a word.

Yes that works..tested....but have not tried the reverse yet.
 
not sure if i'm following correctly, but anyway...

if you want to break out the individual bits of a word, %R1 for instance, you can use move_word with the input %R1 and the output %G1. Then %G1 through %G16 will be populated the individual bits of %R1 sequentially. I'm pretty sure you can reverse the process to pack boleens into a word.

Yes that works..tested....but have not tried the reverse yet.


Lets backpedal on this...
I get "Logic Source - Not Equal" using the G words.
I assume this is because they are restricted to "Genius Bus" comm words, and I have no Genius Bus configured.
 
%G memory is not restricted to Genius applications. It is simply an area of memory typically referenced via Boolean instructions. I'm a little confused about what you're seeing. Does the PLC target validate without error? If you are attempting to send the program to the PLC and it doesn't come up with "Logic Equal", it generally means that PME for some reason could not make the transfer and the reason will show up in the information window.
I frequently used %G memory for bits that were turned on or off by the HMI. It helped me during commissioning and troubleshooting to know that the %G bits were related to the HMI.
 
I use the "move_word to %G" method a lot for decoding bit packed words and have never had issue, even with systems that don"t actually have Genius drops on them. you may having an issue elsewhere in the config.
 
When I did a "Verify Equality".
I got all "equal" except..
Program Logic Source - NOT EQUAL

I deleted my move_word instruction (%AI513 to %G1) and downloaded then did "Verify Equality" and got:
Program Logic Source - EQUAL

??
 

Similar Topics

I am using the lader logic SVC_56 & SVC_57 to write and read data to the PLC's flash memory. I've followed the instructions to configure the...
Replies
4
Views
2,195
Hi there, I'm doing some extensive testing and commissioning with a slew of new Emerson PACSystems RX3i PLCs. It would be convenient to...
Replies
5
Views
80
Hi there, Trying to get some ascii serial communications working via RS485 (COMMREQ functions). I have attached our wiring for the COM2...
Replies
1
Views
947
Hello all, First time poster, long time viewer of these forums. Could not find my solution on here. We have had issues with a Comm Fail on an...
Replies
2
Views
339
Spoke to a few outlets including Emerson and some distributors. Apparently updating firmware on subsequent modules past the CPU still uses...
Replies
1
Views
349
Back
Top Bottom