force:true not working for XYZ and IJK output variables

force:true not working for XYZ and IJK output variables

MORIARTW01
Explorer Explorer
739 Views
6 Replies
Message 1 of 7

force:true not working for XYZ and IJK output variables

MORIARTW01
Explorer
Explorer

Hi, we have an old anilam crusader II we managed to get running on fusion recently with a customized post processor and all of the sudden it refuses to work properly. the cnc needs all coordinates output on each line when moving and we were using force:true to accomplish this but all of the sudden after running it through the post fusion gives the warning "Unsupported output variable specifier 'force'." and we arent sure how to fix it. the lines in question are as follows:

 

var xOutput = createOutputVariable({onchange:function() {state.retractedX = false;}, prefix:"X"}, xyzFormat);
var yOutput = createOutputVariable({onchange:function() {state.retractedY = false;}, prefix:"Y"}, xyzFormat);
var zOutput = createOutputVariable({onchange:function() {state.retractedZ = false;}, prefix:"Z"}, xyzFormat);
var xOutputcirc = createOutputVariable({onchange:function() {state.retractedX = false;}, prefix:"X", force:true}, xyzFormat);
var yOutputcirc = createOutputVariable({onchange:function() {state.retractedY = false;}, prefix:"Y", force:true}, xyzFormat);
var zOutputcirc = createOutputVariable({onchange:function() {state.retractedZ = false;}, prefix:"Z", force:true}, xyzFormat);
var aOutput = createOutputVariable({prefix:"A"}, abcFormat);
var bOutput = createOutputVariable({prefix:"B"}, abcFormat);
var cOutput = createOutputVariable({prefix:"C"}, abcFormat);
var feedOutput = createOutputVariable({prefix:"F"}, feedFormat);
var sOutput = createOutputVariable({prefix:"S", control:CONTROL_FORCE}, rpmFormat);

// circular output
var iOutput = createOutputVariable({prefix:"I", force:true, control:CONTROL_FORCE}, xyzFormat);
var jOutput = createOutputVariable({prefix:"J", force:true, control:CONTROL_FORCE}, xyzFormat);
var kOutput = createOutputVariable({prefix:"K", force:true, control:CONTROL_FORCE}, xyzFormat);

var gMotionModal = createOutputVariable({}, gFormat); // modal group 1 // G0-G3, ...
var gPlaneModal = createOutputVariable({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19
var gAbsIncModal = createOutputVariable({}, gFormat); // modal group 3 // G90-91
var gFeedModeModal = createOutputVariable({}, gFormat); // modal group 5 // G94-95
var gUnitModal = createOutputVariable({}, gFormat); // modal group 6 // G70-71
var gCycleModal = createOutputVariable({}, gFormat); // modal group 9 // G81, ...
var gRetractModal = createOutputVariable({}, gFormat); // modal group 10 // G98-99

 

 

Thanks in advance for any help

 

EDIT: here is a link to the full code on github

https://github.com/travisarty/Crusader-II-Post-Processor-for-fusion360/blob/main/crusader_mod1.cps

0 Likes
740 Views
6 Replies
Replies (6)
Message 2 of 7

AdamKunzo
Collaborator
Collaborator

You can use gMotionModal.reset(); right under the onLinear and onCircular.

AdamKunzo_0-1715640277609.png

 

---

If my post answer your question, please use Accept as Solution.

 

Message 3 of 7

MORIARTW01
Explorer
Explorer

tried it but its still not giving all the coordinates. I need them to be output every time even if the coordinates are the same or the machine will throw an improper circle error or something similar (error code 11)

0 Likes
Message 4 of 7

serge.quiblier
Autodesk
Autodesk

on iOuput, jOutput, kOutput, we can clearly see the control:CONTROL_FORCE.

 

On the xOutput, yOutput, zOutput, aOutput, bOutput, cOutput, we can NOT see that.

 

Can you please also show the definition for xyzFormat, and abcFormat, please?



Serge.Q
Technical Consultant
cam.autodesk.com
Message 5 of 7

MORIARTW01
Explorer
Explorer

var xyzFormat = createFormat({decimals:(unit == MM ? 3 : 4), type:FORMAT_INTEGER});
var abcFormat = createFormat({decimals:3, forceDecimal:true, scale:DEG});

 

 

 

seems to be getting closer I made those changes so far. Do I get rid of the force:true on the outputs?

0 Likes
Message 6 of 7

MORIARTW01
Explorer
Explorer

Also I posted a copy of the full code in case I cant respond right away. I have to manage our production floor at the same time. small company problems.

0 Likes
Message 7 of 7

AdamKunzo
Collaborator
Collaborator

Oh, I misunderstood your query. I met two CNC machines that required to force G1/G2/G3 in last week, so I thought this is your case too.

 

You used CONTROL_FORCE for IJK, do the same for XYZ that will format the number each time.

 

AdamKunzo_0-1715721785030.png

 

0 Likes