NT21_Reference Manual (V069-E1-1) (986756), страница 58
Текст из файла (страница 58)
Set the same protocol in the PC.The system program installedin the PT is for a PC makerother than OMRON.• The PT was turned OFF.• The PT was reset.The cable was disconnectedwhile Device Monitor wasbeing used and thenconnected to a PC with asmaller data area.The Device Monitor function can be used only when thePT is connected to an OMRON PC. Refer to 6-14Version Display in the Setup Manual and check thesystem program type. Only OMRON Direct Accesssystem programs with version numbers Ver.
3.0j andhigher can use the Device Monitor function.The words monitored by Device Monitor are retainedeven if the Device Monitor is closed, but the informationis cleared when the PT is turned OFF or reset.Specify the desired words again.If the cable is connected again to another PC, the PTwill clear any word addresses that aren’t supported inthat PC. Check the ranges of data areas in the PC andset word addresses within those ranges.Error Message DisplayedErrorProbable causeRemedyThe setting is wrong.A word address that doesn’texist in the PC was specifiedin the popup input window.Input a word address that exists in the PCCan’t write while running.An attempt was made tochange word contents whilethe PC was in RUN mode.Switch the PC to MONITOR or PROGRAM mode.
ThePC’s operating mode can be changed from any one ofthe Device Monitor screens.The memory can’t be written.An attempt was made to writeto a read-only orwrite-protected area.Write to a read/write area in the connected PC. If thearea is write-protected, clear the write-protection andtry writing the data again.Other tool is accessing.A Programming Deviceconnected to the PC isperforming an operation suchas online editing.(when attempting to changethe operating mode or clearforced status)Try the operation again after disconnecting theProgramming Device.277Section 2-17Device Monitor FunctionErrorRemove trouble executionfails.(when clearing an error fromerror log screen)Connection failed.(when starting the DeviceMonitor function)Set Comm.
Method to NTLink (1:1 or 1:N)(when the Device Monitormenu is being displayed)(Serial port reception errorscreen being displayed)278Probable causeRemedyThe cause of the PC errorhas not been eliminated.Eliminate the cause of the error that you are trying toclear. For details, refer to the PC’s operation manual.The Device Monitor functionwas called when the PT wasnot connected to a PC thatsupports Device Monitor.The communications protocolset at the PT is not 1:1 NTLink or 1:N NT Link.Check the model of the PC that is connected.
(Refer to2-17-1 Compatible Systems for a table of PCs thatsupport the Device Monitor function.)The connecting cable isdisconnected or faulty.Verify the connection between the PT and PC. Fordetails, refer to section 7 of the Setup Manual.Check the memory switches (fourth screen) and set theconnected PC’s serial port protocol to 1:1 NT Link or1:N NT Link. Set the same protocol in the PC.Section 2-18Mathematical Function2-18 Mathematical FunctionThe NT31/NT31C and NT631/631C PTs have been equipped with a mathematical function that automatically executes formulas that have been registered inthe PT in advance with the Support Tool.
The mathematical function can automatically perform data processing such as scaling in the PT and display the results.Up to 256 calculation formulas can be registered.This section explains the functions and operation of the mathematical function.Refer to 5-1 Examples of Actual Applications of Direct Access for an exampleapplication of the mathematical function.Reference:S In order to use the mathematical function, a mathematical table must be registered and transferred to the PT along with the image data. Use the SupportTool (version 4.6 for Windows) for these operations.S The mathematical function can be used only when the system program of theNT21, NT31/31C, or NT631/631C is version 3 or higher.2-18-1 Executable CalculationsFormula PatternsThe following table shows the 8 formula patterns that can be executed in the PT.The formulas have 2 to 5 terms.Formula patternExamplex!xa+b(x ! x) ! x(a + b) * cx ! (x ! x)a / (b – c)x ! ((x ! x) ! x)a + ((b – c) / d)x ! (x ! (x ! x))a * (b + (c / d))((x ! x) ! x) ! (x ! x)((a * b) – c) / (d + e)((x ! x) ! (x ! x)) ! x((a * b) + (c * d)) * e(x ! x) ! ((x ! x) ! x)(a + b) / ((c – d) * e)x: Operand; !: OperatorIf there isn’t a formula pattern that matches your formula exactly, use operatorsand operands that won’t affect the result (+0 or *1) in the extra terms, as in thefollowing example.Desired formulaa2 + b2Formula pattern((x ! x) ! (x ! x)) ! xRegistered pattern(a * a) + (b * b) + 0279Section 2-18Mathematical FunctionAvailable OperatorsTypeArithmeticoperatorsBooleanoperatorsThe following operators can be used by the mathematical function.SymbolFunctionResult+–*/%AdditionSubtractionMultiplicationDivision, yields the quotientDivision, yields the remainderResult of additionResult of subtractionResult of multiplicationResult of division (quotient)Result of division(remainder)ANDYields TRUE (1) if the results of both the left formula andright formula are TRUE (non-zero).
Otherwise yields FALSE(0).TRUE (1) or FALSE (0)ORYields TRUE (1) if the result of the left formula, the rightformula, or both are TRUE (non-zero). Otherwise yieldsFALSE (0).TRUE (1) or FALSE (0)XORYields TRUE (1) if the result of one formula is TRUE(non-zero) and the other is FALSE (0).TRUE (1) or FALSE (0)Yields FALSE (0) if the results of both formulas are TRUE(non-zero) or both are FALSE (0).Bit-wiseoperatorsComparisonoperatorsp&|^<Logically ANDs the two bits.Logically ORs the two bits.Logically XORs the two bits.Yields TRUE (1) if the result of the left formula is less thanthe result of the right formula. Otherwise yields FALSE (0).Result of logical ANDResult of logical ORResult of logical XORTRUE (1) or FALSE (0)>Yields TRUE (1) if the result of the left formula is greaterthan the result of the right formula.
Otherwise yields FALSE(0).TRUE (1) or FALSE (0)==Yields TRUE (1) if the result of the left formula is equal tothe result of the right formula, otherwise yields FALSE (0).TRUE (1) or FALSE (0)The operators shown in the table above can be used in any combination. Theoperators have no priority order; the order of operations is determined by the parentheses in the formula pattern.Example Formula SettingThe following kinds of calculations can be performed by combining formula patterns and operators.Desired calculationFormula and operatorsScaling calculation (2×X+Y)(2 * X) + YBit inversion of XX ^ FFFFHSetting the most significant byte of X to 0X & 00FFHDetermining whether X is greater than YX>YDetermining whether 5×X+Y equals 100100 = = ((5 * X) + Y)Determining whether X is between 15 and 68((X > 15) AND (X < 68)) + 0The calculations in the table above are examples.
a wide variety of calculationscan be made by combining other formula patterns and operators.Reference: All of the calculation results are stored in word units, including the results of boolean and comparison operations. The results aren’t indicated by turning a particular bit ON or OFF.Specifying CalculationResults and Data280The following storage locations or values can be specified for calculation resultsand operands.Calculation results:Numeral memory table entries or PC addresses (PT memory)Operands:Numeral memory table entries, PC addresses (PT memory), or constantsSection 2-18Mathematical FunctionUsing Numeral Memory Table EntriesAny numeral memory table entry can be specified as an operand.
When a numeral memory table entry is specified, the number of words used in the calculation or the number of words stored as the calculation result depends uponwhether words are allocated to the host.Words not allocated:The operands/calculation results are treated as 2-word data.Words allocated:The operands/calculation results are treated as 1-word data if 1 word is allocated or 2-word data if 2 words are allocated.Using PC AddressesWords in the following data areas of the host (PC) can be specified as operandsor calculation results.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 FlagsNoCTC Area,Counter PVsNoCounter Area,Counter PVsNoTC Area,Counter PVsNoCU------------TC Area,Counter Completion FlagsNoW------------WR AreaTK------------Task FlagsNoDDM AreaOKDM AreaOKDM AreaOKEEM Area *2,current bankOKEM Area,current bankE0_ toEC_---------Not withHost Link---Not withHost LinkEM Area,current bankNot withHost LinkEM Area,EM banks 0 to CNot withHost Link*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 words in the Auxiliary Area of the CVM1 and CV-series PCs is allocated tosystem functions, and it cannot be used for purposes other than system use.Timer and counter PVs cannot be specified directly.
Use numeral memory tableentries when using timer/counter PVs.The range of each memory area differs according to the PC. Refer to Appendix DPC Memory Maps on page 441.When a memory link is used, any PT memory address (0000 to 9999) can bespecified.When a PC address (PT memory) is used, the number of words used in the calculation and the number of words stored as the calculation result are specifiedwith the data length.
The data length specification is the same for all operandsand results of a formula.281Section 2-18Mathematical FunctionUsing ConstantsUse the following ranges for the constants when specifying constants for operands.–2,147,483,648 to 2,147,483,647 (8000 0000 to 7FFF FFFF hexadecimal)When constants are used, the number of words of operands is fixed at 2 words.2-18-2 Data Flow in CalculationsUp to 256 formulas can be registered in the PT’s mathematical table. Formulasare registered in the mathematical table in order beginning with number 0 andending with number 255. (The formula numbers are continuous, it is not possibleto skip any numbers.)When operation is started, the PT automatically executes the calculations in order from the beginning of the mathematical table, as shown in the following flowchart.