CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 44
Текст из файла (страница 44)
Specify the name in four characters. In “Word address,” specify theaddress of the word that is to be forced set or reset.NameOP1OP2CIOLRHAWord address setting rangeClassificationOP3OP4(Space) (Space) LRCPM2A/CPM2CPCs0000 to 00490200 to 02520000 to 0015CPM1/CPM1A/SRM1(-V2) PCs0000 to 00190200 to 02520000 to 0015R(Space) (Space) HR0000 to 00190000 to 0019R(Space) (Space) AR0000 to 00230000 to 0015TIM(Space) Completion Flag (timer)0000 to 02550000 to 0127TIMHCompletion Flag (high-speed timer)0000 to 02550000 to 0127TIMLCompletion Flag (long timer)TCCMNNHTT0000 to 0255HCompletion Flag (very high-speed timer) 0000 to 0255(Space) Completion Flag (counter)RCompletion Flag (reversible counter)0000 to 01270000 to 0127(Space) IR or SRForced set/Reset/Cancel data (Command)If a timer or counter completion flag is specified, only bit 15 is effective and allother bits will be ignored.
Only force-setting and force-resetting are possible fortimers/counters.If a word address is specified, the content of the word specifies the desired process for each bit in the specified word, as shown in the following table.Hexadecimal settingProcess0000No action (bit status not changed)0002Reset0003Set0004Forced-reset0005Forced-set0008Forced set/reset status cancelThe bits that are merely set or reset may change status the next time the program is executed, but bits that are force-set or force-reset will maintain theforced status until it is cleared.Response FormatAn end code of 00 indicates normal completion.@x 101 x 100Node no.FKHeadercodex 161 x 160End codeFCS↵Terminator4-5-25 FORCED SET/RESET CANCEL – KCCancels all forced set and forced reset bits (including those set by FORCEDSET, FORCED RESET, and MULTIPLE FORCED SET/RESET).
If multiple bitsare set, the forced status will be cancelled for all of them. It is not possible to cancel bits one by one using KC.Command Format@x 101 x 100Node no.272KCHeadercodeFCS↵TerminatorSectionHost Link CommandsResponse Format4-5An end code of 00 indicates normal completion.@x 101 x 100Node no.KCHeadercodeEnd code↵x 161 x 160FCSTerminator4-5-26 PC MODEL READ – MMReads the model type of the PC.Command Formatx 101 x 100@Node no.Response FormatMHeadercodeFCS↵TerminatorAn end code of 00 indicates normal completion.@x 101 x 100Node no.ParametersMMMHeadercodex 161 x 160 x 161 x 160End codeModelcodeFCS↵TerminatorModel Code“Model code” indicates the PC model in two digits hexadecimal.Model codeModel01C25002C50003C1200EC200010C1000H11C2000H/CQM1/CPM2A/CPM2C/CPM1/CPM1A/SRM1(-V2)12C20H/C28H/C40H/C200H/C200HS20CV50021CV100022CV200040CVM1-CPU01-E41CVM1-CPU11-E42CVM1-CPU21-E4-5-27 TEST – TSReturns, unaltered, one block of data transmitted from the host computer.Command Format@x 101 x 100Node no.TSHeadercode122 characters max.CharactersFCS↵Terminator273SectionHost Link CommandsResponse FormatAn end code of 00 indicates normal completion.@x 101 x 100Node no.Parameters4-5T122 characters max.SHeadercodeFCSCharacters↵TerminatorCharacters (Command, Response)For the command, this setting specifies any characters other than the carriagereturn (CHR$(13)).
For the response, the same characters as specified by thecommand will be returned unaltered if the test is successful.4-5-28 PROGRAM READ – RPReads the contents of the PC user’s program area in machine language (objectcode). The contents are read as a block, from the beginning to the end.Command Format@x 101 x 100Node no.Response FormatPHeadercodeFCS↵TerminatorAn end code of 00 indicates normal completion.@x 101 x 100Node no.ParametersRRPHeadercodex 161 x 160 x 161 x 160End code1 byteFCS↵TerminatorProgram (for entire UM area)Program (Response)The program is read from the entire program area.Note To stop this operation in progress, execute the ABORT (XZ) command.4-5-29 PROGRAM WRITE – WPWrites to the PC user’s program area the machine language (object code) program transmitted from the host computer.
The contents are written as a block,from the beginning.Command Format@x 101 x 100Node no.Response FormatWHeadercodex 101 x 100Node no.274x 161 x 1601 byteFCSWPHeadercodex 161 x 160End codeProgram (Command)Program data up to the maximum memory size.FCS↵TerminatorProgram (Up to maximum memory size)An end code of 00 indicates normal completion.@ParametersP↵TerminatorSectionHost Link Commands4-54-5-30 COMPOUND COMMAND – QQRegisters at the PC all of the bits, words, and timers/counters that are to be read,and reads the status of all of them as a batch.Registering Read InformationRegister the information on all of the bits, words, and timers/counters that are tobe read.Command Format@x 101 x 100Node no.QQHeadercodeRMOP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100 OP1 OP2Sub-headercodeRead areaRead word addressDataformat,Data breakSingle read informationTotal read information (128 max.),Data breakRead areaRead word addressDataformat↵OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100 OP1 OP2FCSTerminatorSingle read informationTotal read information (128 max.)Response FormatAn end code of 00 indicates normal completion.@x 101 x 100Node no.ParametersQQHeadercodeMRx 161 x 160Sub-header End codecodeFCS↵TerminatorRead Area (Command)Specify in four-character code the area that is to be read.
The codes that can bespecified are listed in the following table.275SectionHost Link Commands4-5Read Word address, Data Format (Command)Depending on the area and type of data that are to be read, the information to beread is as shown in the following table. The “read data” is specified in four digitsBCD, and the data format is specified in two digits BCD.AreaclassificationIR or SRLRHRARTimerHigh-speed timerLong timerVery high-speed timerCounterReversible counterDMRead dataRead wordRead areaCPM2A/CPM2C PCsBitWordBitWordBitWordBitBitCompletion FlagPVCompletion FlagPVCompletion FlagPVCompletion FlagPVCompletion FlagPVCompletion FlagPVWordC I O (S)0000 to 00490200 to 0255L R (S) (S)0000 to 0015H R (S) (S)0000 to 0019A R (S) (S)0000 to 0023T I M (S)0000 to 0255TIMH0000 to 0255TIML0000 to 0255TMHH0000 to 0255C N T (S)0000 to 0255CNTR0000 to 0255D M (S) (S)0000 to 20476144 to 6655Data formatCPM1/CPM1A/SRM1(-V2)PCs0000 to 00190200 to 025500 to 15 (decimal)“CH”0000 to 0015 00 to 15 (decimal)“CH”0000 to 0019 00 to 15 (decimal)“CH”0000 to 0015 00 to 15 (decimal)“CH”0000 to 0127 2 characters other than “CH”“CH”0000 to 0127 2 characters other than “CH”“CH”Not used.2 characters other than “CH”“CH”Not used.2 characters other than “CH”“CH”0000 to 0127 2 characters other than “CH”“CH”0000 to 0127 2 characters other than “CH”“CH”0000 to 1023* Any 2 characters6144 to 6655Note *For SRM1(-V2) PCs, the DM range is from 0000 to 2047.(S): SpaceData Break (Command)The read information is specified one item at a time separated by a break code(,).
The maximum number of items that can be specified is 128. (When the PV ofa timer/counter is specified, however, the status of the Completion Flag is alsoreturned, and must therefore be counted as two items.)Batch ReadingThe bit, word, and timer/counter status is read as a batch according to the readinformation that was registered with QQ.Command Format@x 101 x 100Node no.276QQHeadercodeIRSub-headercodeFCS↵TerminatorSectionHost Link CommandsResponse Format@x 101 x 100Node no.4-5An end code of 00 indicates normal completion.QQHeadercodeIRx 161 x 160 ON/ x 103 x 102 x 101 x 100OFFSub-header End codecode,ON/OFF,Data breakTimer/counterIf PV is specified the statusof the Completion Flag isalso returned.,x 163 x 162 x 161 x 160Word dataIR, SR, LR, HR,AR, DMBit dataON/OFFParameters,FCS↵TerminatorRead Data (Response)Read data is returned according to the data format and the order in which readinformation was registered using QQ.
If “Completion Flag” has been specified,then bit data (ON or OFF) is returned. If “Word” has been specified, then worddata is returned. If “PV” has been specified for timers/counters, however, thenthe PV is returned following the Completion Flag.Data Break (Response)The break code (, ) is returned between sections that are read.4-5-31 ABORT – XZAborts the Host Link operation that is currently being processed, and then enables reception of the next command.
The ABORT command does not receive aresponse.Command Format@x 101 x 100Node no.XZHeadercodeFCS↵Terminator4-5-32 INITIALIZE – Initializes the transmission control procedure of all the PCs connected to thehost computer. The INITIALIZE command does not use node numbers or FCS,and does not receive a response.Command Format@↵4-5-33 TXD RESPONSE – EXThis command is supported by CPM2A/CPM2C PCs only.This is the response format used when the PC’s TXD(48) instruction is executedin Host Link communications mode. There is no command associated with EX.TXD(48) converts the specified data into ASCII and transmits it to the host computer with this format. The response can contain up to 122 characters of ASCIIdata.