The only difference is the declaration of the block.
The most stranges thing is, Velocity seems to work, but PositionX and PositionY is not working. When I start with MoveProgram the program is starting, time is counting only the path lenght = 0 so it’s not moving. Path Velocity is the speed I configured on the variabele.
Without more information I’d suggest the following:
-make sure that the places that uses the action within your main program have the right action name, since the the left one is called “Action_CNCstruct” and the right one is called “Action_CNClocal”.
-Make sure that the action where the FB is declared and called is being called cyclically.
The very same FB MpCnc3Axis, has an output status called info where you can find the program are running the block etc, it may help to diagnose.
The 2 actions I made just to show the difference.
I wanted to go to a declaration of the FB within a struct, but then the position was not working anymore.
In the output i see that everything is running and acting “normal” only the position is acting strange. I see the current line of the program is "N50 G01 X=… ". Is there perhapse a way to monitor variables from the CNC file.
I take it that the gcode in your images in the first post, is the gcode that is running in the machine. if so, then the fact that the current bloc is N50 means that at least the FB seems to be running.
I suspect that maybe the feedrate had been set to 0 or maybe the override.
please check within the program info the programPhase to see if it is in RUN mode:
here is a screenshot of the value’s from the watchwindow. According the speed everything looks normal. The actual position is 0 and have to move to 100. But the CurrentLenght stays 0.
hello rene,
Judging from your image it seem that CurrentPathvVelocity is 0, which is odd, usually it happens when the override value is
0, please check the current value of the override of your CNC
I have taken the freedom to test on my side, to add the same FB in a structure, and in my case it works just fine, with a similar code.
the only way I managed to get the an value similar to yours was to set the feedrate override to 0 from start,
that did the trick!!!
RapidOverride and FeedrateOverride should get default initial values from 100. Without struct i see the value 100 in this vars. But in the structered FB call it will get value 0. I didn’t expected that!!!
Thanks for the help!!!
Next times will be more aware by initialising input parameters