3.3.5.1 Advanced Dry Run Function


To make it more convenient for the users, (especially when the program is about to start using tool), the addition dry run function explaining, is as following:


PLC leads the speed of the system, after this function open and start. When user through the second panel open dry run function, and execution including MDI, PLC will completely control the G00, G01, G02, G03 speed, The PLC would usually use the feed rate override as signal, to find the PLC parameter speed as advance dry run speed, the function got the following point to consider:

1.

When advanced dry run function has been initiated the status of the window is FV: XXX will be replace by flash numbers, the number will be advance dry run speed, the unit is mm/min, also same the system use inch.

2.

Advance dry run speed cannot surpass 6000, the actual program while running, the speed is limit to each axis' speed and system maximum feed speed.

3.

When handwheel mode has been initiated, the feed dry run, will close automatically.


PLC management:

  • PLC use plc.vto4.bit.adryn to initiate/close Advance dry run mode and use plc.aDryRunSpeed to appoint feed dry run speed.
  • PLC can use sts.state2.bADryRun and sts.aDryRunSpeed to understand actual advance feed run module, whether it initiate or actually use the advance dry run speed.


Below is the advance dry run PLC example:

#include "..\plcm4\plc.h"


...


#define iFVOV0          (plc.gdi[0].bit.bit08)

#define iFVOV1          (plc.gdi[0].bit.bit09)

#define iFVOV2          (plc.gdi[0].bit.bit0a)

#define iFVOV3          (plc.gdi[0].bit.bit0b)


#define iTestADryRun    (plc.gdi[3].bit.bit0e)

#define oADryRunLamp    (plc.gdo[1].bit.bit00)


static unsigned short *plcData;

static long *plcLongData;


void plcOpen( Status &sts, PlcBlock &plc,

             unsigned short *PlcData, long *LongPlcData){

 // get plc data and long plc data pointer

 plcData = PlcData;

 plcLongData = LongPlcData;

 ...

}


void plcRun(Status &sts, PlcBlock &plc){

 ...

 plc.vto0.bit.fvov0 = !iFVOV0;

 plc.vto0.bit.fvov1 = !iFVOV1;

 plc.vto0.bit.fvov2 = !iFVOV2;

 plc.vto0.bit.fvov3 = !iFVOV3;


 if( plc.versionId >= 510 ){

   // use feed rate override rotary switch

   // as index to aDruRun speed

   int aDryRunIndex = 200 + (plc.vto0.iPort & 0xf);


   // use plcLongData[200] to [215] to store speed table

   // such as {0, 10, 20, 30, 40, 50, 75,

   //                 100, 200, 320, 500, 750, 1000,  

   //                 1500, 2000, 3000}

   plc.aDryRunSpeed = plcLongData[ aDryRunIndex ];


   // button for activating aDryRun

   plc.vto4.bit.adryn = iTestADryRun;


   // to indicate aDryRun state

   oADryRunLamp = sts.state2.bADryRun;

 }


 ...

}


void plcClose(Status &sts, PlcBlock &plc){

 ...

}