Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
198 Views, 2 Replies

Plasma Post Processor Trying to Force X and Y coordinates

Hey

 

I'm trying to get the Shopsabre Plasma post to output the X and Y coordinates on each line similar to this:

MFosterVFBXP_0-1608331674934.png

 

However when I try to force it at the top in the ,

var xOutput = createVariable({prefix:"X"}, xyzFormat);
var yOutput = createVariable({prefix:"Y"}, xyzFormat);
area I receive three separate coordinates for the G0 lines.
 
I'm assuming this is because these are global variables.  Is there a way to edit the G1, G2, and G3 modals to output both X and Y every time instead of this:
Screenshot 2020-12-18 165451.png
bob.schultz
in reply to: Anonymous

You can force X & Y on every block by modifying the xOutput and yOutput definitions at the top of the program to look like this.

// <<< ADD 'force:true'
var xOutput = createVariable({prefix:"X", force:true}, xyzFormat);
var yOutput = createVariable({prefix:"Y", force:true}, xyzFormat);

This may give you duplicate points in the output that you do not want.  You can disable duplicate points from being output by adding the following lines to the top of the onRapid and onLinear functions.

function onRapid(_x, _y, _z) { // MODIFY onLinear ALSO
  // don't output duplicate points
  var currentPosition = getCurrentPosition();
  if ((xyzFormat.getResultingValue(_x - currentPosition.x) == 0) && (xyzFormat.getResultingValue(_y - currentPosition.y) == 0)) { // ignore zero length lines
    return;
  }

 



Bob Schultz
Sr. Post Processor Developer

Anonymous
in reply to: bob.schultz

Worked!  Thanks for your help!