26.12.2012 Views

ICAM Virtual Machine V19 - Kxcad.net

ICAM Virtual Machine V19 - Kxcad.net

ICAM Virtual Machine V19 - Kxcad.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ICAM</strong> <strong>Virtual</strong> <strong>Machine</strong> ® <strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />

Simulation Macro Functions, <strong>Virtual</strong> <strong>Machine</strong> Probe and Collision Test Functions<br />

The $FMSPRID Function<br />

result=$FMSPRID([id])<br />

Returns: Numeric<br />

This function sets the touch probe object to the specified component id, which can be any<br />

component in the world (excluding in-process stock) that has a physical representation. This<br />

function returns the previously active probe object id. Specify an object id of -1 to deactivate the<br />

current probe object without specifying another.<br />

The $FMSPRID function can be called without an argument to obtain the current probe component<br />

id.<br />

The $FMSPROB Function<br />

result=$FMSPROB([status])<br />

Returns: Numeric<br />

This function activates or deactivates probing, returning the previous probe activation status. The<br />

following values for status are permitted:<br />

0 Deactivate probing; contact with probe will cause a collision<br />

1 Activate probing; probe is armed<br />

2 Deactivate probing; ignore contact with probe<br />

The $FMSPROB function can be called without an argument to obtain the current probe component<br />

id.<br />

Once the probe is active, any motion that causes contact between the probe object (which must<br />

first be defined first using $FMSPRID) and another collision enabled object, will cause a probe<br />

event to be triggered. The model axes motion will be interrupted at the point of probe contact,<br />

and the probe status information will be returned in the $VMPRCOD system variable.<br />

The following example will close the chuck jaws so that they come into contact with the raw<br />

stock or part. This example assumes there is a chuck jaw identified as “JAW” and that it can be<br />

moved with an axis identified as “JAW-AXIS”. This code should be included in the model<br />

startup macro:<br />

JAW_ID=$FMSID('JAW')<br />

IF/JAW_ID.GT.0<br />

OK=$FMSPRID(JAW_ID) $$ set jaws as probe<br />

OK=$FMSPROB(1) $$ activate probing<br />

OK=$FMSMOVE($FMSID('JAW-AXIS'),0,1000) $$ close jaws<br />

CASE/$VMPRCOD<br />

WHEN/0<br />

ERROR/4,'No part in chuck'<br />

WHEN/1<br />

$$ get touched object and disable collision with jaw<br />

S=$FMSPDAT($VMXFER(6),$VMXFER(7))<br />

OK=$FMSVCL(JAW_ID,OFF,S(4))<br />

198 <strong>ICAM</strong> Technologies Corporation – Proprietary

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!