The Craftmans Shop > New from Old

The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)

<< < (100/260) > >>

awemawson:
It turns out that the one 'Program Block' PB202 has 172 segments full of all sorts of complexities waiting to be de-coded. (But all the other blocks are 'single segment')

Below is a random but not untypical segment, segment 92 displayed in 'Ladder Format'.

Todays job is to try and find how I can get the graphical representation of the whole 172 segments into a readable file or out to a printer. Taking screen shots, or as I've been doing this morning actually photographing screen images isn't really practical to get to grips with this beast.

 STEP5, being from the era that it is is expecting a printer on a LPT port - well it's out of luck, because even if I had a suitable parallel connected printer the Toughbook hasn't got an LPT port.

It's running under XP professional, but won't use XP's default printer (an HP Laser on my network) although XP is happy with it.

More questions to the Siemens forum coming up I think!

awemawson:
Well I've discovered a STEP5 utility that takes a file generated in STEP5 and allows it to print on the default windows printer - so that's one more hurdle straddled  :thumbup:

It's all very clunky, and all data for printing has to be put into an '.INI' file and an off line utility run - most peculiar !

But although I can cheerfully print directory listings of the program elements (Program Blocks, Organisation Blocks etc) at the moment I cannot find how to print the contents of the blocks themselves despite being able to see them on the screen. It surely MUST be possible, it's just I'm being dense I suspect  :scratch:

I can even print out cross reference tables of all the inputs and outputs to the PLC program, but not the actual code or ladder logic - very odd, but this whole PLC escapade has been very odd so why should it change now  :lol:

awemawson:
A VERY nice man on the Siemens forum has offered to take my STEP5 project file and turn it into a PDF of the ladder logic, so I've just zipped it up and posted it on the forum.

Meanwhile, looking through the code for the W-Axis (which isn't fitted to my lathe) I can successfully map the output "Q bits" in the PLC code to the input  bits on the circuit diagram that I have. This is encouraging - if eventually I can do the same for the M20 preparation code for Spindle Orientation that started this particular investigation what seems months ago, then I'll be a very happy bunny  :ddb:

AdeV:
Is this "ladder logic" what you and I would more generally know as the G-codes which form the program? Or is this something else? Am I likely to have to learn all this stuff for my Mazak, if I ever get it going?  :bugeye:

awemawson:
Ade,

No, a long way from G code !

PLC's or Programmable Logic Controllers evolved to eliminate the masses of relays found in many automation systems as they were a constant source of failure, were expensive to build and fault find.

Consider the PLC like an electronic ULA or uncommitted Logic Array, that has loads of inputs, loads of outputs, and is programmed to define the logical connections between inputs and outputs.

The PLC goes one further step and can incorporate timers, latches, and interrupt service routines.

Now there are several ways this logic can be portrayed. In my view the simplest is the 'ladder logic'  with decisions shown as open or closed switches. You have such a ladder of contacts in your Bridgeport Interact for the 'eStop Chain' where the ultimate end point is to open the eStop relay if things aren't safe.

'Ladder' because the original relay logic contacts were strings between the positive and negative rails of the supply each string making effectively one decision, and when drawn out looking like a ladder!

Below is a slightly more complex bit of my PLC ladder (Segment 92) where an RS Flip flop is involved :

Flag bit 47.2 sets the RS flip flop if Flag bit 142.2 is True
Flag bit 47.1 clears the RS flip flop if Flag bit 142.2 is True

And the resulting output of the flip flop is presented to the interface as output bit Q0.2 which on my lathe is an actual hardware output 'Chuck Low Pressure Select'

(it equally could have been another flag bit to be used as input on another rung of the ladder)

I've no doubt that ultimately Flag Bits 47.2 and 47.1 will be derived from decoding M codes (or machine control codes) in the running program but I've not got there yet !


. . . niffty eh  :ddb:


 

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version