Another workaround for this problem:
The SimuNc.mac does not simulate NC programs, but the toolpaths contained within them, so the result of joining movements is not visible. The SimuNC-Hermle.mac is the same as the previous one, just a simple example of how to manipulate a machine model. The example limits the movement of the 'A-axis' to a negative range. Before running this macros, you must turn on ViewMill and set the desired mode.
FUNCTION Main () {
// Simulate selected ncprograms
IF $widget('ViewmillBar.VMOnOff').Value == 'FALSE' {
MESSAGE INFO 'Please turn Viewmill on, and prepare'
RETURN
}
ENTITY LIST NcProgs=INPUT ENTITY MULTIPLE NCPROGRAM 'Please select Nc programs'
EDIT PAR 'SimulationState.Issues.Collisions.CheckCollisions' 1
EDIT PAR 'SimulationState.Issues.Collisions.Clearance' "10"
EDIT PAR 'SimulationState.Issues.Collisions.CheckToolAndHolder' 1
EDIT PAR 'SimulationState.Issues.Collisions.HolderClearance' "1"
EDIT PAR 'SimulationState.Issues.Collisions.ShankClearance' ".05"
EDIT PAR 'SimulationState.Issues.CheckReconfigurations' 1
EDIT PAR 'Powermill.Simulation.Issues.PlaybackSetting' 'never'
SIMULATE ISSUES CLEAR
STRING Messages=''
DEACTIVATE TOOL
FOREACH Nc IN $NcProgs {
FOREACH item in components($Nc) {
IF lcase($item.RootType) == 'nctoolpath' {
ENTITY TP=entity('toolpath',$item.Name)
IF (NOT $TP.Computed) OR (SEGMENTS($TP)==0) {
$Messages=$Messages+'Not computed/empty toolpath: '+$Nc.name+' '+$Tp.Name+crlf
} ELSE {
SIMULATE TOOLPATH $item.Name
SIMULATE PLAY
}
}
}
}
IF $Messages != '' {
MESSAGE INFO $Messages
}
FORM MACHINEISSUES
}