Technical Forum

Industrial Software

shift registers

Thread Starter: egy_eng   Started: 11/5/2009 1:36 PM   Replies: 16

« Previous thread Next thread »
12» Page 1 of 2 (17 items)
  11/5/2009, 1:36 PM
Joined 11/24/2008
Last visit: 11/17/2009
Posts: 17
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
hiii for all and thanks in advance for all who will help me and try to explain to me


could any one tell me what is the usage of slw in this example

and please try to explain this example.
 
    L            512
    SLW     3
    LAR1
    L  PIW [AR1,P#0.0]
    T     MW200


for my understanding i found that he is trying to make indirect addressing for  analog input



and the previous statment may equall this



L PIW512
T MW200

AM I RIGHT OR NOT


COULD ANY ONE HELP ME


BEST REGARDS
Top
  11/5/2009, 1:48 PM
Joined 9/28/2005
Last visit: 11/24/2009
Posts: 861
Rating:
Rated: Outstanding [3.47 out of 5 / rated 55 time(s)]. (55) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

Look at Step-7 help file on indirect addressing. The example shifhts 3 bits to left because of tructure of the pointer. If you look at structure in the hep you will se that first 3 bits is bit address and shifted 512 is byte address of the memory location the pointer points to.

Regards,
--------------------------------
Darius
UAB "Automatikos Iranga"
Tinklu 29a, Panevezys
Lithuania
Top
  11/6/2009, 12:08 AM
Joined 10/7/2005
Last visit: 11/24/2009
Posts: 449
Rating:
Rated: Outstanding [4 out of 5 / rated 100 time(s)]. (100) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
egy_eng wrote:

    L            512
    SLW     3
    LAR1
    L  PIW [AR1,P#0.0]
    T     MW200

the previous statment may equall this

L PIW512
T MW200

AM I RIGHT OR NOT


Hello egy_eng

you are RIGHT and the (AR1 based indirect addressing related) logic at the top does not make too much sense.
The only explanation I have why it was programed that way is because it could be done (rather than it is a "better" or faster or more efficient way, which it of course isn't).  

I hope this helps  


Cheers

fritz
Top
  11/8/2009, 8:30 AM
Joined 11/24/2008
Last visit: 11/17/2009
Posts: 17
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 


hello fritz,
  thank u very musch for replying me and make me sure that i am right but i realy need to know why he made this shift is that a type of making conflict to the other users of a program some thing like copy right to the program or what
and i would like to ask u a question

how can i become  a powerfrul plc programmer and how could u advice me to become a plc expert

thank u for ur efforts

best regards

ahmed
Top
  11/8/2009, 8:31 AM
Joined 11/24/2008
Last visit: 11/17/2009
Posts: 17
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 


hello fritz,
  thank u very much for replying me and make me sure that i am right but i realy need to know why he made this shift is that a type of making conflict to the other users of a program some thing like copy right to the program or what
and i would like to ask u a question

how can i become  a powerfrul plc programmer and how could u advice me to become a plc expert

thank u for ur efforts

best regards

ahmed
Top
  11/8/2009, 11:04 AM
Joined 3/15/2008
Last visit: 11/24/2009
Posts: 1500
Rating:
Rated: Outstanding [3.7 out of 5 / rated 122 time(s)]. (122) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
egy_eng wrote:


hello fritz,
  thank u very much for replying me and make me sure that i am right but i realy need to know why he made this shift ...


Read the post of darius!

Industrieautomation: Softwareerstellung und Inbetriebnahme weltweit.
http://www.ibn-service.com
Top
  11/8/2009, 11:07 AM
Joined 10/7/2005
Last visit: 11/24/2009
Posts: 449
Rating:
Rated: Outstanding [4 out of 5 / rated 100 time(s)]. (100) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
egy_eng wrote:
how can i become  a powerfrul plc programmer and how could u advice me to become a plc expert


Hello again egy_eng

Jolly good question and I wish I had the answer to it.
As they in general say "Practice makes perfect", I do however believe that this is not the only thing that sets a "good" Automation Engineer apart from an "average" one.
I've learnt a lot by having to deal with software that was developed by others which opens your eyes to find out different ways of doing things (not all of which are good and/or useful, but they at least still serve as a bad example on how NOT to do things, just like the piece of logic you came across).
 
My advise to you:
Have an open mind, be "curious" to learn, question things if they don't make sense to you rather than just accepting it, don't assume but instead verify by either testing or using the available resources (manuals, web etc.).
Most importanly though, enjoy doing what your are doing!   

I hope this helps

Cheers

fritz
Top
  11/8/2009, 11:09 AM
Joined 3/15/2008
Last visit: 11/24/2009
Posts: 1500
Rating:
Rated: Outstanding [3.7 out of 5 / rated 122 time(s)]. (122) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
egy_eng wrote:



how can i become  a powerfrul plc programmer


Not only writing, also reading.  Rnf:lblSmileyTooltip_

This Bats are cool......  Rnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloweenRnf:lblSmileyTooltip_halloween

Industrieautomation: Softwareerstellung und Inbetriebnahme weltweit.
http://www.ibn-service.com
Top
  11/9/2009, 7:19 AM
Joined 11/24/2008
Last visit: 11/17/2009
Posts: 17
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

hello again fritz

thank u for ur effort and i am trying to do what u say and read more and more and dealing with other programs

thanks alot

best regards
ahmed

Top
  11/9/2009, 7:21 AM
Joined 11/24/2008
Last visit: 11/17/2009
Posts: 17
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
hello ibn-service

thank u for ur comment but realy i dont understand daruis post

Look at Step-7 help file on indirect addressing. The example shifhts 3 bits to left because of tructure of the pointer. If you look at structure in the hep you will se that first 3 bits is bit address and shifted 512 is byte address of the memory location the pointer points to.


could u explain it to me

thanks in advance for ur efforts
best wishes
ahmed
Top
12» Page 1 of 2 (17 items)
Actions