GE Fanuc Automation
GFL±002
Content of this Manual
Related Publications
Technical Assistance
Preface
We Welcome Your Comments and Suggestions
Contents
Math Functions
Appendix a Using Directories Appendix B Micro PLC Protocol
Appendix E Data Acquisition, Logging, and Display Program
Chapter Programming for the Micro PLC
Programming Basics
Device Designation
Power Flow in a Program
PLC Programs
Micro PLC Instruction Set
Programming with the Programming Software
Programming Devices and Formats
Programming on a Hand-held Programmer
Memor y Map
Memory Types and Addresses
Constants and Register Values in a Program
Non-retentive and Retentive Registers
Start-up Scan Coil C1019
Special Coils
Sec Clock C1018
Hold Output Coil C1021
Analog References
Programming for an Analog Expander Unit
Analog Scaling
Maximum Values
Programming Examples
Example #1
Chapter Programming with the Programming Software
Using the Programming Functions
Programming Operations
Programming Functions
Creating a Program Rung
Running the Programming Software from a Hard Disk
Running the Programming Software
Running the Programming Software Directly from a Diskette
Editing Basics
Horizontal and Vertical Lines in a Rung
Element Labels and Rung Labels
Editing a Rung Element
Editing a Completed Rung
Selecting a Rung to Edit
Deleting a Rung Element
Adding a Contact to a Rung
Adding a Program Function to a Rung
Replacing a Rung Element with a Similar Element
Replacing a Rung Element with a Horizontal Line
Replacing a Rung Element with a Dissimilar Element
Deleting Rungs
Moving Rungs
Copying Rungs
Searching for a Rung or Program Element
Chapter Programming with a Hand-held Programmer
Program Listing
Program Transfer
Entering Program Logic
Hand-Held Programmer Key Operation and Displays
Inserting a Rung Element
Deleting a Rung Element, Rung or Program In Memory
Deleting a Rung Element
Searching
Programming Examples Using the HHP
Ladder Diagram
Chapter Micro PLC Instruction Set
Operation Ladder Symbol Description
Instruction Set Summary
Micro PLC Instruction Set
Contacts
General Programming Software Instructions for Contacts
Examples and HHP Instructions
Normally- Open Contact
Programming Software Instructions
Programming Normally-Open Contact at the Start of a Rung
Programming a Normally-Open Contact in Series
Programming a Normally-Open Contact in Parallel
Normally- Closed Contact
Programming Normally-Closed Contact at the Start of a Rung
Programming a Normally-Closed Contact in Series
Programming a Normally-Closed Contact in Parallel
Positive Transition Contact
Example and HHP Instructions
Negative Transition Contact
Example and HHP Instructions
Coils
Using Coil Pairs
General Programming Software Instructions for Coils
Output Coil
Reset
Set/Reset Coil Pair
Example and HHP Instructions Set
Master Control Relay/End Coil Pair
End
Skip/End Coil Pair
Skip
Enter the other logic required by the Timer
Timers
Programming Software Instructions for Timers
Use the Accept F10 key to add the rung to the program
On Timer
Off Timer
Programming Software Instructions for Counters
Counters
Enter the other logic required by the Counter
Up Counter
Down Counter
Maximum Total
Math Functions
Addition ADD
Addition
R1+R2 ! R3 R1+ 1! R4
Subtraction SUB
1st number 2nd number Total in register
R1± 5! R2 R3±R4 ! R5
Multiplication MUL
Examples
R1 x R2! R3
Division DIV
Whole # Remainder
Using Division and Multiplication Functions Together
Divide
Move
Move Functions
Move
Select Move F5 from the Math/Move function keys
Ladder Diagram Hand-held Programmer
Block Move
R001 0002 R004 R010 R020 R100
R1E 5! R10 O9E 8! O17
Specifying a Location in the Pointer Register
Indirect Move
Select I±Move F7 from the Math/Move function keys
Start Move
Equal
Compare Functions
Examples
Greater
Press Enter to add the function to the program
Logic Operations
Not
Word
Inclusive or IOR
Exclusive or XOR
Shift Register Right
Entering the Number of Positions to Shift
Shift Register Left
Not
Appendix Using Directories
Loading and Saving Files
MICRO.CFG File
Using the Change Directory Function
Hints for a Basic Application
Hints for an Advanced Application
CMD\MICRO\PALLET CMD\MICRO\RIVETER CMD\MICRO\TRANSFER
Appendix Micro PLC Protocol
Communications Files
Memory Addresses
Communications Memory Types and Addresses
Communications Parameters
Special Registers
Read Discretes
Communications Protocol
Data Format
Reply
Write Discretes
Read Analogs
Read Program Memory
Write Analogs
Read Status
Write Program Memory
Status Word
Start Program
Error Reply
Error codes
Stop Program
Communications Functions
Microsoft C Large Model Compile w/ -AL Option
Microsoft C Small Model Compile w/ -AS Option
Turbo C Large Model Compile w/ -ml Option
Turbo C Small Model Compile w/ -ms Option
IBM Compiler Basic
Sample Programs
#include dos.h #include stdio.h #include ªMCROCOMM.Cº
Sample Basic Program
Appendix RTU Protocol
Introduction
Query
Message Types
Transmission Sequence
Broadcast
Station Address
Error Check Field
Message Fields
Function Code
Character Format
Timeout Usage
Message Termination
Cyclic Redundancy Check CRC
Generating Polynomial
Hardware Implementation of CRC-16
Software Calculation of CRC±16
Example CRC±16 Calculation
Address Function CRC±16
Query or Broadcast Message Length Less CRC Code
RTU Message Length
Function Code And Name
Response Message Length Less CRC Code
Message 01 Read Output Table Format
Message Descriptions
Response
Message 02 Read Input Table Format
Message 03 Read Registers Format
Message 04 Read Analog Inputs Format
Message 05 Force Single Output Format
Message 06 Preset Single Register Format
Message 07 Read Exception Status Format
Message 16 Preset Multiple Registers Format
Message 17 Report Device Type Format
Invalid Address Error Response
Communication Errors
Invalid Function Code Error Response
Invalid Query Message
Serial Link Timeout
Invalid Data Value Error Response
Query Processing Failure Error Response
Invalid Transactions
Appendix Communications Using Windows DDE
Limits of the Demonstration Software
Features of the Micro PLC DDE Driver Software
Simple Demonstration using Microsoft Word
Demonstration using Microsoft Excel
Viewing PLC Data in Windows
Writing Values to the PLC from another Application
Viewing PLC Data in another DDE-compliant Application
Ordering Information
Features
Using the Display Software with Micro PLC Net
Overview
Appendix E Data Acquisition, Logging, and Display Program
Equipment Required
Startup
Invoking Display
Display Software Menus
Auto Polling Operation
Changing the Screen Colors
Editing Summary
Manual Mode
Data Format
Reading One Word of Input, Output, or Register Data
Entering Manual Mode
Reading Multiple Bytes of Input, Output, or Register Data
Creating a Bank of Registers for Downloading Data
Writing Data to the Registers
15,T,1
Naming an Auto-polling Screen File
Creating or Editing Autopolling Screens
Specifying an Existing File to Edit
Creating an Auto-polling Screen
Formatting Strings for Auto-polling Screens
Setup for Data Logging During Auto-Polling
Text for Auto-polling Screens
Format
Data Display String Format ± &XYYYYYZN
Example
Data Limits Format ± &L,X,YYYYY,LowLimit,Hilimit
Hilimit
Colors/logtime setup format ± &#,SC,BC,LT
#,SC,BC,LT
System Messages
Creating or Editing System Messages
Specifying the Device to Control System Message Display
Auto-Polling During System Operation
Executing an Auto-polling Screen
Writing a Value to a Register
Changing the Display
Printing the Screen
Forcing an Output
.LOG File
Data Logging
How Data Logging Works
Renaming the .LOG File to Prevent Overwriting Data
Data Type Table, Reference, Data Value
Format of Logged Data
Time Stamp Year, Month, Day, Hour, Minutes, Seconds
Target ID
Error Messages During Operation
Error Writing to Device COM1
Appendix ProgrammingApplications
Application #1 Flip / Flop Toggle Operation
Application #2 Power Up One Shot Start±up Protection
Application #3 Cascading Counters
Application #4 Industrial ªStarting Circuitº
+±± ±±+±±/±±+±±±±±±±±±±+±±±±±±±+±±±±±±±+±± ±±
Index
Index-2
Index-3