You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old August 12th, 2005, 08:32 PM   #1
Brian E
Member
United States

Brian E is offline
 
Join Date: Sep 2003
Location: Vancouver, WA
Posts: 14
Little Help With TISOFT

In the MOVW Instruction what does the N=16 reference?

Thanks
Brian


|DUMMY COIL MOVW1---------+ RESET TABLE
|ALWAYS | | SET EQUAL

|OFF | | TO ZERO

| C100 | | C102

4 *----]/[-----| |-----------------------------------( )

| 1 | A:+0 |

| | RESET IMAGE |

| | REGISTER |

| | TO ZERO |

| | B:V101 |

| | N=16 |

| +-------------+
  Reply With Quote
Old August 12th, 2005, 08:58 PM   #2
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,572
It is an integer constant.
MOVW is very similar to an AB MOV only not as flexible.

Last edited by Peter Nachtwey; August 12th, 2005 at 09:02 PM.
  Reply With Quote
Old August 12th, 2005, 09:33 PM   #3
Gerry
Member
New Zealand

Gerry is offline
 
Join Date: Jun 2002
Location: Auckland
Posts: 1,142
Quote:
Originally Posted by Peter Nachtwey
MOVW is very similar to an AB MOV only not as flexible.
Peter,
Are you trying to rattle Terry Woods' cage or just being truthful (or both)?
  Reply With Quote
Old August 12th, 2005, 11:11 PM   #4
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,572
Brian E and I have known each other for many years. We are next door neighbors relatively speaking. We have visited each others offices and talk on the phone from time to time. He knows I kwow about TI plcs. I know he has programmed TI plcs in the past. I also know it was a long time ago. Notice we are both from Vancouver, Wa.

Gerry, I have MUCH MUCH more to lose than Terry when Siemens stops making TI505 and the support chips. Terry is just more vocal. Are you aware that my company makes motion controllers for the TI505? We have sold many and until about 1999 or 2000 the motion controller we make for the TI505 was our best selling motion controller. Terry knows this. He knows I am sincere and not trying to rattle him.

What most of you don't know is that the TI505 is far ahead of its time. Only the Control Logix can now challenge the TI505 back plane. The TI 505 back plane has a feature called pseudo DMA. This allowed intelligent modules such as our motion controller to read and write data out of PLC memory. This technology should have been enough to kick Rockwell's butt in the '80s and '90s but Rockwell's superior marketing and software has just about eliminated TI/Siemens from the forest product industry in the NW US. In some respects I/we have been responsible for the last few nails in the coffin.
  Reply With Quote
Old August 13th, 2005, 11:45 AM   #5
Terry Woods
Member
United States

Terry Woods is offline
 
Join Date: Apr 2002
Posts: 3,170
More than you wanted to know?


+-------------+
| MOVW |
| |
| A:+0 |
| |
| RESET IMAGE |
| REGISTER |
| TO ZERO |
| B:V101 |
| N=16 |
+-------------+


Brian E asked...

"In the MOVW Instruction what does the N=16 reference?"

Cutting to the quick, the manual says that "N" refers to the number of words to be copied. (I hope everyone realizes that a "Move" is really a "Copy" in that it does NOT leave an empty location behind... unless of course, it was empty to begin with.)

Since "A:" is a constant ("+0"), the instruction copies "+0" to "N-consecutive" word locations starting at V101.
Here is a very simplistic (and somewhat misleading) way of looking at it...

MOVW
A: +0
B: V101
N=4

("=>" means "goes to")

"N" A: B:
(1) +0 => V101
(2) +0 => V102
(3) +0 => V103
(4) +0 => V104


If the element in "A:" is a readable word location (ex: V201), then "N" greater than 1 indicates that this will be a Table Move (copy) consisting of N-elements. This also is a simplistic (and again, somewhat misleading) way of looking at it...

MOVW
A: V201
B: V101
N=4

("=>" means "goes to")

"N" A: B:
(1) V201 => V101
(2) V202 => V102
(3) V203 => V103
(4) V204 => V104


The actual steps in the instruction are much more involved...
(This might not be exactly how it works... if not, it's damned close!)

The instruction uses an Internal Index.
The initial value of the Internal Index is "0". This value serves as an "Offset".

A: V201 is the Base Address of the Source.
The Internal Index is the offset from the Source Base Address.

B: V101 is the Base Address of the Destination.
The Internal Index is the offset from the Destination Base Address.


First Pass... N = 4, Internal Index = 0

Compare the Internal Index to "N".
If the Internal Index = "N" then the instruction is DONE. (If "N=0" then no words are copied).
COPY "Source Base Address + Index" to "Destination Base Address + Index".
That is, COPY "V201 + 0 = V201" => "V101 + 0 = V101"
Increment the Internal Index (0 +1 = 1)

Second Pass... N = 4, Internal Index = 1

Compare the Internal Index to "N".
If the Internal Index = "N" then the instruction is DONE.
COPY "Source Base Address + Index" to "Destination Base Address + Index".
That is, COPY "V201 + 1 = V202" => "V101 + 1 = V102"
Increment the Internal Index (1 +1 = 2)

The loop continues until the Internal Index = "N".

Here it is in table-form...

MOVW
A: V201
B: V101
N=4

("=>" means "goes to")

Before each pass... Compare Internal Index to "N". If GT or EQ to "N", then DONE.
If N = 0 then no passes are executed... the instruction is done before it starts.


Internal
PASS "N" Index A: + Index = Source => B: + Index = Destination INC Index

1 (4) (0) V201 + 0 = V201 => V101 + 0 = V101 0 + 1 = 1

2 (4) (1) V201 + 1 = V202 => V101 + 1 = V102 1 + 1 = 2

3 (4) (2) V201 + 2 = V203 => V101 + 2 = V103 2 + 1 = 3

4 (4) (3) V201 + 3 = V204 => V101 + 3 = V104 3 + 1 = 4

5 (4) (4) Internal Index = "N"... DONE!


Notice that "N" acts as an Index Limit. When the Internal Index is equal to "N" then the instruction is DONE.

The default value for N is "1". This causes at least one word to be copied... otherwise, what's the point? Initially, the instruction starts with an Internal Index value of "0". Before executing a move (making a pass), the instruction compares an Internal Index to "N". If the Internal Index = "N" then the instruction is DONE.

Actually, internally, there is still a bit more going on than shown...
V201 is NOT an actual address! It is only a NAME of a particular address! The specific memory address is more involved than simply "V201". But that is beyond this particular discussion.

Does that answer your question Brian? (Probably more than you needed or wanted to know...?)

BTW, "RESET IMAGE REGISTER TO ZERO" sounds like a perfectly ridiculous name for V101. It makes no sense at all.


Peter said...
"MOVW is very similar to an AB MOV only not as flexible."

This is true... MOVW is not very flexible. That is why TI has the MOVE (Move Element as opposed to Move Word) Instruction.

The MOVE instruction is much more powerful than the MOVW instruction. I don't think any vendor has a more powerful version of this instruction. Equal, maybe, more powerful... I doubt it.

Peter also said...
"Only the Control Logix can now challenge the TI505 back plane."

As in... AB is finally coming up to speed. I can't argue with that. In fact, they have gone a few steps further by implementing tag-oriented element names. This kind of programming goes back to the early 80's when DEC introduced VMS (Virtual Memory System). No longer did a programmer have to keep track of all of the memory locations by address... now the system did it automatically through virtual naming.

For those that aren't aware of it... "C"-type programming in PLCs is slipping in right under your noses! Control Logix is very much like "C".

But I gotta say... I absolutely hate their programming interface display and their program print-outs. They still have a ways to go in that respect.

And yes, I certainly know that Peter has depended on TI-505 business for quite a while. I have a couple of his motion control cards installed (although I'm replacing those with a pair of standard analog output cards).

I know that Peter has much respect for the TI-505 line.

BTW, Brian...
Do you, or have you used CVU?

Last edited by Terry Woods; August 13th, 2005 at 11:50 AM.
  Reply With Quote
Old August 13th, 2005, 05:49 PM   #6
Brian E
Member
United States

Brian E is offline
 
Join Date: Sep 2003
Location: Vancouver, WA
Posts: 14
Thanks

It has been a long time since I have played with TI. I find the MOVW is similar to the COP instruction, where the integer constant is the number of words being moved. I also found a couple of manuals online that have been helpful.

Terry,
CVU? Operator Displays? We had them, but somebody else programmed them on TI jobs.

Thanks
Brian
  Reply With Quote
Old August 13th, 2005, 06:22 PM   #7
Terry Woods
Member
United States

Terry Woods is offline
 
Join Date: Apr 2002
Posts: 3,170
So... Brian...

Do you have any of the CVU Dongles on hand?
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
TI-505 CPU models and history Ken Roach LIVE PLC Questions And Answers 9 April 26th, 2008 12:53 AM
TIsoft manuals?? gabbar LIVE PLC Questions And Answers 7 January 9th, 2006 06:45 PM
CH D100 & TISoft tmechanic LIVE PLC Questions And Answers 1 August 12th, 2005 11:05 AM
TIsoft save program jrangel13 LIVE PLC Questions And Answers 2 April 6th, 2005 03:41 AM
Tisoft 305 atatari LIVE PLC Questions And Answers 4 January 11th, 2003 08:25 AM


All times are GMT -5. The time now is 08:20 PM.


.