NT21_Reference Manual (V069-E1-1) (986756), страница 44
Текст из файла (страница 44)
If input of a value outside this range is attempted, the PT checks andprevents the input.StorageWordsTypeDisplayTypeDecimal1HexadecimalBCDDecimalSignPermissible Input RangeUnsigned0 to 9999Signed–999 to 9999–FC19 to FFFFH (negative numbers)0 to 270FH (positive numbers)Unsigned0 to 99999999Signed–9999999 to 99999999–FF676981 to FFFFFFFFH(negative numbers)0 to 5F5E0FFH (positive numbers)Unsigned0 to 32767*Signed–32768 to 32767–0 to FFFFHUnsigned0 to 2147483647*Signed–2147483648 to 2147483647–0 to FFFFFFFFH2HexadecimalDecimal1HexadecimalBinaryDecimal2Hexadecimal* Note that the values are different from those of the numeral display range. Innumeral display, since negative numbers are displayed as absolute values whendisplaying unsigned decimal values, 32768 and 2147483648, which cannot beinput, may be displayed.Relationship Between Input Numeric Values and Contents of Host WordsWhen inputting a numeric value to a numeral memory table entry for which aword is allocated in the host, the value is first converted to signed binary in accordance with the settings for Display Type and Display Sign settings and stored inthe numeral memory table, and then written to the host word in accordance withthe Words and Storage Type settings for the numeral memory table entry.205Section 2-12Inputting Numeric ValuesTherefore the result also differs according to the settings made for Words andStorage Type (BCD or Binary).Numeral memory table entries8-digit hexadecimal(Can’t be read externally.)BCDDecimalBinaryBCDHexadecimalSet the data format inwhich the values input atthe PT will be stored in thenumeral memory table entries.(Set in the ThumbwheelNumeral Input properties.)BinarySet the data format inwhich the numeral memorytable values will be storedin the PC.(Set with the numeralmemory table entries.)The following table provides some examples:Numeric valuestored in numeral memorytableWords000004D2H1 word12340000007BH1 word0123000004D2H2words00001234000004D2H1 word1234FFFFFF85H(FF85H)1 word–1234FFFFFB2EH2wordsF0001234000004D2000004D2H1 word1234FFFFFF85H(FF85H)1 wordF123FFFFFB2EH2wordsF000123400001234H1 word12340FFFEDCCH2words0FFFEDCC00001234H1 word1234FFFF8000H(8000H)*1 word8000–268430796F0001234H2words123400001234H1 word1234FFFFF123H(F123H)*1 wordF123F0001234H2wordsF0001234Input numeric valueDisplayTypeSign1234123Unsignedid12341234Decimal–123FF85gSignedHexadecimal–FFFFFB2E4660UnUnsigned2684307964660Decimal–32768F123F0001234SignedgHexadecimal–StorageTypeContentsof word athostF123BCDBinaryF0001234* The figures in parentheses are the values immediately after input.
When data isread from the host after input, it is converted to a 32-bit negative number and thevalue in the numeral memory table entry changes.206Section 2-12Inputting Numeric ValuesReference: When the Storage Type is BCD, the numeral memory table entry’s signed binarydata is converted to data for storage in the host word (BCD data) and written tothe host.
If the value is negative the most significant digit in the word is set as F.This means that the maximum number of digits for a negative number (integerpart + decimal fraction part) is seven.When the Storage Type is Binary, the contents of the numeral memory tableentry are written without alteration to the host word.However, when a negative number is written to a numeral memory table entrywhose number of allocated words at the host is one, it is stored immediately afterinput as a 16-bit negative number.The data is stored in the numeral memory table entry as a 32-bit negative number in this case as well.Upper/Lower (Max./Min.) Limit CheckThe PT has a function to check the correctness of an input numeric value to prevent a numeric value outside the allowable range from being input so that theinput of an illegal value will not adversely affect the system.The upper/lower (max./min.) limit check is executed in the timing indicated below according to the type of a numeral setting input field.For a thumbwheel type numeral setting input field, the check is executed eachtime the increment/decrement key of each digit position is pressed.With a thumbwheel type numeral setting input field, if n...n < m...m [upper limit:1n...n, lower limit: 0m...m (n and m are arbitrary values at each digit)], carry overand underflow are not possible at the highest digit position.Example:If the upper limit value and the lower limit value are 1200 and 201, respectively,the numeric value can be changed only in the following range: from 201 to 999 ifan initial value is a 3-digit value and from 1000 to 1200 if an initial value is a 4-digitvalue.The reason for this is that the upper/lower (max./min.) limit check function doesnot allow the numeric value at the highest digit position to change from 0 to 1 orfrom 1 to 0.To avoid this, set the upper and lower limit values so that n...n y m...m, or provide a touch switch separately to write a numeric value for carry over or underflow.Note To ensure greater safety for numeric inputs, use the upper/lower limit settingfunction.
Otherwise the system may operate unpredictably.Reference: Since values input at the PT are handled as signed binary data, be sure to observe the following upper/lower limit settings at the Support Tool when numbersare being input in hexadecimal with its unlimited input range.• The following values are recognized internally in the PT.1 word: 8000H ↔ 0000H ↔ 7FFFH (–32,768 ↔ 0 ↔ 32,767 decimal)2 words: 8000 0000H ↔ 0000 0000H ↔ 7FFF FFFFH(–2,147,483,648 ↔ 0 ↔ 2,147,483,647 decimal)• In the Support Tool, the upper/lower limits are set in decimal. (The $ prefix canbe added to input hexadecimal values.Using the figures above, the following table shows the upper/lower limits to beset at the Support Tool.Desired inputrangeLower limit to setUpper limit to set0 to FFFFH–32,768 ($8000)32,767 ($7FFF)0 to FFFFFFFFH–2,147,483,648 ($8000 0000)2,147,483,647 ($7FFF FFFF)207Section 2-12Inputting Numeric ValuesInterlock FunctionA numeral input from a thumbwheel switch can be controlled (enabled/disabled)from the PC by setting the interlock function for the numeral input and allocatingan interlock bit in a PC data area.
The status of the allocated interlock bit is readand its status determines whether the thumbwheel switch is enabled or disabled.The following table shows how the PT operates when the interlock function isused or not used.InterlockfunctionUsedOperationNumerical values can be changed by pressing the increment anddecrement touch switches only while the interlock bit is ON.If you attempt to change a value while the interlock bit is OFF, thebuzzer will sound and the value will not change.Not usedValues can be changed with the increment and decrement touchswitches at any time.The PT continuously reads the status of the corresponding interlock bit while athumbwheel switch’s numeral input field that uses the interlock function is beingdisplayed on the screen.
if the interlock bit’s status changes, the thumbwheelswitch is disabled or enabled according to the interlock bit’s status.Reference: If the touch switch input sound has been turned OFF with the PT’s memoryswitch setting, the buzzer won’t sound even though you attempt to change aninterlocked thumbwheel switch’s value.Interlock Bit AllocationInterlock bits can be allocated in the following host (PC) areas.SymbolC-series PCsAllocationCV-series PCsAllocationCS/CJ-series PCsAllocationNoneIR AreaOKCIO AreaOKCIO AreaOKHHR AreaOK------HR AreaNot withHost LinkAAR AreaOKAuxiliary AreaNoAR AreaOKLLR AreaOK------LR Area*1Not withHost LinkTTC Area,Timer PVsNoTimer Area,Timer PVsNoTC Area,Timer PVsNoTU------------TC Area,Timer Completion FlagsCTC Area,Counter PVsNoCounter Area,Counter PVsNoTC Area,Counter PVsCU------------TC Area,Counter Completion FlagsNot withHost LinkW------------WR AreaNot withHost LinkTK------------Task FlagsNot withHost LinkDDM AreaOKDM AreaOKDM AreaEEM Area *2,current bankOKEM Area,current bankE0_ toEC_---------208Not withHost Link---Not withHost LinkNoOKEM Area,current bankNot withHost LinkEM Area,EM banks 0 to CNot withHost LinkInputting Numeric ValuesSection 2-12*1: LR 00000 to LR 00199 are converted to CIO 01000 to CIO 01199.*2: The EM Area is supported only by the C200HX/HG/HE(-Z)E PCs.Since the Auxiliary Area of the CVM1/CV-series PCs is allocated to system functions, and it cannot be used for purposes other than system use.The range of each memory area differs according to the PC.
Refer to Appendix DPC Memory Maps on page 441.When a DM Area or EM Area address is specified, add a bit number (00 to 15) tothe end of the word address.Display FunctionsInput FunctionsNumeric values are displayed in the numeral setting input field in accordancewith the General settings.For details on the method of display according to the General settings, refer toCommon Attributes (page 202).• Numeric values are input into a thumbwheel type numeral setting input field byusing the + and – touch switches provided for each digit.• When a thumbwheel switch using the interlock function is being displayed onthe screen, the PT continuously reads the status of the corresponding interlockbit allocated in the PC.Output FunctionsNumeral setting input fields only write input numeric values to numeral memorytable entries; they have no function for directly outputting data to external destinations (if a value is written to a numeral memory table entry for which a wordshas been allocated in the host, the value can be output to the host indirectly).However, the input of a numeric value is notified to the host via the PT statusnotify area.Processing FunctionsNumeral setting input fields have no data processing functions.Relationship with Other Elements• Numeral displays (page 140) use the same conversion method and displaymethod as numeral setting input fields.• For details on how numeric values are stored in numeral memory table entries,refer to 2-3-1 Numeral Memory Table (page 72).• Numeral setting input fields overlap with other elements in accordance with theorder in which they were registered for the screen with the Support Tool.
However, the way in which they overlap can be changed with the Support Tool.209Section 2-13Inputting Character Strings2-13 Inputting Character StringsFunction OutlineCharacter string input fields are input fields for inputting character strings on thescreen.The character string input into the character string input field using touchswitches is written to a character string memory table entry.Bar codes can also be read and input by using a bar code reader connected tothe PT.The character string input field functions as a character string display when it isnot receiving inputs.Reference: There are two input methods when inputting character strings from a bar codereader: automatic confirmation, where the character string is confirmed on input,and manual confirmation, where the character string has to be confirmed bytouch switch operation.