Author Topic: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)  (Read 154150 times)

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #425 on: October 04, 2018, 12:28:52 PM »
Before Parcelforce delivered the CPU card I had started an intensive review of why the 'cracked' version of STEP5 PLC software wasn't loading. Now I would not normally entertain 'cracked' software, but STEP5 has been updated to STEP7 by Siemens and they had given me an official copy to try, but sadly STEP7 cannot talk to this particular PLC, and oddly Siemens can't provide a copy of STEP5 so I felt 'sort of' justified. Even so, these things can be lethal to down load with all sorts of nasties embodied. So with full virus protection and a pair of rubber gloves on, I 'had at it'  :clap:

It looks as though I had miss-understood the instructions, which seem to be a translation of the original German, into Russian, then into English. Anyway cutting a very long story short, I have managed to get some form of STEP5 running on my Panasonic Toughbook CF-52 under Windows XP-Professional.

The CF-52 has a proper serial port, but there lies my next hurdle. I can't find any way of setting up the communications parameters in STEP5 let alone set up the 820T controller to know that it has a PLC monitoring program on the other end of it's RS232 cable !

I can see some considerable googling happening this evening and rather a lot of  :coffee: and  :scratch: and more  :coffee:

Andrew Mawson
East Sussex

Offline Pete.

  • Hero Member
  • *****
  • Posts: 1075
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #426 on: October 04, 2018, 03:17:45 PM »
Do you know if it uses a standard serial cable or null-modem type Andrew?

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #427 on: October 04, 2018, 04:09:42 PM »
I'm pretty sure the cable I already use to up and download the files to the 820T from my desktop will be fine Pete. It's a question of putting the controller in a state whereby the serial port is 'looked at' and 'talked to' by the STEP5 program. Early versions of programmers that talk to this controller used 'current loop' and ran under CP/M but I know that although the 820T is fully capable of being set up for current loop, later programmers used RS232 as per the up and down loading.

The real issue at the moment is getting STEP5 to know about ANY interface, never mind the wrong one! I suspect that possibly there are some windows drivers needed. The port on the CF-52 exists, XP-Professional knows it's there, and I've used it to talk to the 820T controller for loading and downloading.

The STEP5 program is very 'DOS Looking' and I think thereby lies the issue !
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #428 on: October 04, 2018, 04:21:08 PM »
For any one passing this way who is familiar with STEP5 software and can offer help, this is the version information:
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #429 on: October 05, 2018, 06:34:25 AM »
Progress comes in tiny little bits after expending hours faffing about  :lol:

At last I've found the bit in STEP5 that lets me select the correct COM port (COM2: on this laptop) - now the book of words for the 820T controller doesn't directly refer to STEP5 talking to it's interface, but it does refer to "PD/PG Programming Workstation" and gives me parameters for the interface (4800 baud, 8 data, 2 stop bits, no parity, flow control via XON/XOFF) and gives a 'device code 3' in the setting bits so the controller knows what it's talking to. What it doesn't say is what I need to do at the controller to start the two talking ! At the moment I've just experimented in the 'data-in start' mode.

Using XP's Device Manager to set the COM port to match and thrashing about again in STEP5 I find a bit where the PLC can be set ONLINE from it's current 'OFFLINE' state. If I do this it give me a message saying that it's checking the interface, but then comes up with a red error message "System Message no. :0334"

Is this progress - yes I think that it is of a sort - the STEP5 program is at least acknowledging that is has a port to talk to but presumably doesn't like what's being whispered in it's ear !

The major issue is that I have no documentation for STEP5 and haven't so far been able to find a source.

 . . these things grind VERY slowly . . . .
Andrew Mawson
East Sussex

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #430 on: October 05, 2018, 06:45:01 AM »
I know your google-fu is far better than mine... I presume you've done the obvious & googled for system message 0334?

Top hit is probably useless: https://support.industry.siemens.com/cs/document/18548070/-system-message-no-0334-when-attempting-to-go-online-with-step-5-v7-2-in-windows-xp?dti=0&lc=en-WW

However... it's possible that XP isn't letting STEP5 have direct access to the COM ports, especially as it does (as you say) look a LOT like an old DOS program. How lucky do you feel? Maybe you could wind the clock waaay back & try a Windows 95/NT4, or even Win 3.1 setup? Possibly in a Virtual Machine, although that might muddy the waters even more...
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #431 on: October 05, 2018, 06:52:46 AM »
Thanks for that Ade  :thumbup:

I've been searching for the manual for 'step5 V7.23' without any luck, but I HAVE just found (all 529 pages!) of the V7.0 manual. Now no doubt there will be many differences, but at least it is shedding a bit of light on things !
Andrew Mawson
East Sussex

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #432 on: October 05, 2018, 06:55:12 AM »
Hmm, ok, answering my own question.... looks like the product matrix indicates v7.23 is compatible with Windows XP SP1,2 & 3. So that shouldn't be a problem - although I might still be tempted to try a Win 95 system.

Another possible issue to head off at the pass, are you running a multi-core CPU? If so, you may need to restrict it to a single core...: https://support.industry.siemens.com/cs/document/44044935/how-do-you-avoid-a-blue-screen-when-using-step-5-v7-23-for-an-online-connection-between-a-pc-with-multi-core-cpu-and-an-s5-?dti=0&lc=en-WW
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline DICKEYBIRD

  • Full Member
  • ***
  • Posts: 229
  • Country: us
  • Collierville, TN ya'll
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #433 on: October 05, 2018, 06:55:23 AM »
Win98 is the last OS that will boot to "real" DOS if memory serves.  Ahh, the good ol' days! :beer:
Milton in Tennesee

"Accuracy is the sum total of your compensating mistakes."

Offline PekkaNF

  • Hero Member
  • *****
  • Posts: 2523
  • Country: fi
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #434 on: October 05, 2018, 10:15:36 AM »
If my memory serves me correctly, older Step5 versions tried to communicate to COM3 directly. If there were other programs, there were conflicts. But I never used any windows version and Step5.

Pekka

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #435 on: October 06, 2018, 05:22:17 AM »
I started this morning with three objectives:

a/ Prove the COM2: port on my laptop is working
b/ Prove that STEP5 is talking to the correct COM port
c/ Make sure that the baud rate, word length, parity and flow control all match

So by connecting my trusty RS232 breakout box using the same cable that I've been using to try and talk to the PLC, going to the command prompt under WIN-XP-Professional and issuing the command:

COPY CON COM2  (copy blocks from the CONsole to COM2:)

Sure enough I get activity on the transmit line - good, the port is working OK

Now here comes the oddity. If I use the MODE command to show how the port is set up I get 1200 baud, no parity, 7 data bits, 1 stop bit Xon/Xoff disabled and DTR/RTS enabled. But I have set it in Device Manager to be 9600 baud, no parity, 8 bits, 2 stop bits, using Xon/Xoff - see the picture with both on the screen at the same time !

So what happens if I run STEP5 with the port connected still to the breakout box? There is transmit activity - STEP5 IS talking to the correct com port :thumbup:

But look what happens to the port settings - under MODE we now have the correct baud rate, but wrong parity and flow control but under Device Manager everything is correct  :scratch:

And if I bring up Device Manager and the Command Prompt screens while STEP5 is running they still contradict each other  :scratch:

Another oddity is that I cannot get the MODE command to accept a setting for Xon/Xoff - I must not be understanding the syntax despite having the crib sheet on screen by entering mode /?

So something odd going on here - until I can get consistent port settings the PLC ain't going to talk ! Who is controlling this port ????
« Last Edit: October 06, 2018, 05:49:47 AM by awemawson »
Andrew Mawson
East Sussex

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #436 on: October 06, 2018, 06:43:01 AM »
This:

Code: [Select]
MODE COM3: xon=on

worked for me...

Interestingly, I have mis-matched port settings in Windows 7 as well.... although this laptop doesn't have a real serial port, I wonder if Windows & "DOS" are somehow talking to different things?
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline AdeV

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2434
  • Country: gb
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #437 on: October 06, 2018, 06:56:20 AM »
A thought occurs to me... as this is a "real" serial port, rather than some witchcraft thing, can you set the default values in the BIOS to match your requirements?
Cheers!
Ade.
--
Location: Wallasey, Merseyside. A long way from anywhere.
Occasionally: Zhengzhou, China. An even longer way from anywhere...

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #438 on: October 06, 2018, 07:44:32 AM »
Good thinking - I'll experiment after lunch  :thumbup:
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #439 on: October 06, 2018, 08:47:05 AM »
No luck Ade, all I can set in the BIOS is enable/disable for the port  :(

This mode thing is VERY odd. If I use your syntax as a single parameter sure enough I can enable XON but not as one of a line of parameters.

If I set baud rate, no of data bits and parity as a mode command then follow with mode com2: xon=on as a subsequent command it sets XON ok but resets the bits back to 7/1  leaving the baud rate at 9600 :bang:

Andrew Mawson
East Sussex

Offline seadog

  • Full Member
  • ***
  • Posts: 223
  • Country: gb
  • NE London
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #440 on: October 06, 2018, 10:18:55 AM »
A quick Google seems to suggest that the defaults are 9600, no parity, 8 bits, 1 stop bit and xon/xoff. it suggests that you do not need to configure the handshake.

MODE COM2: 9600,n,8,2 should do the trick.

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #441 on: October 06, 2018, 10:47:09 AM »
Thanks, but if you look at the last picture you will see it actually defaults to 7 bit 1 stop and even parity  :(

And with your command line it reverts to RTS & DTS with XON disabled but does set the baud rate etc OK as shown in picture 2 above where that is the mode command that I issued !

It wasn't until I looked at that picture I realised it actually told me what it was defaulting to !
Andrew Mawson
East Sussex

Offline seadog

  • Full Member
  • ***
  • Posts: 223
  • Country: gb
  • NE London
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #442 on: October 06, 2018, 12:34:58 PM »
I appreciate that, Andrew. I was just commenting that xon/xoff seemed to be the default. I know you've already tried it, but the suggestion is that Device Manager is the best was to configure ports post Win 95. Very strange   :scratch:

Offline russ57

  • Sr. Member
  • ****
  • Posts: 278
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #443 on: October 07, 2018, 04:48:32 AM »
You could try this syntax

Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [to=on|off] [xon=on|off] [odsr=on|off] [octs=on|off] [dtr=on|off|hs] [rts=on|off|hs|tg] [idsr=on|off]





IE
Mode com2: BAUD=9600 PARITY =e DATA=8 STOP=1 xon=on




Russ
« Last Edit: October 07, 2018, 06:49:00 AM by russ57 »

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #444 on: October 07, 2018, 09:46:34 AM »
Russ you are a genius  :bow:

Yes that works and not only can I set the correct bits, baud rate and parity using Xon, but it actually remains unchanged having been into STEP5 and then out. I can't use the MODE command when actually running STEP5 as MODE complains that that port isn't available of course.

Today's plan was to connect up my Tektronix 834 RS232 analyser and try and watch the traffic between STEP5 and the 820T controller, having firstly re-taught myself how to use it after many years gathering dust.

First - set up it's interface to match the laptop - COPY CON COM3: and sure enough 'THE QUICK BROWN FOX . . . .' ends up on the analyser screen.

Next - connect the 834 to snoop on the line - now this requires a three way D-Type cable IDC cable. Male at one end (for the 820T), Female at the other (For the STEP5) , with a Male in the middle (to connect to the 834 Analyser). I used to be awash with these, and also the IDC plugs and sockets to make them - always useful on site to make up odd connections to printers, modems etc. Could I find one - of course not  :bang:

OK lets see what STEP5 is sending out on the interface even if we can't see what does or does not come back from the 820T controller as this just needs a simple male / female cable.

Answer:  STX NULL BRK NULL BRK STX NULL BRK

So what did I learn from that? Not a lot except that presumably it's polling the control and waiting for a response, then not getting what it expects it times out.

I still don't know what mode or state the 820T controller needs putting in for all this exchange to work. I've been assuming it needs to be in the Input/Output mode waiting to receive, but that is just guessing. But at least thanks to Russ the mode issue seems sorted.

Order for D-25 IDC plugs and sockets placed with RS-Components - should be here Tuesday  :ddb:

Andrew Mawson
East Sussex

Offline russ57

  • Sr. Member
  • ****
  • Posts: 278
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #445 on: October 07, 2018, 05:57:46 PM »
You could try sending some sort of response from your analyser to step5

Perhaps an ACK or CR

doesn't help with getting the controller to the right mode but perhaps at least confirmation that step5 is happy.



Russ


Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #446 on: October 08, 2018, 08:37:04 AM »
Hi Russ, as I type I'm studying the 834 manual to see if I can implement your good idea  :thumbup:

(Distracted this morning trying to get a two tube U/V fly killer working for the meat preparation area. How simple can they be, two little 300 mm T5 fluorescent tubes, two 115 volt starters, one  240 volt choke, one  240 / 2200 volt EHT transformer, two interlock microswitches. At any one time I could get one tube working but not both, and every time I switched on it was random which one started. EVENTUALLY realised that someone has fitted two 15 watt tubes whereas they should be 8 watt ones according to the choke markings.Tubes in series hence the odd symptoms  :bang:)


Later Edit:

Russ, it looks like it IS possible but rather complicated. I'll wait until I have the three way connection, hopefully tomorrow.
« Last Edit: October 08, 2018, 09:53:35 AM by awemawson »
Andrew Mawson
East Sussex

Offline russ57

  • Sr. Member
  • ****
  • Posts: 278
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #447 on: October 08, 2018, 06:56:51 PM »
Patience always helps!

Russ


Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #448 on: October 09, 2018, 04:30:15 AM »
Patience always helps!

Russ

Patience isn't one of my virtues Russ  :clap:

Still waiting for the IDC connectors, though tracking says 'out for delivery today'  :thumbup:

Also still waiting for the correct fly killer tubes, but I left it on the workshop bench overnight running one tube (due to the wrong tubes) and it's amazing how many flies it's zapped - over a dozen  :bugeye:
Andrew Mawson
East Sussex

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8967
  • Country: gb
  • East Sussex, UK
Re: The Sequel - Oh Blimey I bought a CNC Lathe (Beaver TC 20)
« Reply #449 on: October 09, 2018, 08:20:10 AM »
The IDC-D-Type male and female connectors have been delivered, so I set to making up the three ways cable. Somewhere I have the proper squasher for making these cables, but for a one-off the vice with soft jaws was perfectly serviceable.

So, cable made up, Tektronix 834 and Sinumerik 820T steamed up and interconnected to my Toughbook CF-52 running STEP5, and full of expectations I told STEP5 to go on line.

. . . result ?  . . nowt, no response what so ever, the 820T sits there like a sulky child doing the dumb insolence thing  :bang:

In desperation I set the interface to use RTS/ CTS and then DSR/DTR but no, still no response at all although the controller was happy to push out its same polling sequence

This is getting very frustrating, there are just too many variables.


. . . meanwhile the dead fly count is increasing at an alarming rate - I think that there must be a dead pigeon on the roof  :scratch:
Andrew Mawson
East Sussex