Script bash

More
25 Nov 2014 18:06 #53387 by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Yes I know about " Every G code file must end in a M2 or M30 or be wrapped with the percent sign %. "

But inside this file is not presentt %.
I will try again,
thanks

Please Log in or Create an account to join the conversation.

More
25 Nov 2014 18:58 #53389 by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Thanks ArcEye Statement" file ended with no percent sign" introduced me to the error sory.
Now it's working,but it's still problem witho<.....>call.
In TERMINAL I have " Reading
,,problem with text: tag "<" "w>call "

Have any idea?
Thanks. :)

Please Log in or Create an account to join the conversation.

More
25 Nov 2014 19:04 - 25 Nov 2014 19:05 #53390 by ArcEye
Replied by ArcEye on topic Script bash

Now it's working,but it's still problem witho<.....>call.


That is not any part of my code, I didn't wrapper code inside subs as Andy initially suggested, I just created new files and loaded them remotely.

You will have to post whatever you are using that produced the error

regards
Last edit: 25 Nov 2014 19:05 by ArcEye.

Please Log in or Create an account to join the conversation.

More
26 Nov 2014 02:21 #53415 by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
It is orginal file ,I just add subprogram like o<w>call [1] [2]...... :dry:
G40 G90
G54
G21 G17
G8

S600 M3

G00 Z5.000000

G00 X0 Y12.5

G01 Z-0.125000 F100
G01 X12.5 Y12.5 F400
G01 X12.5 Y0
G01 X0 Y0
G01 X0 Y12.5
G01 X12.5 Y0
G00 Z5

M5
G00 X0.0000 Y0.0000
M2
I remember that sometimes agon when I was trying GRECODE there was a problem with O<.....>call and % sign.

regards.

Please Log in or Create an account to join the conversation.

More
26 Nov 2014 15:11 #53430 by ArcEye
Replied by ArcEye on topic Script bash
I know what my code was but am none the wiser about yours.

How are you wrappering in o<> subs and how are you calling them?

You keep having errors relating to % signs, which presumably means you are not terminating your code properly.

With code you posted, the M2 must be outside the sub routine block, not in it, if you are creating a sub from it

regards

Please Log in or Create an account to join the conversation.

More
26 Nov 2014 18:23 - 26 Nov 2014 18:37 #53433 by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Hallo

Maybe this error it's becouse I have file w.ngc in wrong place, filter could not find it?
I wil try to put this sub in other places.
I atached my sub .
thanks

File Attachment:

File Name: w.txt
File Size:2 KB



File Attachment:

File Name: square2_20...1-26.txt
File Size:0 KB




thanks
Attachments:
Last edit: 26 Nov 2014 18:37 by grzesiekzxr.

Please Log in or Create an account to join the conversation.

More
26 Nov 2014 19:01 #53435 by ArcEye
Replied by ArcEye on topic Script bash
Hi

Don't quite know where to start

w.txt

Your o<w> SUB has 5 o<w> ENDSUB's in the same file

You also have 5 different nested conditional loops all numbered the same
within the file

O11111 IF [[#5] GE 0]
O21111 IF [[#5] LE 54]
.......
.......
O21111 ENDIF
O11111 ENDIF


All subs and blocks must be uniquely numbered or named and matched by just 1 corresponding endsub or end of block

www.linuxcnc.org/docs/devel/html/gcode/o-code.html

That is before any consideration of whether the file is in the right path or named correctly.

square2_2014-11-26.txt

The o<w>call passes 5 parameters

However the sub <w> takes 9 parameters

It will be assigning the value of unset parameters and using them in the code

If they contain 0, that might not be a problem but they could contain anything.
You need to set all of them even if just with zeros to ensure the sub functions as expected.

regards

Please Log in or Create an account to join the conversation.

More
27 Nov 2014 04:03 #53464 by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Thanks for response.
I am surprised as you becouse I 'm using this sub about a year normaly.
Last time I was doing some changes in my subprograms and I have a bit mess :)
But I tried today this sub and working properly.

No matter how much parameters put after O<w>call its working I'm a litle confused.
I know that you are right.
This is a badly written but this sub is working if I call it from normal file.

To have not any doubts I write simple :
o<example>sub
g4 p5
o<examle>endsub
Put it evrywhere where is flipfilter or my direcories from ini, but I have the same error.
In TERMINAL I have " Reading
,,problem with text: tag "<" "w>call "
Pleas tel me if when you put any o<...>call inside file sqare2.orig is it working without error for you ?
Thank you for your patience.
regards

Please Log in or Create an account to join the conversation.

More
27 Nov 2014 04:14 #53465 by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
...perhaps this sub schould have another extension,now I have example.ngc maybe it's wrong .
Tomorow I will try example.orig
regards.

Please Log in or Create an account to join the conversation.

More
27 Nov 2014 18:08 #53477 by ArcEye
Replied by ArcEye on topic Script bash

I am surprised as you becouse I 'm using this sub about a year normaly.


I suppose it must have terminated at the first ENDSUB hence no errors?

No matter how much parameters put after O<w>call its working I'm a litle confused.
I know that you are right.


It will work if a parameter being 0 does not do anything bad, I don't know what might happen in recursive calls

In TERMINAL I have " Reading
,,problem with text: tag "<" "w>call "


This is probably from grecode not Linuxcnc
I have no idea if it knows anything about subs, probably not.

The filter is just for flipping the axes in gcode to produce a mirror.
If your code requires calls to subs in it etc, you are probably going to have to script it, so you can stitch them in where required.

Try commenting out the o<w> call line and running it through grecode

If it does not error, you could comment out with ;;, run the call to grecode and then use sed to delete the comments afterwards.

regards

Please Log in or Create an account to join the conversation.

Time to create page: 0.103 seconds
Powered by Kunena Forum