Classicladder variable assignment error

08 Apr 2016 17:46 #72972 by Henk
Im trying to assign a float variable in a ladder program but i get a "bad var coding (err=0)" message when entering the assignment expression. Anyone come across this before. Dont seem to be much info on the forum. Maybe im doing something stupid.....any help would be apreceated. Thanks
08 Apr 2016 17:50 #72973 by BigJohnT
The docs would be the first place to start. Can't guess till you tell us what your doing exactly including the syntax your using.

09 Apr 2016 16:37 #73004 by Henk
Hi John
Thanks for the reply.
I'm replacing the old Dialog 11 controller on a 1988 Deckel FP4NC and using a 5i25+7i77+7i70 combination. Nearly all of the aux equipment is working now, including the spindle. I am using ladder to hijack the spindle velocity command and scaling it in ladder to account for the gear change (hi and lo) based on limit switch inputs into ladder to indicate what gear its in.

i found that i made a typo in the assignment which gave me a weird error. I don't know how i missed it ....pls accept my apologies.

09 Apr 2016 16:39 #73005 by BigJohnT
No problem, have you looked at the gear change component?

09 Apr 2016 17:27 #73007 by Henk
Yes, i have looked at it and it will do what i want but have not tried it out yet.
I will try it out and let you know...
The following user(s) said Thank You: sinusvag
19 Sep 2016 17:50 #80623 by sinusvag
Hello Henk!

Interesting to read about your conversion. I am a new owner of a FP2NC and I have been contemplating doing the same as you in the future.

Would you happen to have a build blog or the like? I am reading the orange book as evening literature, and it would really be inspiring to see someone actually pulling this off! You already know how many say this is a feat that cannot be pulled off (even though it has been made many times by pros in the business)

Cheers from Sweden, Hans
20 Sep 2016 05:33 #80655 by Henk
HI Hans

Unfortunately I do not have an electronic build blog but I have made notes and wiring diagrams by hand as far as I went. Retrofitting a Deckel FP series mill is really not that difficult as they say. It was my first experience with Linuxcnc and I managed to do it in about 3 months devoting only some evenings and some weekends to the job.

The machine is now fully operational and reliable. I had to replace the linear encoders with normal TTL encoders used with off the shelf DRO's and although the resolution is not as good as the original Heidenhein encoders the machine is still pretty accurate. In my opinion, if you want to machine to tolerances better than 5micron you need much more than a 1980's Deckel! There are ways to convert the sin/cos signals to 5V TTL but the above solution is much easier and cheaper.

I re-wired the machine from the ground-up. This is partly because I didn't have the original wiring diagrams but if I have to do it again, I would do the same.

The most frustrating part of the project was learning how HAL and its connections work, Ladder programming etc, but all that is documented and I advise reading the integrator's manual carefully.

20 Sep 2016 20:37 #80692 by sinusvag
Hello Henk!

Nice to hear! How did you handle the gear-changing? Did you write some sort of algorithm to yourself after watching the machine in action in order to do the ladder programming? Some claim this is the quirkiest part of the conversion.

Also, the scales: you chose not to use the Haidenhain-scales - was that because of the price for the EXE-boxes or because the scales were broken?

Cheers Hans
21 Sep 2016 07:36 #80711 by Henk
Hi Hans
My machine has two gear selections operated by a small Hydraulic Cylinder. I used Classicladder to do the switching from low to high ore back again. This sequence is initiated by either an M101 command or by the S-word in MDI. If the spindle speed requested is lower than 700RPM and the high gear is selected (indicated by a limit switch), the spindle will creep at a slow speed and the gear change rung is initiated. When the gearchange is confirmed by the other limit switch, the spindle speed command is set back to the requested speed and the spindle started.

The scaling of the spindle speed command is also done through ladder which is what the posts below was about.....I never tried the Gearchange component but it is definitely the more elegant way to do the scaling.

Yes, I replaced the scales because the EXE boxes are expensive. For a home/hobby machine shop it didn't make sense. IChaus in Germany sells an IC that can be used to make your own converter. I can send you the detail of this if youre interested.

I will post my ladder diagrams later so you can see what I did.

The following user(s) said Thank You: sinusvag
21 Sep 2016 17:08 #80724 by sinusvag
Thanks Henk!

Really appreciate you sharing! I know that there are many people that are interested in your solution!

(Would humbly recommend you make a separae thread!)

Cheers from Sweden :)

Time to create page: 0.171 seconds
Powered by Kunena Forum