Odd occurence in Logix 5000

ydtech

Member
Join Date
Jul 2008
Location
Guaiba - RS
Posts
116
I have a variable W89, alias for W0[89] (DINT). When I type it into a rung like
XIC SomeBit EQU W89 AnyValue OTE OtherBit
the EQU ends up empty and W89 as unknown instruction. Using any of the other Ws this doesn't happen. Is there something magical with this specific tag?:confused:
 
Last edited:
Post the program.

Without seeing the program, all I can suggest is to double-check your alias. Make sure it isn't defined as W0[89].0 or something like that.
 
Sounds like a syntax error? If you have an array W0 with 100 elements (DINTS) I think you would be looking for equal to W0[89] for element 89.
 
I have a variable W89, alias for W0[89] (DINT). When I type it into a rung like
XIC SomeBit EQU W89 AnyValue OTE OtherBit
the EQU ends up empty and W89 as unknown instruction. Using any of the other Ws this doesn't happen. Is there something magical with this specific tag?:confused:

Could be the scope of the tag. Are you using logic in same section of program in a task?
 
W0 is an array of 250. I specified an alias for each entry, W2 is W0[2], W200 is W0[200], and so on. This is because I'm transcribing a program from another PLC and need to replicate the tricks it does in memory management.

Any of the other aliases work, e. g. EQU W78 3 is fine. It seems to only happen with this specific tag. I've tried rewriting it, removing and restoring. Still the same thing.

I created the array via a csv made in Excel, so all the entries should be the same.

I can live with it, but find it intriguing and wondered if anyone has seen it before.
 
Just curious - what is the alias for W0[0]?

I think you will have to post your project (or a subset which exhibits the same behavior) for us to provide much more help.
 
Last edited:
Somewhere when typing in your code you made a typo leading the software to believe W89 was an Instruction. So now even when you type in correctly the Software has marked it as an Unknown Instruction. Been There done that. It will work by using the mouse and buttons to enter instructions then add address. But if you type your rungs in mnemonic it will fault everytime. Copy and Paste logic in a new file with different name. Then try Typing mnemonic code in and it will work. Delete original File Then save New File to Old Name. I don't know where the program files store this Unknown Instruction Memory but it is a pain.
 
Can't post the program since it's over 2 megs already. I tried to reproduce the problem in a new program creating the array from the same csv but then it worked fine. No alias for W0[0].

I think cwal61 has it right, but c/p of the whole kaboodle is pretty much out of the question. Filling in the empty EQU and deleting the "unknown instruction" works. It's a PITA, W89 pops up everywhere in the code, but I can live with it.

If I find some solution I'll post it up, but I can't spend too much time on it due to a tight deadline.
 
I use to change name of unknown when typing. In your case W89 could be W890. Then it will be an undefined address and not put in the Unknown Instruction box. Then you click W890 and remove 0. But format will be correct. Or, you could just keeping typing out program and when your done Search and Replace W890 with W89 and get'em all in one shot.
 
Last edited:
It worked fine for me - see pic.

But I fail to see the benefit of all those alias tags, just so that you can reference W0[nn] as Wnn. Seems to me to be a pretty pointless, time-consuming exercise.

And of course you will have a problem aliasing W0 to W0[0] as already stated.

Workaround - W00 aliased to W0[0]

But then you've got W0 and a W00 tags !! Highly confusing for anyone else reading the code !

2013-02-01_162852.jpg
 
Less typing, more in keeping with the original code. Took only a few minutes in Excel and Notepad++. No alias needed for W0[0].
 
W0 is an array of 250. I specified an alias for each entry, W2 is W0[2], W200 is W0[200], and so on.


This is because I'm transcribing a program from another PLC and need to replicate the tricks it does in memory management.

Do tell?

Any of the other aliases work, e. g. EQU W78 3 is fine. It seems to only happen with this specific tag. I've tried rewriting it, removing and restoring. Still the same thing.

I created the array via a csv made in Excel, so all the entries should be the same.

I can live with it, but find it intriguing and wondered if anyone has seen it before.

Simple fix:

Change the W0 array to WO, now it's unique, or make it local in scope if it's only used in one program...
 

Similar Topics

I have an Allen Bradley temperature switch that I am trying to use in studio 5000. I am getting the message "Unable to interpret the IODD file"...
Replies
0
Views
95
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
448
I have been requested to test this proportioning valve for PLC control of flow/pressure. Dwyer Series SVP Proportioning Solenoid Valve The flow...
Replies
10
Views
430
Howdy guys - Looking for some insight on the MAM instruction. Had an interesting one today: I performed a controller upgrade on an older system...
Replies
1
Views
446
Hi everyone, curious if anyone has ever witnessed the following comm error: A little history, I had a department PC die, WIN 7. Had to upgrade...
Replies
4
Views
641
Back
Top Bottom