- Posts: 101
- Thank you received: 0
Having issues with oword test scripts in version 2.9.4
- scsmith1451
- Topic Author
- Offline
- Premium Member
-
Less
More
1 year 1 month ago #334562
by scsmith1451
All;
I'm running LCNC 2.9.4 upgraded from a 2.9.3 disc image install.
I have this simple test script:
o<mytest2> sub
#<factor> = 1
o100 if [#<_metric>]
#<factor> = 25.4
o100 endif
#<value> = 30 * #<factor>
(LOGOPEN,mytest.txt)
(LOG, factor: #<factor>)
(LOG, value: #<value>)
(LOGCLOSE)
o<mytest2> endsub
in my nc_files directory. If I comment out the two lines with "value" in then the script runs fine in both sim.axis and sim.axis_mm profiles. When I uncomment the lines I get this output:
emc/task/emctask.cc 68: interp_error: Bad character '*' used
Bad character '*' used
According to the documentation "*" is the multiplication operator. Anyone else experiencing this issue? Is there a resolution?
The second issue is closely related.
I also have this test script:
o<mytest2> sub
#<factor> = 1
o100 if [#<_metric>]
#<factor> = 25.4
o100 endif
(LOGOPEN,mytest.txt)
(LOG, laser-offset-x: #<_ini[LASER]laser-offset-x>)
(LOG, laser-offset-y: #<_ini[LASER]laser-offset-y>)
(LOG, park-offset: #<_ini[PARK]park-offset>)
(LOG, z-offset: #<_ini[PROBE]z-offset>)
(LOGCLOSE)
o<mytest2> endsub
where I try to read ini parameters defined in the axis.ini and axis_mm.ini files as follows:
[LASER]
laser-offset-x = -3.1702
laser-offset-y = 0.0568
[PARK]
park-offset = 0.125
[PROBE]
z-offset = 0.543
When the script is executed the output looks like this:
LOGOPEN(mytest.txt) -> 0x55cc4c8cee20
LOG( laser-offset-x: ######)
LOG( laser-offset-y: ######)
LOG( park-offset: ######)
LOG( z-offset: ######)
LOGCLOSE()
Again, is anyone else experiencing this issue in 2.9.4? Is there a resolution?
Kind regards
I'm running LCNC 2.9.4 upgraded from a 2.9.3 disc image install.
I have this simple test script:
o<mytest2> sub
#<factor> = 1
o100 if [#<_metric>]
#<factor> = 25.4
o100 endif
#<value> = 30 * #<factor>
(LOGOPEN,mytest.txt)
(LOG, factor: #<factor>)
(LOG, value: #<value>)
(LOGCLOSE)
o<mytest2> endsub
in my nc_files directory. If I comment out the two lines with "value" in then the script runs fine in both sim.axis and sim.axis_mm profiles. When I uncomment the lines I get this output:
emc/task/emctask.cc 68: interp_error: Bad character '*' used
Bad character '*' used
According to the documentation "*" is the multiplication operator. Anyone else experiencing this issue? Is there a resolution?
The second issue is closely related.
I also have this test script:
o<mytest2> sub
#<factor> = 1
o100 if [#<_metric>]
#<factor> = 25.4
o100 endif
(LOGOPEN,mytest.txt)
(LOG, laser-offset-x: #<_ini[LASER]laser-offset-x>)
(LOG, laser-offset-y: #<_ini[LASER]laser-offset-y>)
(LOG, park-offset: #<_ini[PARK]park-offset>)
(LOG, z-offset: #<_ini[PROBE]z-offset>)
(LOGCLOSE)
o<mytest2> endsub
where I try to read ini parameters defined in the axis.ini and axis_mm.ini files as follows:
[LASER]
laser-offset-x = -3.1702
laser-offset-y = 0.0568
[PARK]
park-offset = 0.125
[PROBE]
z-offset = 0.543
When the script is executed the output looks like this:
LOGOPEN(mytest.txt) -> 0x55cc4c8cee20
LOG( laser-offset-x: ######)
LOG( laser-offset-y: ######)
LOG( park-offset: ######)
LOG( z-offset: ######)
LOGCLOSE()
Again, is anyone else experiencing this issue in 2.9.4? Is there a resolution?
Kind regards
Please Log in to join the conversation.
1 year 1 month ago #334564
by Hakan
Replied by Hakan on topic Having issues with oword test scripts in version 2.9.4
There is a difference versus the doc
linuxcnc.org/docs/html/gcode/o-code.html#ocode:subroutines
Use o100-style instead of o<mytest2>?
o100 sub
g-code
o100 endsub
Use o100-style instead of o<mytest2>?
o100 sub
g-code
o100 endsub
Please Log in to join the conversation.
1 year 1 month ago #334565
by MaHa
Replied by MaHa on topic Having issues with oword test scripts in version 2.9.4
I think there are square brackets required
#<value> = [30 * #<factor>]
setting to read values from ini file
[RS274NGC]
INI_VARS = 1
#<value> = [30 * #<factor>]
setting to read values from ini file
[RS274NGC]
INI_VARS = 1
Please Log in to join the conversation.
- scsmith1451
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 101
- Thank you received: 0
1 year 1 month ago #334683
by scsmith1451
Replied by scsmith1451 on topic Having issues with oword test scripts in version 2.9.4
Thanks MaHa,
The bracket syntax worked great, however, I'm still not able to access the INI vars after adding the INI_VARS = 1 to the ini file. Is there another setting that I'm missing?
The bracket syntax worked great, however, I'm still not able to access the INI vars after adding the INI_VARS = 1 to the ini file. Is there another setting that I'm missing?
Please Log in to join the conversation.
1 year 1 month ago #334838
by MaHa
Replied by MaHa on topic Having issues with oword test scripts in version 2.9.4
Just in case it's not solved yet:
Use capital letters for ini file entrys...
Use capital letters for ini file entrys...
Code:
[LASER]
LASER-OFFSET-X = -3.1702
LASER-OFFSET-Y = 0.0568
[PARK]
PARK-OFFSET = 0.125
[PROBE]
Z-OFFSET = 0.543
Please Log in to join the conversation.
Time to create page: 0.085 seconds
