CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 41
Текст из файла (страница 41)
Words 0050 to 0199 cannot be specified in CPM2A/CPM2C PCs and words0020 to 0199 cannot be specified in CPM1/CPM1A/SRM1(-V2) PCs. If anattempt to read any of these words is made, a response of 0000 will be returned.2. The response will be divided when reading more than 30 words of data.Read Data (Response)The contents of the number of words specified by the command are returned inhexadecimal as a response. The words are returned in order, starting with thespecified beginning word.4-5-2 LR AREA READ – RLReads the contents of the specified number of LR words, starting from the specified word.Command Format@x 101 x 100Node no.RHeadercodeNoteResponse Format@x 101 x 100Node no.Lx 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100Beginning word1No.
of words2FCS↵Terminator1. Beginning word: 0000 to 00152. No. of words: 0001 to 0016An end code of 00 indicates normal completion.RLHeadercodex 161 x 160 x 163 x 162 x 161 x 160End codeRead data (1 word)FCS↵TerminatorRead data (for number of words read)ParametersRead Data (Response)The contents of the number of words specified by the command are returned inhexadecimal as a response. The words are returned in order, starting with thespecified beginning word.4-5-3 HR AREA READ – RHReads the contents of the specified number of HR words, starting from the specified word.Command Format@x 101 x 100Node no.RHeadercodeNoteResponse Format@x 101 x 100Node no.Hx 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100Beginning word1No. of words2FCS↵Terminator1.
Beginning word: 0000 to 00192. No. of words: 0001 to 0020An end code of 00 indicates normal completion.RHHeadercodex 161 x 160 x 163 x 162 x 161 x 160End codeRead data (1 word)FCS↵TerminatorRead data (for number of words read)255SectionHost Link CommandsParameters4-5Read Data (Response)The contents of the number of words specified by the command are returned inhexadecimal as a response. The words are returned in order, starting with thespecified beginning word.4-5-4 PV READ – RCReads the contents of the specified number of timer/counter PVs (present values), starting from the specified timer/counter.Command Format@x 101 x 100Node no.Cx 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100HeadercodeBeginning timer/counter1 No.
of timers/counters2RNoteResponse Format@FCS↵Terminator1. Beginning T/C: 0000 to 0255 in CPM2A/CPM2C PCs, 0000 to 0127 inCPM1/CPM1A/SRM1(-V2) PCs2. No. of T/Cs:0001 to 0256 in CPM2A/CPM2C PCs, 0001 to 0128 inCPM1/CPM1A/SRM1(-V2) PCsAn end code of 00 indicates normal completion.x 101 x 100RNode no.Cx 161 x 160 x 103 x 102 x 101 x 100HeadercodeEnd codeRead data (1 word)Read data (for number of words read)FCS↵TerminatorThe response will be divided when reading more than 30 words of data.ParametersRead Data (Response)The number of present values specified by the command is returned in hexadecimal as a response.
The PVs are returned in order, starting with the specifiedbeginning timer/counter.4-5-5 TC STATUS READ – RGReads the status of the Completion Flags of the specified number of timers/counters, starting from the specified timer/counter.Command Format@x 101 x 100Gx 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100HeadercodeBeginning timer/counter1 No. of timers/counters2RNode no.NoteResponse FormatFCSTerminator1. Beginning T/C: 0000 to 0255 in CPM2A/CPM2C PCs, 0000 to 0127 inCPM1/CPM1A/SRM1(-V2) PCs2. No.
of T/Cs:0001 to 0256 in CPM2A/CPM2C PCs, 0001 to 0128 inCPM1/CPM1A/SRM1(-V2) PCsAn end code of 00 indicates normal completion.@x 101 x 100Node no.RGHeadercodex 161 x 160 ON/OFFEnd codeFCSRead data(1 timer/counter)Read data(for number of TC read)256↵↵TerminatorSectionHost Link Commands4-5The response will be divided when reading the status of more than 123 timer/counters.ParametersRead Data (Response)The status of the number of Completion Flags specified by the command is returned as a response.
“1” indicates that the Completion Flag is ON.4-5-6 DM AREA READ – RDReads the contents of the specified number of DM words, starting from the specified word.Command Format@x 101 x 100Node no.RDHeadercodex 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100Beginning word*No. of words(0001 to 6656)FCS↵TerminatorNote Beginning word:DM 0000 to DM 1023 and DM 6144 to DM 6655 in CPM1/CPM1A PCsDM 0000 to DM 2047 and DM 6144 to DM 6655 in CPM2A/CPM2C/SRM1(-V2)PCs.
(A response of “0000” will be returned for non-existent DM words.)Response Format@x 101 x 100Node no.An end code of 00 indicates normal completion.RDHeadercodeNoteParametersx 161 x 160 x 163 x 162 x 161 x 160End codeRead data (1 word)FCS↵TerminatorRead data (for number of words read)1. Words DM 1024 to DM 6143 in CPM1/CPM1A PCs and words DM 2048 toDM 6143 in CPM2A/CPM2C/SRM1(-V2) PCs cannot be specified. If an attempt to read any of these words is made, a response of 0000 will be returned.2.
The response will be divided when reading more than 30 words of data.Read Data (Response)The contents of the number of words specified by the command are returned inhexadecimal as a response. The words are returned in order, starting with thespecified beginning word.Note Be careful about the configuration of the DM area, as it varies depending on theCPU Unit model.4-5-7 AR AREA READ – RJReads the contents of the specified number of AR words, starting from the specified word.Command Format@x 101 x 100Node no.RJHeadercodeNotex 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100Beginning word1No.
of words2FCS↵Terminator1. Beginning word: 0000 to 0023 in CPM2A/CPM2C PCs, 0000 to 0015 inCPM1/CPM1A/SRM1(-V2) PCs2. No. of words: 0001 to 0024 in CPM2A/CPM2C PCs, 0001 to 0016 inCPM1/CPM1A/SRM1(-V2) PCs257SectionHost Link CommandsResponse Format@4-5An end code of 00 indicates normal completion.x 101 x 100Node no.RJHeadercodeParametersx 161 x 160 x 163 x 162 x 161 x 160End codeRead data (1 word )FCS↵TerminatorRead data(for number of words read)Read Data (Response)The contents of the number of words specified by the command are returned inhexadecimal as a response. The words are returned in order, starting with thespecified beginning word.4-5-8 IR/SR AREA WRITE – WRWrites data to the IR and SR areas, starting from the specified word.
Writing isdone word by word.Command Format@x 101 x 100Node no.WRHeadercodeNotex 103 x 102 x 101 x 100 x 163 x 162 x 161 x 160Beginning word*Write data (1 word)↵TerminatorFCSWrite data(for number of words to write)1. Beginning word: 0000 to 0049 and 0200 to 0252 in CPM2A/CPM2C PCs,0000 to 0019 and 0200 to 0252 in CPM1/CPM1A/SRM1(-V2) PCs.2. Divide the command when writing more than 30 words of data.Response FormatAn end code of 00 indicates normal completion.@x 101 x 100Node no.Rx 161 x 160HeadercodeEnd codeWFCS↵TerminatorNote Words 0050 to 0199 cannot be specified in CPM2A/CPM2C PCs and words0020 to 0199 cannot be specified in CPM1/CPM1A/SRM1(-V2) PCs.
If an attempt is made to write to any of these words, the writing operation will not beexecuted and normal completion occurs.ParametersWrite Data (Command)Specify in order the contents of the number of words to be written to the IR or SRarea in hexadecimal, starting with the specified beginning word.Note If data is specified for writing which exceeds the allowable range, an error will begenerated and the writing operation will not be executed. If, for example, 252 isspecified as the beginning word for writing,and two words of data are specified,then 253 will become the last word for writing data, and the command will not beexecuted because SR 253 is beyond the writable range.258SectionHost Link Commands4-54-5-9 LR AREA WRITE – WLWrites data to the LR area, starting from the specified word.
Writing is done wordby word.Command Format@x 101 x 100Node no.WLHeadercodex 103 x 102 x 101 x 100 x 163 x 162 x 161 x 160Beginning word*Write data (1 word)FCS↵TerminatorWrite data(for number of words to write )Note Beginning word: 0000 to 0015Response FormatAn end code of 00 indicates normal completion.@x 101 x 100Node no.ParametersLx 161 x 160HeadercodeEnd codeWFCS↵TerminatorWrite Data (Command)Specify in order the contents of the number of words to be written to the LR areain hexadecimal, starting with the specified beginning word.Note If data is specified for writing which exceeds the allowable range, an error will begenerated and the writing operation will not be executed.
If, for example, 12 isspecified as the beginning word for writing and five words of data are specified,then 16 will become the last word for writing data, and the command will not beexecuted because LR 16 is beyond area boundary.4-5-10 HR AREA WRITE – WHWrites data to the HR area, starting from the specified word.