Help - Search - Members - Calendar
Full Version: OMRON MOVE DIGIT (83)
Forums.MrPLC.com > PLCs and Supporting Devices > Omron > CX-Programmer
MIKE31
[attachmentid=7068][attachmentid=7067] HI EVERYONE AND HAPPY NEW YEAR
I am confused with this instruction regarding how DI operates perhaps someone can explain to me how it works.Thanks mike
MIKE31
QUOTE(MIKE31 @ Jan 2 2009, 12:05 AM) [snapback]77305[/snapback]
[attachmentid=7068][attachmentid=7067] HI EVERYONE AND HAPPY NEW YEAR
I am confused with this instruction regarding how DI operates perhaps someone can explain to me how it works.Thanks mike


Sorry I understand what is going on thanks anyway
BobB
Hi Mike
Have just seen you question.
Are you OK with MOVD for sure?
It is a very useful instruction.
MIKE31
QUOTE(BobB @ Jan 2 2009, 03:10 AM) [snapback]77310[/snapback]
Hi Mike
Have just seen you question.
Are you OK with MOVD for sure?
It is a very useful instruction.

HI BobB
Thanks a lot for the offer. I am sure how it works when the most r.h.s are 2 digits as in the attached doc but I do not know yet when there are 3 digits for example 0210 and by the way what is the application for this instruction. MIKE
BobB
No worries Mike - shout if you need help.
MIKE31
QUOTE(BobB @ Jan 3 2009, 04:56 AM) [snapback]77327[/snapback]
No worries Mike - shout if you need help.

HI BobB
Regards to di value say it is 0210 then o digit at S is copied over to o digit at D .
The next di value is 1 therefore 2 digits in total are copied over and finally the third digit at di is 2 then digit 0 at D is copied over to digit 1 at S .
Bob I hope I have the right picture if not please correct me and also the reason to use this instruction and what is the application. Thanks
BobB
Hi Mike
The fisrt word in the instruction is 'S'
This is the source word - pretty self explanatory
The 2nd word in the instruction is 'C'
This is the control word - more further on - this determines how the function works
The 3rd work in the instruction is the destination word - also pretty self explanatory
Lets go to the control word
1) Digit 3 (most significant) is not used and is always 0

2) Digit 2 describes the first digit to move ie: 1 means digit 2 - 2 means digit 3 etc

3) Digit 1 is the number of digits - you have to be careful here - read further

4) Digit 0 (least significant) is the first digit in 'S'

Therefore #0210 will move digit 2 (from the left) and digit 3 (most significant) into the destination word - 2 determines the first digit to move (digit 2) and 1 determines how many digits (2) into the destination word.
#0300 would move the most significant digit into the destination word
Be careful - #0310 is illegal as it would tell the insruction to move digit 3 and 2 digits into the destination word - digit 3 is the last digit and therefore ir is not possible to move 2 digits. I have not tried it but possible #0310 would move digit 3 and digit 1 into the destination word in reverse order.
So, if you have 1234 in the source word #0210 would move 12 into the destination word the result would be 0012 - #0300 would move 1 into the destination word the result would be 0001 - #0120 would move 123 into the destination word and the result would be 0123
#0211 would move would move digit 3 and digit 1 into the the destination word and the result would be 0120
The instruction was commonly used to move decimal places and wwhol;e numbers around from the result of calculations - not so importnant these days as PLCs - particularly the Omron CP1, CJ1 and CS1 have a plethorra of maths instructions including 64 bit floating point.
I am dissapointed with floating point as when you 'FIX' the floating point value to decimal you lose the decimal values - the PLC 'FIX' instruction rounds the value to whole numbers.
Hope this helps

scottmurphy
QUOTE(BobB @ Jan 4 2009, 03:17 AM) [snapback]77338[/snapback]


I am dissapointed with floating point as when you 'FIX' the floating point value to decimal you lose the decimal values - the PLC 'FIX' instruction rounds the value to whole numbers.
Hope this helps


Hi Bob,

What we tend to do, and you probably do as well, is to multiply the float by 10 then convert back to a whole no, that way, you can read it as a decimal no with 1 decimal place of accuracy, quite useful sometimes, especially when HMI's do not support floats.

Scott
MIKE31
QUOTE(scottmurphy @ Jan 4 2009, 02:31 PM) [snapback]77340[/snapback]
QUOTE(BobB @ Jan 4 2009, 03:17 AM) [snapback]77338[/snapback]


I am dissapointed with floating point as when you 'FIX' the floating point value to decimal you lose the decimal values - the PLC 'FIX' instruction rounds the value to whole numbers.
Hope this helps


Hi Bob,

What we tend to do, and you probably do as well, is to multiply the float by 10 then convert back to a whole no, that way, you can read it as a decimal no with 1 decimal place of accuracy, quite useful sometimes, especially when HMI's do not support floats.

Scott

HI Bob
With your excellent detailed explanation I know now how this instruction works, highly appreciated .

HI Scott Not really I am just reviewing a plc program for one of our machine in the factory and going through instructions sometimes the book/manual may not be easy to understand. I am sure you gentlemen have noticed that I am learning OMRON as time permits. Thanks again and I will be back again
scottmurphy
QUOTE(MIKE31 @ Jan 5 2009, 12:22 AM) [snapback]77354[/snapback]

HI Scott Not really I am just reviewing a plc program for one of our machine in the factory and going through instructions sometimes the book/manual may not be easy to understand. I am sure you gentlemen have noticed that I am learning OMRON as time permits. Thanks again and I will be back again


Hi Mike,

Sorry if I confused you, my response was purely related to Bobs comments about the 'Fix' back to an integer value from a floating point value.

Using the decimal place of accuracy value as an integer, is quite useful, also when some of the older PLC's do not support floating point no's, most do these days so is not an issue.

Feel free to ask away, many of us here have spent hours trawling through them manuals....



MIKE31
QUOTE(scottmurphy @ Jan 5 2009, 01:22 PM) [snapback]77375[/snapback]
QUOTE(MIKE31 @ Jan 5 2009, 12:22 AM) [snapback]77354[/snapback]

HI Scott Not really I am just reviewing a plc program for one of our machine in the factory and going through instructions sometimes the book/manual may not be easy to understand. I am sure you gentlemen have noticed that I am learning OMRON as time permits. Thanks again and I will be back again


Hi Mike,

Sorry if I confused you, my response was purely related to Bobs comments about the 'Fix' back to an integer value from a floating point value.

Using the decimal place of accuracy value as an integer, is quite useful, also when some of the older PLC's do not support floating point no's, most do these days so is not an issue.

Feel free to ask away, many of us here have spent hours trawling through them manuals....



HI
Thanks a lot for the response. I have decided to buy a small omron PLC +HMI package and set it up at home, what do you recommend and what is the best option to go .Mike
scottmurphy
QUOTE(MIKE31 @ Jan 5 2009, 09:59 PM) [snapback]77392[/snapback]

HI
Thanks a lot for the response. I have decided to buy a small omron PLC +HMI package and set it up at home, what do you recommend and what is the best option to go .Mike



All depends on what you want to pick up. The CP1L would be ideal for home, small IO, USB low cost, but has all the new features & instructions available. If you want to learn how the older PLC's work, if this is what you have at work and need to know, then maybe something else would be best, perhaps an older model?

Saying that though, the instruction set is pretty comprehensive, so you should be able to get up to speed with this model, and the manuals of course!!

For a HMI, you are thinking Omron as well? This could get a bit pricier, depending on what you want to learn that is?



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.