NT21_Reference Manual (V069-E1-1) (986756), страница 20
Текст из файла (страница 20)
Refer to Appendix DPC Memory Map on page 441.The relationships among the allocated words, the number of allocated words,and the contents of numeral memory table entry are indicated in the figure below.When the Number of Allocated Words Is 1 WordPCPTNumeral memory table entryOnly four digits read5 6 7 8 ← Allocated word162E1 2 3 4(Decimal number 5678)When the Number of Allocated Words Is Two WordsPCPTNumeral memory table entry00BC614EEight digits read(Decimal number 12345678)5 6 7 8 ← Allocated word1 2 3 4Storage Type and Stored DataA numeral memory table entry internally stores the specified number of words ofdata as signed binary data.
When the the contents of words allocated in the hostare stored in a memory table entry, the numeric value is interpreted according tothe Storage Type setting and is stored after conversion to signed binary data.Also, the signed binary data in numeral memory table entries is written to thewords allocated in the host according to the Storage Type setting.Accordingly, different Storage Type settings will cause the same data to be recognized by the PT as different values and written to the host as different values.Reference: Signed binary data expresses negative values as the complement of two (the bitsare inverted and 1 is added).74SectionMemory Tables2-3• Storage Type For The BCD FormatWhen using BCD format, the contents of the word(s) at the host are interpretedas BCD (binary coded decimal) data.
However, since it is not possible to input anegative sign in a host word, the letter F at the most significant digit is usedinstead to denote negative values (a negative sign can be used in the settingfor Value. so negative values can be input in the normal manner for this setting).If a value with a letter from A to E inclusive as its most significant digit, or avalue with a letter from A to F inclusive at any position other than the mostsignificant digit is stored in a host word, it is invalidated as illegal data and theexisting value is retained.If the contents of a numeral memory table entry exceeds the range that canbe handled by the allocated words in the host, the value is written to the hostas negative sign + less significant digits (see below).Contents of numeral memorytable entry (decimal notation)Data athostConditions12345→2345–12345→F345123456789→23456789–12345678→F23456781 allocated wordWhen using BCD format2 allocated wordsWhen using BCD format• Storage Type For Binary FormatWhen binary format is used, the initial value and contents of the host word(s)are interpreted as signed binary data and are stored without change in the numeral memory table entry.With binary format, the most significant bit is the sign bit (when this bit is 1 itindicates a negative value).
When there is one allocated word, the most significant bit is bit 15; when there are two allocated words it is bit 31.The initial value is always expressed as a 2-word signed binary value regardless of the Storage Type setting.However, when the initial value is input using the Support Tool, the basis forinput is always the decimal system. The – symbol can be input to indicate anegative value. If $ is input at the head of the input value, it will be input as ahexadecimal value (after confirmation of input, it is displayed in decimal).Data Flow and Stored DataThe table below indicates how the set Value (initial value) and the contents ofhost words are stored in numeral memory table entries.
(The examples showinitial values that are set with the Support Tool and written to the host when theResume function is not being used.)Support Tool valuesInput Value(beforeconfirmation)Input Value(afterconfirmation)--123,456,1123,456,Stored valueb fbeforeoperationStoragegTType20001 E240--BCD$1E240$–123,456,$FFFE 1DC0$Binaryy–123,456,FFFE 1DC0BCDBinaryyNumberoffWordsContents ofhhostwordsd---31212121234560012 3456E2400001 E240F456F012 34561DC0FFFE 1DC0Stored valueafterfstart offoperationStored Valuei dindecimali l40000 0D800001 E240FFFF E2400001 E240FFFF FE38FFFE 1DC00000 1DC0FFFE 1DC03,456123,456–7,616123,456–1,456–123,4567,616–123,45675SectionMemory TablesSupport Tool valuesInput ValueInput Value(before(afterconfirmation) confirmation)Stored valuebefore operation--61,441,20000 F001161,441,$F001$65535--BCDBinaryy65,535,0000 FFFF$FFFF$–1StorageTypeBCDBinaryy–1FFFF FFFF$FFFF FFFF$BCDBinaryyNumberofWordsContents ofhost words---3Stored valueafter start ofoperation2-3Stored Valuein decimal41212144161441F0010000 F0010000 05A10000 F001FFFF F0010000 F0011,44161,441–4,09561,441121255350006 5535FFFF0000 FFFF0000 159F0000 FFFFFFFF FFFF0000 FFFF5,53565,535–165,5351212F001F000 0001FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFF–1–1–1–1Numeral Table Memory Data before Start of Operation1, 2, 3...1.
Initial value inputs at the Support Tool are written into the numeral memorytable entries as 2-word signed binary data regardless of the Storage Type orNumber of Words settings. (Even when the value is written in hexadecimalwith the $ prefix, it will be displayed in decimal at the Support Tool after theinput is confirmed.)2. Before operation starts, the contents of the numeral memory table entriesare retained within the PT as 2-word signed binary data regardless of theStorage Type or Number of Words settings.Numeral Table Memory Data at the Start of Operation3. When operation is started, the contents of numeral memory table entries arewritten to words in the host first.
At this point, data is converted and written asdescribed below according to the Storage Type or Number of Words settings.StorageTypeNumberof wordsBCD1The 2-word signed binary data is converted to BCD andthe least significant 4 digits are written. If the value isnegative, F and the least significant 3 digits are written.BCD2The 2-word signed binary data is converted to BCD andthe 8 digits are written. If the value is negative, F andthe least significant 7 digits are written.Binary1The least significant 4 digits of the 2-word signed binarydata are written as is.Binary2The 2-word signed binary data is written as is.Conversion and storage4. After operation has started, the host words are read and the data is regularlymirrored in the numeral memory table entries.
The data is converted and76SectionMemory Tables2-3written as described below according to the Storage Type or Number ofWords settings.StorageTypeNumberof wordsConversion and storage1The contents of the host words are treated as 4-digitBCD, converted to 2-word signed binary data, andstored. (If the most significant digit is F.
the remainingdata is treated as negative 3-digit BCD.)Words that do not contain 4-digit BCD or F and 3 BCDdigits are invalid and the numeral memory table entrieswill be left unchanged.BCD2The contents of the host words are treated as 8-digitBCD, converted to 2-word signed binary data, andstored. (If the most significant digit is F. the remainingdata is treated as negative 7-digit BCD.)Two-word fields that do not contain 8-digit BCD or Fand 7 BCD digits, are invalid and the numeral memorytable entries will be left unchanged.Binary1The contents of the host words are treated as signedbinary data (a sign bit and 15 data bits), converted to2-word signed binary data, and stored.Binary2The contents of the host words are treated as signedbinary data (a sign bit and 31 data bits) and stored asis.BCDResume Function and Initial ValuesWhen the resume function is not used, the preset initial values are written in thenumeral memory table entries when the power to the PT is turned ON, the PT isreset, or the PT is switched to RUN mode from the System Menu.
(See Initializebelow.)Use the resume function to prevent initialization and retain the last values thatwere in place before operation stopped.Resume function settingNumeral memory table contentsYesThe previous numeral memory table values are used.NoThe numeral memory table’s initial values are used.The System Menu’s initialize operation can be used to write the initial values tothe memory table entries regardless of the resume function setting. When theresume function is used, the previous values will be used even if the initial valuesare changed, so changes to the initial values won’t be reflected in the table entries. Initialize the memory table values before starting operation to reflect changes in initial values.With the NT21, the resume function can be used only if the optional Battery isused.
Without the Battery, the resume function will not operate even if the function is set to Yes.InitializeThe initialize setting determines whether the contents of numeral memory tableentries are written to the allocated word(s) in the host when the power to the PTis turned ON, when the PT is reset, or the PT is switched to RUN mode from theSystem Menu.Here, initialize means the initialization of the contents of host word(s) as they areoverwritten by the contents of the numeral memory table. If a word is not allocated for the numeral memory table entry in the host, this setting has no effect.77SectionMemory Tables2-3Reference: When the PT starts operation, the contents of numeral memory table entries is asfollows depending on whether or not a word is allocated for the numeral memorytable entry in the host, on the Initial setting for the numeral memory table entry,and on whether or not the resume function is used:Word alallocatedin host?Resume functionInitial setsettingUsed (Battery must bepresent.)Existing numeral memorytable value retained (athost word(s) also)CheckedYesNot checked(Ineffective)Initial value of numeralmemory table entry used(at host word(s) also)When the numeral memory table is initialized by SystemMenu operation: initial value of the numeral memorytable entry (at host word(s) also)Contents of host word(s)Existing numeral memorytable valueNoNot usedInitial value of numeralmemory table entryWhen the numeral memory table is initialized by SystemMenu operation: initial value of the numeral memorytable entryDisplay FunctionsNumeral memory table entries themselves have no display function.To display the contents of numeral memory table entries, use 2-8 Numeral Display (page 140) or 2-10 Graphs (page 154).