Download CP1E CPU Unit Hardware
Transcript
8 Using Expansion Units and Expansion I/O Units Example 4 Temperature: Open circuit (°F) Temperature Data: 7FFFFF Leftmost 3 Digits and Flags Bits Data Flags ×165 ×164 ×163 15 14 13 12 0 1 1 0 11 to 08 7 07 to 04 F 03 to 00 F °F Leftmost 6 Error 7 F F Temperature data Flags Rightmost 3 Digits and Flags Bits Data Flags ×162 ×161 ×160 15 14 13 12 1 1 1 0 11 to 08 F 07 to 04 F 03 to 00 F E Error °F Rightmost Flags F F F Temperature data Additional Information • Leftmost digits are stored in the lower memory addresses. Treat the data in the lower memory address as the leftmost digits when programming. Programming Example The following programming example shows how to use 2-decimal-place Mode for the following PLC configuration. CPU Unit 8-4 Temperature Sensor Units • Be sure that the data is read at least once every 125 ms to allow for the CPU Unit’s cycle time and communications time. Correct data may not be obtained if the read cycle is greater than 125 ms. CP1W-TS001 Temperature Sensor Unit Inputs CIO 002 CIO 003 Outputs CIO 100 CIO 101 Outputs None 8 Temperature unit setting: 0 (°C) Two-decimal-place Mode: 1 (2 digits after decimal point stored) In this example, 100 times the temperature data for temperature input 0 (input to CIO 002) is stored in binary form in D100 to D102. CIO 2 Temperature input 0 Leftmost data W100 Rightmost data Bit D100 D101 D102 15 14 13 12 11 10 9 ×167 ×166 Always 0 Always 0 Always 0 ×16 2 8 7 6 5 ×161 ×165 ×16 3 4 3 2 1 ×160 0 ×164 0 0 Temperature Unit Flag (0: °C, 1: °F) Open-circuit Flag (0: Normal, 1: Error) CP1E CPU Unit Hardware User’s Manual(W479) 8-47 8-4-5 Function Descriptions Inputs CIO 000 CIO 001