public new async Task WritePortDispenserModeAsync(Port port, DispenserMode_SF dispenserMode, byte nbrProgram) { // SyncLock ServiceStackJBC01_Lock if (connectErrorStatus != EnumConnectError.NO_ERROR) { return; } try { await m_hostService.SetPortDispenserModeAsync(m_hostStnUUID, (dc_EnumConstJBCdc_Port)port, (dc_EnumConstJBCdc_DispenserMode_SF)dispenserMode, nbrProgram); Info_Port[port].ToolStatus.DispenserMode = dispenserMode; Info_Station.Settings.SelectedProgram = nbrProgram; } catch (FaultException <faultError> faultEx) { RaiseEventError(faultEx, System.Reflection.MethodBase.GetCurrentMethod().Name); } catch (Exception ex) { RaiseEventError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name); } // End SyncLock }
public void SetPortToolDispenserMode(Port port, DispenserMode_SF mode, byte nbrProgram) { //Check port if ((int)port >= NumPorts || (int)port < 0) { if (UserErrorEvent != null) { UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.PORT_NOT_IN_RANGE, "Port not in range.")); } //Check program } else if (nbrProgram > m_StationData.Settings.Programs.Length | nbrProgram <= 0) { if (UserErrorEvent != null) { UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.PROGRAM_OUT_OF_RANGE, "Program not in range.")); } } else { m_Frames_02.WriteDispenserMode(mode, nbrProgram); m_Frames_02.ReadDispenserMode(); } }
public uint WriteDispenserMode(DispenserMode_SF mode, byte nbrProgram) { //Datos byte[] Datos = new byte[2]; Datos[0] = (byte)mode; Datos[1] = nbrProgram; //Command byte Command = (byte)EnumCommandFrame_02_SF.M_W_DISPENSERMODE; return(SendMessage(Datos, Command)); }
public DispenserMode_SF GetPortToolDispenserMode(Port port) { DispenserMode_SF dispenserMode = DispenserMode_SF.CONTINUOUS; //Check port if ((int)port >= NumPorts || (int)port < 0) { if (UserErrorEvent != null) { UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.PORT_NOT_IN_RANGE, "Port not in range.")); } } else { dispenserMode = m_PortData[(int)port].ToolStatus.DispenserMode; } return(dispenserMode); }
public async Task SetPortDispenserModeAsync(Port port, DispenserMode_SF dispenserMode, byte nbrProgram) { await stack.WritePortDispenserModeAsync(port, dispenserMode, nbrProgram); }