// BNC6 is PathA laser on and BNC7 is PathB laser on // variables that should not need to be edited by user // would like to define these variables as final, but this is // not amenable to script which can run multiple times String plcName = "PLogic:E:36"; String propPosition = "PointerPosition"; String propCellType = "EditCellCellType"; String propCellConfig = "EditCellConfig"; String propCellInput1 = "EditCellInput1"; String propCellInput2 = "EditCellInput2"; String propSaveSettings = "SaveCardSettings"; String valAND2 = "5 - 2-input AND"; String valSaveSettings = "Z - save settings to card (partial)"; int addrOutputBNC6 = 38; int addrOutputBNC7 = 39; int addrLaserEnableCell = 10; int addrLaserSide = 44; // TTL3 on Tiger backplane int addrPathACell = 14; int addrPathBCell = 15; int addrInvert = 64; // create cells re-using existing "laser enable" cell 10 that already accounts for software shutter and the main "laser on" signal mmc.setProperty(plcName, propPosition, addrPathACell); mmc.setProperty(plcName, propCellType, valAND2); mmc.setProperty(plcName, propCellInput1, addrLaserEnableCell); mmc.setProperty(plcName, propCellInput2, addrLaserSide + addrInvert); mmc.setProperty(plcName, propPosition, addrPathBCell); mmc.setProperty(plcName, propCellType, valAND2); mmc.setProperty(plcName, propCellInput1, addrLaserEnableCell); mmc.setProperty(plcName, propCellInput2, addrLaserSide); // connect cells to BNC output mmc.setProperty(plcName, propPosition, addrOutputBNC6); mmc.setProperty(plcName, propCellConfig, addrPathACell); mmc.setProperty(plcName, propPosition, addrOutputBNC7); mmc.setProperty(plcName, propCellConfig, addrPathBCell); // save settings mmc.setProperty(plcName, propSaveSettings, valSaveSettings);