CPM2A_PROGRAMMING MANUAL (W353-E1-2) (986750), страница 19
Текст из файла (страница 19)
(Pulses can beoutput independently from pulse outputs 0 and 1.)Output 01000: Pulse output 0 (single-phase output)Output 01001: Pulse output 1 (single-phase output)Wire the CPM2C outputs as shown in the following illustration. (Pulses can beoutput independently from pulse outputs 0 and 1.)Output connector01000: Pulse output 0 (single-phase output)01001: Pulse output 1 (single-phase output)PC SetupMake the following settings in the PC Setup.WordDM 6629DM 6642Bits00 to 03FunctionPulse 0 PV coordinate 0: Relative coordinatesystemsystem04 to 07Pulse 1 PV coordinatesystem1: Absolute coordinatesystem08 to 15High-speed countersetting00: Do not use.SettingEither 0 or1Either 00 or01: Use as high-speed 01counter02: Use assynchronized pulsecontrol (10 to 500 Hz).03: Use assynchronized pulsecontrol (20 Hz to 1kHz).04: Use assynchronized pulsecontrol (300 Hz to 20kHz).If absolute pulses are specified with PULS(65), be sure to set the absolute coordinate system (1).Synchronized pulse control cannot be used simultaneously.94SectionCPM2A/CPM2C Pulse Output Functions2-5The 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.The following table shows the instruction operations related to pulse outputswithout acceleration and deceleration (fixed duty ratio).Ladder DiagramProgrammingInstructionControlOperation(@)PULS(65)Set number of pulses(@)SPED(64)Set frequency and startpulse outputsSets the number of pulses to be outputin independent mode.Sets the frequency for outputs in theindependent mode or continuous mode,and starts the pulse outputs.Change frequencyChanges the frequency for outputs inthe independent mode or continuousmode.Stop pulse outputs(@)INI(61)(@)PRV(62)Stops the pulse outputs (by changingthe speed to a frequency of 0 Hz).Stop pulse outputsStops the pulse outputs.Change pulse output PV Changes the pulse output PV.Read pulse output PVReads the pulse output PV.Read pulse output status Reads the pulse output status.The following table shows which instructions can be executed during pulse outputs without acceleration and deceleration.PULS(65)SPED(64)INI(61)PRV(62)ACC(––)PWM(––)Continuous modeNoYes (See note 2.)Yes (See note 1.)YesNoNoIndependent modeNoYes (See note 2.)Yes (See note 1.)YesNoNoNote1.
This instruction can be executed only while pulse outputs are stopped. ThePV cannot be changed while pulses are being output. If the PV needs to bechanged, be sure to stop the pulse output first.2. This instruction can be used only for changing the frequency and stoppingthe pulse output. It cannot be used for switching between independentmode and continuous mode.The following table shows the words and bits related to pulse outputs withoutacceleration and deceleration (fixed duty ratio).Word228229230231252AR 11Bits00 to 1500 to 1500 to 1500 to 15040512131415NamePulse output PV 0, rightmost 4 digitsPulse output PV 0, leftmost 4 digitsPulse output PV 1, rightmost 4 digitsPulse output PV 1, leftmost 4 digitsPulse output 0 PV resetPulse output 1 PV resetPulse output 0 PV overflow/underflowContentsCannot be used aswork bits even whennot used as pulseoutputs.Clears PV 0 when ON.Clears PV 1 when ON.ON: OccurredOFF: NormalNumber of pulses set for pulse output 0 ON: Set (by PULS(65))OFF: Not setPulse output completed for pulseON: Completed (byoutput 0SPED(64))OFF: Not completedPulse output in progress for pulseoutput 0ON: In progress (bySPED(64))OFF: Stopped95SectionCPM2A/CPM2C Pulse Output FunctionsWordAR 12BitsName122-5ContentsPulse output 1 PV overflow/underflowON: OccurredOFF: NormalNumber of pulses set for pulse output 1 ON: Set (by PULS(65))OFF: Not setPulse output completed for pulseON: Completed (byoutput 1SPED(64))OFF: Not completed131415Pulse output in progress for pulseoutput 0ON: In progress (bySPED(64))OFF: StoppedSet Number of PulsesSpecify the number of pulses to be output in independent mode.(@)PULS(65)PPort specifier (000: Pulse output 0; 010: Pulse output 1)DType of Pulse Output (000: Relative pulses; 001: Absolute pulses) (See note.)Beginning word of setting for number of pulsesNNRightmost 4 digitsN+1Leftmost 4 digitsNumber of pulses (Rightmost, leftmost digits)Register the number of pulses to be set.96,777,215 to 16,777,215Negative numbers are expressed by turning ONthe leftmost bit.Type of Pulse Output000:001:Relative pulses (SV for number of pulses = Number of pulses moved)Absolute pulses (SV for number of pulses = The next PV on the absolute coordinate system,i.e., the pulse output PV + number of pulses moved)**Absolute pulses can only be specified by PULS(65) when the PV coordinate systemin the PC Setup is set for an absolute coordinate system.Set Frequency and Start Pulse OutputsChange FrequencyThese functions set the pulse output number, the output mode, and the frequency, and begin pulse outputs.
They can also be used to change the frequency ifpulse outputs are already in progress.(@)SPED(64)MPort specifier (000: Pulse output 0; 010: Pulse output 1)Mode designation (000: Independent; 001: Continuous)FTarget frequency data wordPFTarget frequencyRegister the target frequency data to be set.#0001 to #1000 (4 digits BCD): 10 Hz to 10 kHz#0000: Pulse output stopped96SectionCPM2A/CPM2C Pulse Output Functions2-5Change Pulse Output PVResetting Pulse Output PVThis function changes the pulse output present value (PV).
The PV can also becleared by using SR 25204 and SR 25205.(@)INI(61)P004C2Port specifier (000: Pulse output 0; 010: Pulse output 1)Control designation (004: Change pulse output PV)Beginning word for PV change dataC2Rightmost 4 digitsChange PV data (Rightmost, leftmost digits)C2+1Leftmost 4 digitsRegister the PV data to be changed.96,777,215 to 16,777,215Negative numbers are expressed by turningON the leftmost bit.The pulse output PV can only be changed or reset while pulse outputs arestopped. Check to be sure that the Pulse Output In Progress Flags (AR 1115 andAR 1215) have been turned OFF.Stop Pulse OutputsThis function stops the pulse outputs.Using SPED(64)(@)SPED(64)PMFPort specifier (000: Pulse output 0; 010: Pulse output 1)Mode designation (000: Independent; 001: Continuous)Target frequency data wordF#0000Specifies a frequency of 0 Hz.Using INI(61)(@)INI(61)P003000Port specifier (000: Pulse output 0; 010: Pulse output 1)Control designation (003: Stop pulse outputs)Fixed: 000Besides executing the instructions shown above, it is also possible to stop pulseoutputs by stopping operation (PROGRAM mode).Read Pulse Output PVThis function reads the pulse output PV.Using an Instruction(@)PRV(62)P003DPort specifier (000: Pulse output 0; 010: Pulse output 1)Control designation (003: Read pulse output PV)Beginning word for storing pulse output PVDRightmost 4 digitsD+1Leftmost 4 digitsPulse output PV (rightmost, leftmost digits)The PV data that is read is stored here.96,777,215 to 16,777,215Negative numbers are expressed by turningON the leftmost bit.97SectionCPM2A/CPM2C Pulse Output Functions2-5Using Data AreasAs shown in the following illustration, the pulse output PV for pulse output 0 isstored in words 228 and 229, and the pulse output PV for pulse output 1 is storedin words 230 and 231.Pulse Output 0Pulse Output 1Word 228PV (Rightmost)Word 230PV (Rightmost)Word 229PV (Leftmost)Word 231PV (Leftmost)Words 228 to 231 are refreshed with every scan, so there may be a discrepancyfrom the exact PV at any given time.Words 228 to 231 cannot be used as work words even when pulse outputs arenot being used.When the PV is read by executing PRV(62), words 228 to 231 are refreshed withthe same timing.Read Pulse Output StatusThis function reads the pulse output status.Using an Instruction(@)PRV(62)P001DPort specifier (000: Pulse output 0; 010: Pulse output 1)Control designation (001: Read pulse output status)Word for storing pulse output statusPulse output status0: Constant speed; 1: Accelerating/deceleratingPulse output PV overflow/underflow0: Normal; 1: Overflow or underflow occurredPulse output in progress0: Stopped1: Output in progressNumber of pulses0: Not set1: SetPulse output completion0: Not completed1: CompletedUsing Data AreasAs shown in the following illustration, the pulse output status for pulse output 0 isstored in AR 11, and the pulse output status for pulse output 1 is stored in AR 12.AR 11: Pulse output 0AR 12: Pulse output 1Pulse output in progress0: Stopped1: Output in progressPulse output completion0: Not completed1: CompletedPulse output status:0: Constant speed;1: Accelerating/deceleratingPulse output PV overflow/underflow0: Normal1: Overflow or underflow occurredNumber of pulses0: Not set1: SetNote The flags in AR 11 and AR 12 are refreshed once each cycle, so the values inthese words may not reflect the actual status during each cycle, but the flags inAR 11 and AR 12 are refreshed when the status is read with PRV(62).98SectionCPM2A/CPM2C Pulse Output Functions2-5Relationship Between Status and OperationIndependent Mode (Without Acceleration and Deceleration)FrequencyTimePULS(65) executionSPED(64) executionOutput in progressOutput completedNumber of pulses setContinuous ModeFrequencyTimeSPED(64) executionINI(61) executionOutput in progressOutput completedNumber of pulses setStopping Output in Independent Mode (Without Acceleration and Deceleration)FrequencyTimePULS(65) executionSPED(64) executionINI(61) executionOutput in progressOutput completedNumber of pulses set99SectionCPM2A/CPM2C Pulse Output Functions2-5Application ExamplesPositioningExplanationIn this example, when the execution condition (00005) turns ON, 100 pulses areoutput from output 01000 (pulse output 0) at a frequency of 60 Hz.Frequency60 HzNumber of pulsesExecution condition(00005)WiringWire the CPM2A to the motor driver as shown in the following illustration.Motor DriverWire the CPM2C to the motor driver as shown in the following illustration.
In thiscase, a CPU Unit with sinking transistor outputs is used.Output connectorMotor Driver24 VDCPC Setup150DM 6629DM 6642000Sets the coordinate system for pulse output 0 as relative.Set for other than synchronized pulse control.(Set to 01 when using the high-speed counter.)100SectionCPM2A/CPM2C Pulse Output Functions2-5Programming00005 (Execution condition)(13)Detects turning ON of execution condition.PLUS(65)Sets number of pulses.Pulse output 0Relative pulsesBeginning word for pulseSV dataDM 0000DM 0001Number of pulses:100SPED(64) Sets frequency and starts pulse output.Pulse output 0Independent modeFrequency: 60 HzJOG OperationExplanationIn this example, when the execution condition (00005) turns ON, JOG pulses areoutput at a frequency of 100 Hz from either output 01000 (pulse output 0) or output 01001 (pulse output 1).