Omron CPM1A Programming Example, Displaying the Cycle Time, Preparatory Operations

Page 113
D0000D0001 4142 3031

Programming Example

Section 4-4

 

 

 

1, 2, 3... 1. Monitor the status of the desired word(s) according to the procedure described in 4-3-11 Bit, Digit, Word Monitor. While the multiple addresses are being monitored, the leftmost word is subject to change.

(Multiple address monitor)

2.Press the TR Key to switch to ASCII display. The display will toggle between hexadecimal and ASCII displays each time the TR Key is pressed.

D0000 D0001

TR

"AB" 3031

D0000D0001

TR

4142 3031

Note 1. A message contained in three words can be displayed by using ASCII dis- play in combination with the 3-word monitor operation.

2.The Hexadecimal, BCD Data Modification Operation can be used while dis- playing ASCII data. Input values in 4-digit hexadecimal.

4-3-26 Displaying the Cycle Time

This operation is used to display the current average cycle time (scan time). It is possible only in RUN or MONITOR mode while the program is being executed.

RUN

MONITOR

PROGRAM

 

 

 

OK

OK

No

1, 2, 3... 1. Press the CLR Key to bring up the initial display. 2. Press the MONTR Key to display the cycle time.

MONTR

00000SCAN TIME 012.1MS

“MS” in the display indicates the unit “ms” for the cycle time.

There might be differences in displayed values when the MONTR Key is pressed repeatedly. These differences are caused by changing execution conditions.

4-4 Programming Example

This section demonstrates all of the steps needed to write a program with the

Programming Console.

4-4-1 Preparatory Operations

Use the following procedure when writing a program to the CPM1A for the first time.

1, 2, 3... 1. Set the Programming Console’s mode switch to PROGRAM mode and turn on the CPM1A’s power supply. The password input display will appear on the Programming Console.

MONITOR

RUN PROGRAM

<PROGRAM>

PASSWORD!

2. Enter the password by pressing the CLR and then the MONTR Key.

CLR MONTR

<PROGRAM> BZ

101

Image 113
Contents CPM1A CPM1A Programmable Controllers  Omron Omron Product ReferencesTable of Contents Appendices About this Manual Precautions Intended Audience General PrecautionsSafety Precautions Application Precautions Operating Environment PrecautionsXiv Application Precautions Backup method Data Applicable Directives EC DirectivesConcepts Conformance to EC DirectivesXviii Section Section CPM1A Features and Functions1 CPM1A Features NT Link Communications CompoBus/S I/O Link Units Using the PTStandard Peripheral Devices Programming is PossibleCPU Units 2 I/O Terminal and IR Bit AllocationExpansion I/O Units Unit Relay output Transistor output Sink type Source typeSet value Word Word 001 or later Control Corresponding IR word Setting range BCD3 CPM1A Functions PC model Input bits Response time PC model Input bits Min. input pulse width Mode FunctionPulse output single-phase output CompoBus/S Slave Functions CPM1A-SRT21 Temperature Sensor Unit FunctionsCPU Unit and Expansion I/O Unit Configuration System ConfigurationCPU Unit and Expansion Unit CPM1A CPU UnitsUnit Max. number Inputs Outputs Model Units Expansion I/O UnitsExpansion Units Host Link CommunicationsProgrammable Terminal Connecting to aName Usage Model number One-to-one PC Link CommunicationsAdapters and Cables One-to-one NT Link Communications Name SpecificationsCompoBus/S I/O Link Connections Peripheral Device ConnectionsName Model number Sysmac Support Software SYSMAC-CPT SupportPrevious specifications New specifications Relevant pages Revised SpecificationsUnit Specifications and Components CPM1A-10CDR-j CPM1A-20CDR-j CPM1A-30CDR-j CPM1A-40CDR-j SpecificationsGeneral Specifications Characteristics Memory Backup CPU Unit Input Specifications 3 I/O SpecificationsIncrement Mode 5 kHz Max SpecificationExpansion I/O Unit Input Specifications Relay Output CPU Unit and Expansion I/O Unit Output SpecificationsTransistor Output Source Type Transistor Output Sink Type20EDT 8ET 10CDT1-D 20CDT1-D 30CDT1-D 40CDT1-D 20EDT1 8ET1RS-422 Adapter Specifications Communications Adapter SpecificationsRS-232C Adapter Specifications CPU Unit Components Unit ComponentsCPM1A-10CDR-j/10CDT-D/10CDT1-D 10 I/O Terminals CPM1A-40CDR-j/40CDT-D/40CDT1-D 40 I/O TerminalsCPU Unit Component Descriptions Indicator Status MeaningFatal error Input indicators Expansion I/O Unit with 20 I/O Terminals Expansion I/O Unit ComponentsExpansion I/O Unit with 8 Input Terminals Expansion I/O Unit with 8 Output TerminalsAnalog I/O Unit Components Temperature Sensor Unit ComponentsCPM1A-TS101/102 CPM1A-TS001/002Set value Thermocouple Range C Range F Set value Platinum resistance Range C Range FCompoBus/S I/O Link Unit Components Pins FunctionRS-422 Adapter Communications Adapter ComponentsRS-232C Adapter Installation and Wiring Power Supply Wiring Design PrecautionsPower Supply Voltage 4 CPM1A Power InterruptionsInstallation Site Conditions Selecting an Installation SiteMomentary Power Failure Detection Automatic RestartOverheating Panel/Cabinet Installation2 CPM1A Installation Installing the CPM1A1 CPM1A Orientation CorrectDIN Track Installation Removal Connecting an Expansion I/O UnitInstallation Section General Precautions for Wiring Wiring and ConnectionsLine Noise Hanging DuctsFloor Ducts Ground WiringConduits GroundingTo 240-VAC Power Supply Crimp ConnectorsVDC Power Supply Input Configuration Input WiringCPM1A-8ED Outputs Input Wiring ExampleInput Devices Device Circuit diagramInductive Loads Relay Output Wiring Output WiringOutput Configurations CPM1A-8ER Transistor Output Wiring Sink Type CPM1A-8ET CPM1A-40CDT1-D Transistor Output Wiring Source TypeOutput Short Protection Polarity of Power Supply for the LoadFuse Insertion Inrush Current ConsiderationsOne-to-one Host Link Connection Peripheral Device ConnectionHost Link Connections One-to-N Host Link Connection RDB SDB RDA SDA One-to-one PC Link Connections One-to-one NT Link Connections C200HX/HG/HE PC Using Peripheral Devices Support Software Capabilities SSS System Setup2 CPM1A Restrictions and Precautions Online Editing Offline OperationsCopy Group Name Description Go ToFill PrintPC Setup File Time ChartGroup Name Description Utility Data Area Lists ChangeOnline Operations Offline and Online Operations Compatible Programming Consoles Using a Programming ConsoleCQM1-PRO01-E C200H-PRO27-EBuzzer Volume Mode SwitchDifferent Keys Contrast ControlProgram Mode Changing the CPM1A’s Mode with the Mode SwitchMonitor Mode RUN ModePanel Installation Connecting the Programming ConsolePreparation for Operation Entering the PasswordProgram Password Program BZ Overview Programming Console OperationsPartial Clear Clearing MemoryAll Clear Key Sequence Reading/Clearing Error MessagesBuzzer Operation OFF Entering or Editing Programs Writing a Word Address Writing Hexadecimal, BCD ConstantWriting a Word Address DM Writing an Unsigned Decimal Number#FFF6 Bit Operand Search Instruction SearchInsertion Inserting and Deleting Instructions00207INSERT END Not DeletionDelete END Checking the Program00178CIRCUIT ERR Corrected ProgramBit Monitor 11 Bit, Digit, Word MonitorCont Word MonitorCLR Channel LR Multiple Address MonitoringChannel LR Binary Monitor Differentiation Monitor@OFF OFF OFF CLR OFF OFF OFFThree-word Monitor Unsigned Decimal Monitor Signed Decimal Monitor3CH CHG? Changing Timer, Counter SVThree-word Data Modification Incrementing and Decrementing a Constant Hexadecimal, BCD Data ModificationInputting a New SV Constant Montr Binary Data ModificationPres VAL? D0000 Montr Signed Decimal Data ModificationUnsigned Decimal Data Modification Force Set, ResetHex-ASCII Display Change Clear Force Set/ResetOn on 00000FORCE RELE?Programming Example Program PasswordDisplaying the Cycle Time Preparatory Operations00000MEMORY CLR? HR CNT DM Montr END HR CNT DM Example Program Programming ProceduresInputting the One-second Timer Programming ProceduresInputting the Self-holding Bit Write NOPInputting the 10-count Counter Inputting the Two-second TimerInputting the END001 Instruction LD notInputting the Flicker Output Monitor BZ Test Run in Monitor ModeTest Runs and Error Processing 2 CPM1A Test Run Procedure Initial System Checks and Test Run ProcedureInitial System Checks Points to checkFlash Memory Precautions CPM1A Cycle ErrorFatal Errors Non-fatal ErrorsSelf-diagnosis Functions Message FAL No Meaning and appropriate responseUser-defined Errors Identifying ErrorsError Messages Error FlagsProgramming Errors Programming Console Operation ErrorsFALS07 Message MSG46Circuit ERR Type Message Meaning and appropriate responseMain Check Troubleshooting FlowchartsPower Supply Check Follow the Memory Error Fatal Error CheckNon-fatal Error Check 121 122 Environmental Conditions Check Memory Error Check Power supply Allowable voltage fluctuation range Maintenance InspectionsInspection Items Inspection items Details Criteria RemarksNecessary Tools for Inspection Handling PrecautionsStandard Tools Measurement DevicesExpansion Memory Unit Overview PrecautionsMemory Areas ButtonNomenclature Specifications and NomenclatureSpecifications Handling LED IndicatorMounting/Removing Eeprom Mounting EepromPC Connections Peripheral Port Communications SettingsCPM1, CPM1A, CPM2A CQM1, and SRM1 PCsUploading Programs DisconnectingDownloading Programs Operation Procedure134 135 Expansion Units Standard ModelsCPU Units Expansion I/O UnitsDescription Specifications Model number Temperature Sensor UnitsCompoBus/S I/O Link Unit Communications AdaptersPeripheral Devices Name Appearance Model Number SpecificationsCPM1A-10CDR-j/10CDT-D/10CDT1-D CPU Unit DimensionsCPM1A-20CDR-j/20CDT-D/20CDT1-D CPU Unit CPM1A-30CDR-j/30CDT-D/30CDT1-D CPU UnitCPM1A-8jjjExpansion I/O Unit CPM1A-40CDR-j/40CDT-D/40CDT1-D CPU UnitCPM1A-20EDjExpansion I/O Unit CPM1A-SRT21 CompoBus/S I/O Link Unit CPM1A-TSjjjTemperature Sensor UnitCPM1A-MAD01 Analog I/O Unit CPM1-CIF11 RS-422 Adapter CPM1-CIF01 RS-232C AdapterAppendix B Dimensions with Peripheral Devices AttachedAscii ACPAUTOEXEC.BAT BCDBit number Bit designatorBit-control instruction BlockCTS CONFIG.SYSDIP switch DefaultData link Data link areaEprom EepromFCS Initialization error DelayInput signal InstallLED JISLSS OFF NotPCB RAS PromRAM SCP ROMSSS System configuration Syntax errorSystem error System error messageWDT Numbers Index 165 166 167 Revision History Revision code Date Revised content
Related manuals
Manual 6 pages 62.26 Kb