sample1, uuprog 13014r2, UPA skrypty, UPA skrypty, DeviceScripts
[ Pobierz całość w formacie PDF ]
Program Prog1;var code: string;procedure ReadCode;beginif not ReadDevice then beginMsgBox( 'Read Error', 'Error', MB_OK );endelse beginCode := chr(GetByteHexEdit( $31 ))+chr(GetByteHexEdit($32))+chr(GetByteHexEdit( $33 ))+chr(GetByteHexEdit( $34 ));MsgBox( Code, 'Code', MB_OK or MB_ICONINFORMATION );code := 'ewqwe';end;end;procedure WriteCode;var n: integer;beginSetProgramModifiedOnly( true );if InBox( 'Enter', 'Code', code ) then beginif length( code ) < 4 then beginMsgBox( 'Enter 4 numbers', 'Error', MB_OK );exit;end;n := StrToInt( code );SetByteHexEdit( $31, ord(code[1]) );SetByteHexEdit( $32, ord(code[2]) );SetByteHexEdit( $33, ord(code[3]) );SetByteHexEdit( $34, ord(code[4]) );RefreshHexEdit;if MsgBox( 'Program?', 'Confirm', MB_YESNO ) = IDYES then beginProgramDevice;VerifyDevice;end;end;end;beginAddDeviceGroup( 'Samples', 'Select a Device' );AddDevice( 'Opel Immo', '68HC05B8 - 0F10V', 'Samples', 'MC68HC05B8');AddAction( 'Read Code', 'ReadCode', 'Opel Immo' );AddAction( 'Write Code', 'WriteCode', 'Opel Immo' );AddOpenFileAction( 'Board Top Side', 'Opel Immo', 'opel_imo2.jpg' );AddOpenFileAction( 'Board Bottom Side', 'Opel Immo', 'opel_imo3.jpg' );AddOpenFileAction( 'Connections', 'Opel Immo', 'mc68hc05b8_uusp.png' );AddOpenFileAction( 'Connections Specifics', 'Opel Immo', 'mc68hc05b8_uusp.txt' );AddOpenFileAction( 'Edit sample1.uds', 'Opel Immo', 'sample1.uds' );AddMsg('Sample Device Script (sample1.uds) Installed '#169' 2005 ELRASOFT');SetProductInfo( 'Sample1', 'Device Script Example'#$D'Copyright'#169' 2006 ELRASOFT Ltd.' );end. [ Pobierz całość w formacie PDF ] |