Help - Search - Members - Calendar
Full Version: Moving Values
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
Hawkmoon42
Using RSlogix 500 and a SLC 505, I want to move different values to 4 7 segment digital displays conected to O:4.0. How do I simply move values in BCD so as to display on any of the 4 displays.
ie 0000 0000 0000 0111 if moved to O:4.0 will display 7 in the first digital display from the left.
But if i want to move it to the second DD from the left how would I do this.
Thanks Gary
Mickey
QUOTE(Hawkmoon42 @ Mar 9 2008, 04:59 PM) [snapback]66184[/snapback]
Using RSlogix 500 and a SLC 505, I want to move different values to 4 7 segment digital displays conected to O:4.0. How do I simply move values in BCD so as to display on any of the 4 displays.
ie 0000 0000 0000 0111 if moved to O:4.0 will display 7 in the first digital display from the left.
But if i want to move it to the second DD from the left how would I do this.
Thanks Gary


See Picture. Use the TOD instruction and move instruction.
Hawkmoon42
Thanks Micky
I had worked it out my self actually.
I was to obsessed with moving part of a word, as in - 0000 0000 0000 0111 > 0000 0000 0111 0000
It never occured to me to multiply or devide the integer by 10 first, then convert to BCD, followed by using a masked move to the output
BobLfoot
QUOTE(Hawkmoon42 @ Mar 9 2008, 09:26 PM) [snapback]66187[/snapback]

Thanks Micky
I had worked it out my self actually.
I was to obsessed with moving part of a word, as in - 0000 0000 0000 0111 > 0000 0000 0111 0000
It never occured to me to multiply or devide the integer by 10 first, then convert to BCD, followed by using a masked move to the output

The PLC 5 and COntrollogix have a nuce command called Bit Field Distribute which allows you to move "nibbles" won't help in this case but might in another processor family.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.