Sidewinder
Lifetime Supporting Member
Hi all,
Long time, no posts, sorry, I did not thank anyone for the help I had sorting out the Omron comms from my last thread, so I'll do it now.
Thanks!
Sorry for the long post, but I hope to try & explain the situation & give you enough information to help me out & see why I’m asking.
Same client, same machine as the last thread.
Machine builder has gone through, got a backup for the client no problems.
Now the client wants to mod the machine, we are adding a second feed section onto it, which will co-exist with the existing feeder for now.
It is a special purpose machine, the only one in existence, though there may be others similar, and there are almost certainly other machines that do the same job by other vendors.
The client wants to be able to literally switch from one feeder to another, and manually re-thread the product as the feeder is his most unreliable & slow aspect of the machine.
We are trying out a new mechanical design, so he has his reservations on the new unit and wants to be able to revert back as he understands the existing unit.
Now there is a selector switch on the machine for an old redundant function which I can re-programme for the feeder selection switch.
However, first I have to reverse engineer the programme.
There are no comments, symbols or labels, in the existing backup, and the client has no drawings, nor any programme info.
The feeder is 1/3rd to ½ of the machine!
Now I started by physically tracing the I/O and noting what does what, where it goes etc.
Now I have an IO map.
Next I created symbols for the I/O thus making the ladder easier to read, to simplify the understanding and making it easier to reverse engineer.
Next I created symbols for all the working bits (latches) etc. nothing meaningful yet until I know what they do, just Latch_1 etc.
Next was the timers, this is where I became unstuck & I don't know why!
I created a Local symbol for the timer "Timer_001", as there is a timer in the programme TIM001, that is a 100ms timer with a base address of 000, yes?
So I create a symbol, call it "Timer_001", data type "TIMER", Address or value "TIM001", I put a verbose description in the comments box to make it easier to follow whilst I am working on the programme.
Now this then turns the ladder rung read.
The timer is already programmed with a #2 (for example for 200ms, that is two ticks of the timer, yes?)
The red colouring of the vertical bar at the LH edge of the ladder, is, as I understand it an error, which when I try to compile is confirmed, with an error such as this:
"ERROR: Operand 0 uses symbol 'Timer_001' whose data type is not NUMBER at rung 10 ( 6, 0 ).
Now this is where I REALLY come unstuck, as I can’t for the life of me see what I have done wrong!
I’ve tried them in Global & Local symbols & get errors with both, but different in Global, in Global I get an error like this:
“ERROR: Operand 1, Timer_001, out of range at rung 10 ( 2, 3 ).”
This rung is not my code, it is either the machine builders, or a previous freelancer.
In the pdf attached, both the timer contact in the rung, & the timer show red!
This rung was a working rung downloaded from the machine, then I added the symbols, eventually once I know what the timers do, & when I add my own, I want to give them more descriptive names than 001!
Any help gratefully accepted.
Long time, no posts, sorry, I did not thank anyone for the help I had sorting out the Omron comms from my last thread, so I'll do it now.
Thanks!
Sorry for the long post, but I hope to try & explain the situation & give you enough information to help me out & see why I’m asking.
Same client, same machine as the last thread.
Machine builder has gone through, got a backup for the client no problems.
Now the client wants to mod the machine, we are adding a second feed section onto it, which will co-exist with the existing feeder for now.
It is a special purpose machine, the only one in existence, though there may be others similar, and there are almost certainly other machines that do the same job by other vendors.
The client wants to be able to literally switch from one feeder to another, and manually re-thread the product as the feeder is his most unreliable & slow aspect of the machine.
We are trying out a new mechanical design, so he has his reservations on the new unit and wants to be able to revert back as he understands the existing unit.
Now there is a selector switch on the machine for an old redundant function which I can re-programme for the feeder selection switch.
However, first I have to reverse engineer the programme.
There are no comments, symbols or labels, in the existing backup, and the client has no drawings, nor any programme info.
The feeder is 1/3rd to ½ of the machine!
Now I started by physically tracing the I/O and noting what does what, where it goes etc.
Now I have an IO map.
Next I created symbols for the I/O thus making the ladder easier to read, to simplify the understanding and making it easier to reverse engineer.
Next I created symbols for all the working bits (latches) etc. nothing meaningful yet until I know what they do, just Latch_1 etc.
Next was the timers, this is where I became unstuck & I don't know why!
I created a Local symbol for the timer "Timer_001", as there is a timer in the programme TIM001, that is a 100ms timer with a base address of 000, yes?
So I create a symbol, call it "Timer_001", data type "TIMER", Address or value "TIM001", I put a verbose description in the comments box to make it easier to follow whilst I am working on the programme.
Now this then turns the ladder rung read.
The timer is already programmed with a #2 (for example for 200ms, that is two ticks of the timer, yes?)
The red colouring of the vertical bar at the LH edge of the ladder, is, as I understand it an error, which when I try to compile is confirmed, with an error such as this:
"ERROR: Operand 0 uses symbol 'Timer_001' whose data type is not NUMBER at rung 10 ( 6, 0 ).
Now this is where I REALLY come unstuck, as I can’t for the life of me see what I have done wrong!
I’ve tried them in Global & Local symbols & get errors with both, but different in Global, in Global I get an error like this:
“ERROR: Operand 1, Timer_001, out of range at rung 10 ( 2, 3 ).”
This rung is not my code, it is either the machine builders, or a previous freelancer.
In the pdf attached, both the timer contact in the rung, & the timer show red!
This rung was a working rung downloaded from the machine, then I added the symbols, eventually once I know what the timers do, & when I add my own, I want to give them more descriptive names than 001!
Any help gratefully accepted.