Starturn 4 '.sta" format

All info relating to the Denford StarTurn CNC lathes

Moderators: Martin, Steve, Mr Magoo

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Starturn 4 '.sta" format

Post by Karl » Wed 27 Sep , 2006 21:30 pm

I have 8 Starturn 4 lathes in a NC lab in a Community College. I would like to be able to have the students write their programs using an editor I wrote. Does anyone know the format of the encripted ".sta" files used by the starturn? I think I could change my editor to read and write this format if I just could find the format of these binary files. Sence Denford no longer supports this format, I would not think they would object to releasing it now.
Thanks for any infor you could forward to me.
Karl

User avatar
Triac whizz
CNC Expert
CNC Expert
Posts: 238
Joined: Mon 17 Jul , 2006 21:48 pm
Location: France

Post by Triac whizz » Thu 28 Sep , 2006 7:57 am

Arn't they just .txt files - try opening them in Notepad. The machine doesn't care about the ending as long as the file is in plain text.
Self Catering Lodges in Central France with covered pool & large grounds
www.la-coterie.com

User avatar
Denford Admin
Site Admin
Posts: 3642
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Post by Denford Admin » Thu 28 Sep , 2006 17:16 pm

If the files really are encrypted, can you try attaching an example one on here for us to have a look at :?:

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

.sta file format

Post by Karl » Thu 28 Sep , 2006 18:33 pm

These are not standard ASCII. I wish they were! Attached is an example.
I got on the internet last night and was exploring 4 byte storage of floating point variables. I think that may be the way numbers are stored. I have done a binary dump and can read the data, I just don't know how to interpert it . I believe it is in ~87 byte fixed length strings.

Thanks again

Karl

I finally got my file to attach, but had to change the file extension to "txt" form ".sta". The forum does not allow ".sta" files to be attached. Thanks again
Karl
Attachments
JOB2.txt
(2.55 KiB) Downloaded 1316 times
Last edited by Karl on Thu 28 Sep , 2006 18:47 pm, edited 1 time in total.

weegee
Posts: 11
Joined: Sat 23 Sep , 2006 3:50 am

Post by weegee » Thu 28 Sep , 2006 18:41 pm

how dow i find the attachment so that i can have a look see?

thanks

graham

User avatar
Triac whizz
CNC Expert
CNC Expert
Posts: 238
Joined: Mon 17 Jul , 2006 21:48 pm
Location: France

Post by Triac whizz » Thu 28 Sep , 2006 19:33 pm

Hmm, you were right I was wrong. :roll:

Absolute gobbledegook!

Can't you use that industrial editor of Denfords to make & send to the machine?

Don't ask me anymore questions on the ind. editor I've heard it mentioned in these columns but don't use it myself. I prefer something a bit more wysiwyg :)

hand coding, that's a strange concept, can you explain some more ;)
Self Catering Lodges in Central France with covered pool & large grounds
www.la-coterie.com

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Post by Karl » Thu 28 Sep , 2006 19:38 pm

I've attached an ACII text version of the same program. I typed it in, remembering what the .sta file looked like. So there may be some errors, but it is basically identical info. So "job2.txt" is the binary file I am trying to decode. "job2a.txt" is an ASCII file of the data contained in the "job2.txt" file. Is that clear?

Thanks again

Karl
Attachments
Job2a.txt
(439 Bytes) Downloaded 1305 times

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Post by Karl » Thu 28 Sep , 2006 19:41 pm

No As much as I can determine, the Denford Editor is an ASCII editor and doesn't read or write the encripted .sta file required of the Starturn 4 machines.

Karl

User avatar
Triac whizz
CNC Expert
CNC Expert
Posts: 238
Joined: Mon 17 Jul , 2006 21:48 pm
Location: France

Post by Triac whizz » Thu 28 Sep , 2006 20:15 pm

:? well if the starturn4 only accepts binary (I guess you've looked in the book?) it's a pretty raw deal! :?

I was under the impression that all machines took in ascII and twisted it inside to what they wanted.

Have you actually tried the industrial editor? perhaps the startun prog turns the file to ascII when it sends to the machine? - bl**dy convoluted if that's the case!

I'm pretty much out of ideas. We'll have to wait until Mr. Magoo chips in - he'll know the answer (don't let me down now Mr. Magoo)
Self Catering Lodges in Central France with covered pool & large grounds
www.la-coterie.com

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Post by Karl » Thu 28 Sep , 2006 21:12 pm

Thanks Triac whizz for your effort.

But, yes, Starturn 4's only save the user files in binary format. The simulator setting are stored in a separate ASCII (.sts) file. That I'm sure I could create. My guess is that the starturn 4 uses a single byte for each G & M code, and all floating point numbers are stored in a 4 byte string (thats the way single precision numbers are stored in a computer anyway). But I could sure use some help with the exact format. I have 8 lathes and more dongles that that so I'm not trying to get around the security (though I doubt that Denford is too concerned at this time about Starturn 4 security), I just want to my student to use a modern ASCII editor to input their programs as they would in todays industry.

Thanks again Triac whizz

Karl

User avatar
davidimurray
CNC Expert
CNC Expert
Posts: 194
Joined: Thu 24 Aug , 2006 9:45 am

Post by davidimurray » Thu 28 Sep , 2006 21:47 pm

Hi Guys

I think the way the starturn 4s and 8s work is completly different to the way other machines work. The way I understand it is that the code is not actually downloaded to the machine, but dripfed line by line. Unfortunately that means that without the denford software, or developing your own, the only other option is a new controller - this might not be too difficult or expensive if you are prepared to do a bit of rewiring and hacking around inside the machine.

I can probably tell you more as I'm picking up my own Starturn 4 at the weekend :D - complete with BBC to drive it - hows that for retro! It will eventually be fitted up for PC control, along with new bigger stepper drivers as my current belief is that due to cost constraints when the machines were built, the drivers are actually underated for the motors.

Cheers

Dave

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Post by Karl » Fri 29 Sep , 2006 1:21 am

Dave
I'll be interested in how you do with the "new" starturn 4. I have a home built conversion of a Harbor Freight $320 mill to nc control using Mach3 software. I agree it would be better to strip the Starturn software and replace it with mach3. However I'm not sure the administration would approve the funding right now. Actually I like the power of the starturns for students as it doesn't do much damage when they crash them. And I don't mind the Starturn software if I could talk to it using a current technology ASCII text editor.
Karl

User avatar
davidimurray
CNC Expert
CNC Expert
Posts: 194
Joined: Thu 24 Aug , 2006 9:45 am

Post by davidimurray » Fri 29 Sep , 2006 8:21 am

Hi Karl

Interestingly I have the same type of mill at home that I also converted - just picked up some ballscrews for it :) As well as that we also have a Triac and Orac at work which I got going again, and a mate of mine is currently converting his Orac to PC control! I'm surrounded by Denfords!

Have you looked here :-

viewtopic.php?t=396

There is lots of information in these electrical diagrams and there is also a section at the rear regarding the communication protocol and formatting.

I think that it may be possible to simply convert the machine by unhooking the step/dir cables from the mainboord(called a slaveboard for some reason), and linking them through a breakout board. Yet to confirm whether step/dir is 5V or 12V. The most difficult part would probably be integrating the spindle speed - need to use something like a digispeed.

As an alternative - as the manual gives the comms protocol, could you write a plugin for Mach 3 to take advantage of this. Since Art has opened up the internals, this sort of application would be perfect -Mach3 control but using the original controller - I suppose its operation would be similar to a G-rex in some ways.

Cheers

Dave

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Post by Karl » Sat 30 Sep , 2006 18:02 pm

Thanks Dave but those schematics still didn't contain any data I need at this time. The progress I've made so far: The .sta files appear to contain 4 bytes of unknown data then groups of 78 bytes, one group for each Starturn line. The X dimension appears to be 6 bytes starting at the 38 byte into the string. and Z,F,&R values appear in 6 byte increments. Byte 75 seems to contain the line counter. That's where I am right now. The 6 bytes/ value is a mystery. I've tried to convert the 6 bytes to a floating point value, but so far I've found no coralation.

Mybrother-in-law is helping and he found just setting the printer to "file" and selecting "print program listing", gives me an ascii file which can be read into my ASCII editor and that works. So I have one direction of the transfer. I just need to figure out a way to create a file in say, notepad, and get that data into the Starturn.

Thanks again for any help anyone can offer.

Karl

User avatar
Denford Admin
Site Admin
Posts: 3642
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Post by Denford Admin » Mon 02 Oct , 2006 8:55 am

Just wondered if the 6 byte numbers contain step counts rather than real / floating point numbers ?
My guess is that the old electronics would rather be working with integers, ie number of steps to move, rather than floating point values.

What byte values do you get say if you program X50 Z100 ?
You should be able to see a pattern - if the steps per mm of the machine is 400, you would get something like X20000 ($4E20) Z40000 ($9C40)

weegee
Posts: 11
Joined: Sat 23 Sep , 2006 3:50 am

Post by weegee » Mon 02 Oct , 2006 15:13 pm

There is also the sample program thats included with the starturn software on the denford site, that stuff can be compared on (and it runs under XP, just click ignore if it moans about a com port)

Funny system though, seems to include the same comment at least 3 times in the STA file? :S

User avatar
Denford Admin
Site Admin
Posts: 3642
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Post by Denford Admin » Mon 02 Oct , 2006 21:22 pm

seems to include the same comment at least 3 times in the STA file
I noticed that in Karls examples - I reckon its because the line character buffer is not being cleared fully on subsequent lines - there must be a character to tell the control not to read any further, or it just ignores comments anyway and no-one ever noticed the bug.

I wouldn't worry about trying to reproduce this "feature" :idea: if your writing a starturn file convertor

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

Post by Karl » Mon 02 Oct , 2006 23:41 pm

Wow, that is a wonderful idea. It never occured to me that the data could be step counts. I'll take a look tonight if I get a chance.

I did discover something interesting this past weekend, though. If you use the "install" software to select your printer as "a file" then print the "program listing" it stores the data in an ASCII file. I altered my program to strip off the extrainious data ("Imperial units" and etc) and I get a ASCII data file that I can plot and look at and edit. I just can't sent it back to the starturn. However, if you open up Starturn in a window, and my text editor in another window, you can find the error in my program, edit it in the starturn software, do another "print program listing", reload it into my program and see if you corrected the problem.

Thanks again, I am anxious to see if it could be step counts.

Thanks
Karl

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

.sta files

Post by Karl » Tue 03 Oct , 2006 18:46 pm

Hi again
It does not appear to be storing step count. X0.0 produces 0 0 0 0 0 while X.005 produces 76 8D 97 6E 12 03 hex so I don't think it is step count. Another possibility I considered is since there are 6 digits of data and 6 bytes binary location used they might directly coorespond. But X111.1111 produces 87 65 19 E2 38 5E hex.

So I've attached 4 files all of the same .sta file. There is first the .sta, then the d3.txt which is produced by printing out the "program listing". Then there are decimal and hex dumps of the contents X, Z, F, & R registers (each 7 bytes long) with byte 7 being a "1" if the data is valid and a "0" it it is to be ignored. All the files are ASCII except the .sta. I had to change all the file to have an >txt extension to get this forum to upload them.

Does any of this data ring a bell with any one?

Karl
Attachments
D3dec.txt
(1.81 KiB) Downloaded 1092 times
D3Hex.txt
(1.88 KiB) Downloaded 1139 times
D3.txt
(1012 Bytes) Downloaded 1084 times
D3.STS.txt
(87 Bytes) Downloaded 1253 times

Karl
Posts: 17
Joined: Mon 25 Sep , 2006 17:22 pm

.sta ascii editor

Post by Karl » Mon 09 Oct , 2006 20:57 pm

Hi
Just a note to tell all those who tried to help, I now have a working ASCII editor that will read and write Starturn 4 encripted ".sta" files. A friend figured out the encription. It amounted to developing a "changing a 5 byte string to a floating point number" routine.

Thanks again to all that offered assistance

Karl

Post Reply