CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 24
Текст из файла (страница 24)
Theinput frequency will thus be 990 to 1010 Hz. The multiplication factor of 300%,however, would make this 2970 to 3030 Hz. There would also be an error of ±1%in the frequency of the output pulse, so the output would be in the range 2940 to3060 Hz.2-9Analog I/O Functions (CPM1/CPM1A/CPM2A/CPM2C Only)One or more Analog I/O Units can be connected to the PC to provide analog I/O.One Analog I/O Unit allows 2 analog inputs and 1 analog output.
See 3-1 AnalogI/O Units for details.2-10 Temperature Sensor Input Functions(CPM1A/CPM2A/CPM2C Only)Temperature Sensor Units can be added to directly input temperature sensorinputs into the PC. Temperature Sensor Units are available for either thermocouple or platinum resistance thermometer inputs.For the CPM1A or CPM2A, up to three CPM1A-TS001/101 Temperature SensorUnits or one CPM1A-TS002/102 Temperature Sensor Unit can be connected.Up to 6 temperature inputs are possible for one PC.For the CPM2C, up to four CPM2C-TS001/101 Temperature Sensor Units canbe connected, enabling up to 8 temperature inputs for one PC.2-11 CompoBus/S I/O Slave Functions(CPM1A/CPM2A/CPM2C Only)The PC can function as a Slave to a CompoBus/S Master Unit (or SRM1 CompoBus/S Master Control Unit) when a CompoBus/S I/O Link Unit is connected.
See3-3 CompoBus/S I/O Link Unit for details.136Section 2-12CompoBus/S I/O Master Functions (SRM1(-V2) Only)2-12 CompoBus/S I/O Master Functions (SRM1(-V2) Only)Maximum Number of NodesA maximum of either 16 or 32 CompoBus/S nodes may be connected.Communications mode No. of nodes setHigh-speed mode1632Long-distance mode1632Communications response time0.5 ms0.8 ms4.0 ms6.0 msThe communications mode and maximum number of nodes are set in the PCSetup, as shown in the following table.WordBit(s)DM 6603 00 to 03FunctionSettingMaximum number of CompoBus/S nodes0 or 104 to 070: 32 nodes1: 16 nodesCompoBus/S communications mode0 or 108 to 150: High-speed communications1: Long-distance communicationsNot used.00Note When changes are made to these settings, always turn the power off and onagain to make the new setting effective.Slave InterruptsInput bits in IR 000 to IR 007 and output bits in IR 010 to IR 017 are used as interrupts for CompoBus/S I/O Terminals.
The CompoBus/S I/O Terminal interrupts(IN 0 to 15 and OUT 0 to 15) are allocated as indicated in the following table.IN0 to IN15 are the node addresses for the Input Terminals and OUT0 to OUT15are the node addresses for the Output Terminals.BitWordInputOutputNoteIR 000IR 001IR 002IR 003IR 004IR 005IR 006IR 007IR 010IR 011IR 012IR 013IR 014IR 015IR 016IR 01715 14 13 12 11 10 9IN1IN3IN5IN7IN9IN11IN13IN15OUT1OUT3OUT5OUT7OUT9OUT11OUT13OUT1587654 3 2IN0IN2IN4IN6IN8IN10IN12IN14OUT0OUT2OUT4OUT6OUT8OUT10OUT12OUT14101. When the maximum number of CompoBus/S nodes is set to 16, IN8 to IN15can be used as work bits.2. CompoBus/S Terminals with less than 8 points are allocated bit addressesfrom either 0 or 8.3. CompoBus/S Terminals with 16 points can be set for only even number addresses.137Section 2-13Analog Controls (CPM1/CPM1A/CPM2A Only)4.
Analog Terminals can be set for only even number addresses.Status FlagsUppermost bits: Slave Communications Error FlagsWordAR04The communications status between CompoBus/S terminals is output throughAR04 to AR07 Slave Add Flags and Slave Communications Error Flags.Lower Bits: Slave Add Flags1514131211109876543210OUT7OUT6OUT5OUT4OUT3OUT2OUT1OUT0OUT7OUT6OUT5OUT4OUT3OUT2OUT1OUT0AR05IN7IN6IN5IN4IN3IN2IN1IN0IN7IN6IN5IN4IN3IN2IN1IN0AR06OUT15OUT14OUT13OUT12OUT11OUT10OUT9OUT8OUT15OUT14OUT13OUT12OUT11OUT10OUT9OUT8AR07IN15IN14IN13IN12IN11IN10IN9IN8IN15IN14IN13IN12IN11IN10IN9IN8Note1.
IN0 to IN15 are the input terminals and OUT0 to OUT15 are the output terminals.2. When the maximum number of CompoBus/S units is set to 16, IN8 to IN15and OUT8 to OUT15 cannot be used.3. The Slave Add Flag turns ON when a slave joins the communications. Whenthe power to the CPU Unit is turned OFF and ON again all bits will turn OFF.4. The Slave Communications Error Flag turns ON when a slave participatingin the network is separated from the network. The bit will turn OFF when theslave re-enters the network.2-13 Analog Controls (CPM1/CPM1A/CPM2A Only)The PCs are equipped with analog controls that automatically transfer the settings on the CPU Unit’s adjustment switches to words in the CPU Unit’s I/O memory.
This function is very useful when there are set values that need to be precisely adjusted during operation. These set values can be changed just by turning the adjustment switches on the CPU Unit.Settings138The PCs have two analog adjustment controls that can be used for a wide rangeof timer and counter analog settings. The following diagrams show the adjustment controls. As these controls are turned, values from 0000 to 0200 (BCD) arestored in the SR Area.
Use a Phillips screwdriver to adjust the settings.Analog Controls (CPM1/CPM1A/CPM2A Only)Section 2-13The storage words are refreshed once with every CPU Unit cycle.CPM1The analog setting for control 0 is in SR 250.The analog setting for control 1 is in SR 251.CPM1A/CPM2AThe analog setting for control 0 is in SR 250.The analog setting for control 1 is in SR 251.Note The above diagram shows the CPM2A, but the settings are the same for theCPM1A.! CautionThe analog setting may change with changing temperatures. Do not use theanalog adjustment controls for applications that require a precise, fixed setting.139Section 2-14Quick-response InputsUsing Analog ControlsMake the analog settings.Use a Phillips screwdriver to adjust the controls.Connect a Programming Device such as a Programming Console, andcheck the values stored in SR 250 and SR 251.Create a ladder diagram program.Analog control 0Making the AnalogSettingsRead the values in SR 250 and SR 251 with the ladder diagram program.Analog control 1SR 251Analog control 1 set value (SV)SR 250Analog control 0 set value (SV)Use a Phillips screwdriver to adjust the analog controls.
The set values can bechecked by connecting a Programming Device such as a Programming Consoleand reading the values stored in SR 250 and SR 251.Analog control 0Ladder DiagramProgrammingAnalog control 1The following table shows the words and bits where the analog settings arestored.WordSR 250SR 251Bit00 to 1500 to 15NameAnalog control 0 SV storage areaAnalog control 1 SV storage areaValue0000 to 0200(BCD)In the following example program, the analog control SV (0000 to 0200 BCD)stored in SR 250 is set as a timer SV.
The timer’s set range is 0.0 s to 20.0 s.Start bitSpecifies SR 250 for the timer SV.2-14 Quick-response Inputs2-14-1 CPM1/CPM1A Quick-response InputsThe CPM1/CPM1A have quick response inputs that can be used to enable inputting shorter signals.All 10-point CPU Units have 2 quick-response input terminals and the 20-, 30-,and 40-point CPU Units have 4 quick-response input terminals. The same terminals are used for quick-response inputs and interrupt inputs.140Section 2-14Quick-response InputsQuick-response OperationQuick-response inputs have an internal buffer, so input signals shorter than onecycle can be detected.
Signals with a pulse width as short as 0.2 ms can be detected, regardless of their timing during the PC cycle.OverseeingprocessesProgramexecutionI/OrefreshingOverseeing ProgramprocessesexecutionI/OrefreshingInput signal(00003)IR 00003One cycleCPU UnitInput bits10-point CPU Units20-, 30-, 40-point CPU UnitsSetting Quick-responseInputsIR 00003 to IR 00004IR 00003 to IR 00006Min.
input pulse width0.2 msThe input bits in the above table can be set as quick-response inputs inDM 6628, as shown in the following table.WordDM 6628Settings0: Normal input1: Interrupt input2: Quick-response input(Default setting: 0)Bit 150DM 6628Setting for input 00006: Set to 2Setting for input 00005: Set to 2Setting for input 00004: Set to 2Setting for input 00003: Set to 2Program ExampleIn this example, DM 6628 has been set to 0002.25315 First Cycle FlagON for 1 cycle@INT(89)000Mask/unmask input interrupts.000#000EUnmasks 00003 (interrupt input 0), masks others.141Section 2-14Quick-response Inputs2-14-2 CPM2A/CPM2C Quick-response InputsThe CPM2A and CPM2C have four inputs used for quick-response inputs(shared with interrupt inputs and 2-kHz high-speed counter inputs). With quickresponse inputs, signals that are changed within a cycle can be received bymaintaining an internal buffer.SharedprocessingCalculationprocessingI/O refreshSharedprocessingCalculationprocessingI/O refreshInput terminal(00003)000031 cycleInput number (See note.)00003000040000500006 (See note 2.)NoteMinimum input signal width50 µsµ1.
Input numbers 00003 to 00006 can be used as interrupt inputs, 2-kHz highspeed counter inputs, or quick-response inputs. If they are not used for anyof these purposes, then they can be used as ordinary inputs.2. Input number 00006 does not exist in CPM2C CPU Units with 10 I/O points.The following table shows the relationships between quick-response inputs andthe CPM2A/CPM2C’s other functions.FunctionNoteInterval timer interruptsSynchronized pulse controlCan be used simultaneously.Interrupt inputsSee note 1.Interval timer interruptsCan be used simultaneously.High-speed countersCan be used simultaneously.Interrupt inputs (counter mode)See note 2.Pulse outputsCan be used simultaneously.Quick-response inputsSee note 3.Input time constantSee note 4.ClockCan be used simultaneously.1.
Quick-response inputs utilize the interrupt input function, so the same inputnumber from 00003 to 00006 cannot be assigned for both a quick-responseinput and an interrupt input in the PC Setup.2. A quick-response input and an interrupt in counter mode cannot be assigned the same input number in the PC Setup.3. The input numbers allocated for quick-response inputs are 00003 to 00006.These inputs can be set and operated as quick-response inputs.4. Input time constants are disabled for all inputs that are set as quick-response inputs.142Section 2-14Quick-response InputsUsing Quick-response InputsWire the inputs.PC Setup (DM 6628)Quick-response inputsInput numbers 00003, 00004, 00005, and 000062: Use as quick-response inputs.Quick-response input 0Quick responseQuick-response input 1Quick-response input 2Quick-response input 3PC SetupDM 6628Wiring the InputsWire the CPM2A’s inputs as shown in the following diagram.Input 00003: Quick-response input 0Input 00004: Quick-response input 1Input 00005: Quick-response input 2Input 00006: Quick-response input 3143Section 2-14Quick-response InputsWire the CPM2C’s inputs as shown in the following diagram.CPU Units with 10 I/O PointsInput terminalInput connectorInput 00004: Quick-response input 1Input 00003: Quick-response input 000004: Quick-response input 100003: Quick-response input 0CPU Units with 20 I/O PointsInput connector00006: Quick-response input 3*00005: Quick-response input 2*00004: Quick-response input 100003: Quick-response input 0PC SetupTo use quick-response inputs with the CPM2A or CPM2C, make the followingsettings in the System Setup Area (DM 6628) from a Programming Device.WordDM 6628Bits00 to 0304 to 0708 to 1112 to 15Interrupt setting forinput number 3Interrupt setting forinput number 4Interrupt setting forinput number 5*Interrupt setting forinput number 6*Function0: Ordinary inputSetting21: Interrupt input(interrupt input mode orcounter mode)2: Quick-response inputNote *Input numbers 00005 and 00006 does not exist in CPM2C CPU Units with 10I/O points.The settings will go into effect when the mode is changed (from PROGRAM toMONITOR/RUN) or when the power supply is turned ON to the PC.144Section 2-15Macro Function2-15 Macro FunctionThe macro function allows a single subroutine (programming pattern) to be usedby simply changing the I/O word.