How to use cc utility functions – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 72

Chapter 5
Developing Programs
5-12
This section covers CC utility functions of the control coprocessor such as:
initialization
error
handling
ASCII display interface functions
synchronizing a control-coprocessor calling task to a PLC-5
programmable-controller ladder-logic program scan
Initialize ControlĆCoprocessor Function
Use the CC_INIT function to initialize the control coprocessor.
Important: The CC_INIT function must be called before you can use
any other API library function. Call the CC_INIT function first and once
only in your program.
ControlĆCoprocessor Error Functions
Use control-coprocessor error functions for error messages related to error
numbers. See Table 5.K.
Table 5.K
Error Functions
Function
What It Does
CC_ERROR
Provides a pointer to an error message for a corresponding error number
(for all API functions); typically usedin a C routine
CC_ERRSTR
Copies the error message to a corresponding error number to the user local
buffer (for all API functions); typically usedin a BASIC procedure
ControlĆCoprocessor ASCII DisplayFunctions
Use the ASCII display functions to show control-coprocessor status
information on the optional serial expander module display. See Table 5.L.
Table 5.L
ASCII DisplayFunctions
Function
What It Does
CC_DISPLAY_STR
Displays a 4Ćcharacter string on the ASCII display
CC_GET_DISPLAY_STR
Returns the value of the current ASCII display to user buffers
CC_DISPLAY_HEX
Displays a 3Ćcharacter hexadecimal value on the ASCII display
CC_DISPLAY_EHEX
¬
Displays a 4Ćcharacter hexadecimal value on the display
CC_DISPLAY_DEC
¬
Displays a 4Ćcharacter decimal value on the ASCII display
¬
You must know whether the fault displayed is hexadecimal or decimal when you use the 4Ć
character display. For example, if the ASCII display is 1234, it could be either a hexadecimal or
a decimal representation.
How to Use CC Utility
Functions