Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Instrukcja Użytkownika

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Ekwipunek Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M. Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 312
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów

Podsumowanie treści

Strona 1 -   

  User Manual(Cat. No. 1771-DMC, -DMC1, -DMC4, and -DXPS)

Strona 2 - Important User Information

Table of ContentsixAppendix D&&$ - !) +( /%*) '  %),' /

Strona 3 - Summary of Changes

Chapter 66-197. At the Super: prompt of the remote host, type del host.equivand press [Return]. The example deletes the

Strona 4 - Using This Manual

Chapter 6 !!!!6-20Analogy to Client/Server ApplicationA simple analogy to the client/server application is thetime-and-tempera

Strona 5 - Reporting Corrections

Chapter 6 !!!!6-21The following flow chart shows a client/server interface.)! "! !)!

Strona 6 - Chapter 3

Chapter 66-22INTERD is a PCCC INTERCHANGE server daemon that providescommunication between the control coprocessor, its a

Strona 7 - Using the Ethernet Interface

Chapter 6&"''%"'"'%6-23All external access to the control coprocessor’s user memory is throu

Strona 8 - Appendix A

6-24#include <copro.h>typedef struct { unsigned make; char model;

Strona 9

6-25#include ”dtl.h”#define HOSTNAME ”copro2”#define NI_ID 1unsigned char pccc_color[] = { 0x12,

Strona 10 - Software

6-26unsigned char pccc_rpl[275];void main( int argc, char** argv ){ unsigned long iostat;

Strona 11 - Product Overview

Chapter 66-27 union { unsigned tmp; unsigned char c[4]; } u;

Strona 12 - ControlĆCoprocessor Modules

Chapter 77-1Using the Serial PortsThis chapter provides information for setting up communication with theserial ports on both the control coprocessor

Strona 13 - Hardware Overview

Chapter 11-1Introducing the Control CoprocessorThis chapter introduces the applications and functions of the controlcoprocessor. The chapter also cov

Strona 14 - Controller

Chapter 7"#!!#"7-2Prior to Series A Revision E (1.30) of the firmware, all the COMM portson the control coprocessor and ser

Strona 15 - Standalone Mode

Chapter 7% &$!$&%7-3ATTENTION: With eor and eof set to 0, any readln() callyou make in applications never terminates. Use th

Strona 16 - Programming Overview

Chapter 77-4See the OS-9 Operating System User Manual, publication 1771-6.5.102,for information on the scope and lifetime of tm

Strona 17 - ProgramĆDevelopment Software

Chapter 77-5You can use the serial ports for ASCII and other serial communication.Examples of ASCII peripheral devices that you

Strona 18 - Programming Languages

7-6/****************************************************************************** b a r c o d e . c Bar Code R

Strona 19 - Your Control Coprocessor

7-7******************************************************************************* FUNCTIONS CALLED BY THIS PROGRAM:*

Strona 20 - Discharge Damage

7-8 /* Now set up the options on the port for: No Echo No Pause Backspace Char = 0x7F

Strona 21 - Install the ControlĆ

7-9 if ( sts != 0 ){printf ( “BARCODE::Error parsing barcode!\n” );exit ( sts );}/* Loop back to the “readln()” to

Strona 22 - Disposing of the Battery

Chapter 77-10The control coprocessor and the expander support RS-485communications. The modules have the necessary hardware an

Strona 23 - Install the Keying Bands

7-11d. Use _gs_rdy() to verify that the data coming into the inputbuffer is the same as the data that was transmitted.

Strona 24 - Set Switch Configurations

Chapter 1"'%#("'#"'%# #$%#&&#%1-2You can use the control coprocessor for applications such as: c

Strona 25 - Coprocessor

Chapter 77-12Example Code for RSĆ485 Communication/****************************************************************************

Strona 26 - Chapter 2

7-13/*************************************************************************** The sg_parity is a bitfield of 8

Strona 27

7-14* NOTE: Always use a _gs_rdy() call to make sure there are* is enough data to read in

Strona 28 - Wire the Fault Relay

7-15* EXAMPLE: int path;* char out_data[3];* int cnt = 3;* path = open(“/t1

Strona 29 - What to Do Next

7-16 /*** Report that watchdog timed out. All characters not sent in time ***/ if (watchdog == -1) { if

Strona 30 - Getting Started with the

Chapter 77-17Although the control coprocessor and expander are able to communicatesuccessfully with RS-422 devices, the RS-422

Strona 31 - Personal Computer

Chapter 88-1Interpreting Fault Codes and DisplaysThis chapter provides information on the status of the main module and theserial expander module. Th

Strona 32

Chapter 8(- +*+ -$(".&-) ,($,*&2,8-2The following tables provide information for the LEDs on thecontrol-coprocessor main mo

Strona 33

Appendix AA-1ControlĆCoprocessor SpecificationsTable A.1 lists general specifications for the control coprocessor.Table A.1ControlĆCoprocessor Specifi

Strona 34 - Access the PCBridge

0/530-;0130%'44031'%+(+%#5+0/4Appendix AA-2Table A.2 lists products compatible with the control coprocessor.Table A.2Other AllenĆBradley

Strona 35 - Configure Communication

Chapter 15;96,<+15/;0-65;9636796+-::691-3Table 1.B describes the hardware elements for the main module. Table 1.BMainĆModule Hardware Eleme

Strona 36 - CommandĆLine Interface

#"'%# +#$%#&&#%$'#"&Appendix AA-3Table A.4 lists the optional RAM single inline memory modules (SIMMs)th

Strona 37 - Set Time for OSĆ9

A-4Allen-Bradley’s control coprocessor, it is the presence of the UL ListingMark on the individual product

Strona 38 - Configure the

AppendixBB-1Application Program InterfaceLibrary of FunctionsThis appendix provides information on the Application Program Interface(API) library of f

Strona 39

Appendix B B-2The C syntax section in this appendix provides, in C definition format, thearguments for each functi

Strona 40 - Configure System Memory

" Appendix BB-3Gets the updated output-image word and optionally sets the input-image word.Important: Only a si

Strona 41 - Configure the RAM Disk

Appendix BB-4The only bits available for use by the application program are the upper 8bits (10-17). The lower 8 b

Strona 42 - Figure 3.14

Appendix BB-5Responds to a synchronous block-transfer write from a programmable controller.Important: Only a single ta

Strona 43

#**/(!(-,#' +Appendix BB-6ReturnsStatus Symbolic Name Meaning ) *,#(' +- ++!-%   () *,#(&ap

Strona 44

Appendix BB-7BASIC ExampleThe BASIC function code is 34.Important: For BASIC, the data type for the inbuff and trgmask

Strona 45

Appendix BB-8Responds to a synchronous block-transfer read from a programmable controller.Important: Only a single ta

Strona 46

Chapter 1/530&6%+/)5*'0/530-0130%'44031-4Table 1.C describes the hardware elements for the optional serial expander module.Table

Strona 47

#**/(!(-,#' +Appendix BB-9ReturnsStatus Symbolic Name Meaning ) *,#(' +- ++!-%   () *,#(&a

Strona 48 - Create a User Startup File

Appendix BB-10BASIC ExampleThe BASIC function code is 33.Important: For BASIC, the data type for the outbuff and trgm

Strona 49 - Send a Text File to the

##)!!&% $Appendix BB-11Displays an integer value in decimal on the ASCII display of the serialexpander module.C Syntax

Strona 50 - Send the Text File to OSĆ9

Appendix BB-12BASIC ExampleThe BASIC function code is 106.DIM status : INTEGERDIM data :

Strona 51

$$*""'&!%Appendix BB-13Displays an unsigned-integer value in hexadecimal on the ASCII display ofthe se

Strona 52 - Find Other OSĆ9 Commands

Appendix BB-14C Exampleunsigned status;...status = CC_DISPLAY_EHEX (0x301F);...BASIC ExampleThe BASIC function c

Strona 53 - CreateaCTestProgram

$$*""'&!%Appendix BB-15Displays an unsigned-integer value in hexadecimal on the ASCII display.C Syntax#

Strona 54 - Compile a C Test Program

Appendix BB-16BASIC ExampleThe BASIC function code is 104.DIM status : INTEGER...rem * CC_DISPLAY_HEX

Strona 55 - Send a Binary File to the

!!&$#"Appendix BB-17Copies four characters to the ASCII display.C Syntax#include <copro.h>unsigned CC_DI

Strona 56

Appendix BB-18C Exampleunsigned status;char buff [4];...buff[0] = 0x02;buff[1] = ’5’;buff[2] = ’5’;buff[3] = 0x02

Strona 57 - Test Program

Chapter 1#(&$)#($#(&$!$%&$''$&1-5$#(&$! $%&$''$&# &+&( -(-(

Strona 58 - RAM Disk

"! Appendix BB-19Gets a pointer to a NULL-terminated “canned” error message.C Syntax#include <copro.h>char *CC_

Strona 59 - Chapter 4

Appendix BB-20C Exampleunsigned status;unsigned machine1;unsigned iostat;unsigned short parts1;char *err_stg;...status

Strona 60

Appendix BB-21Copies the “canned” null-terminated error message into the user’s local buffer.C Syntax#include <copr

Strona 61 - Developing Programs

Appendix BB-22C Exampleunsigned status, mach1, iostat;unsigned short part1;char err_txt[80];...status = DTL_READ_W (ma

Strona 62 - When to Use API Functions

"))-' ',+"&*Appendix BB-23Gets current expanded status information of the coprocessor.C Syntax#in

Strona 63 - How to Use DTL Functions

Appendix BB-24BASIC ExampleThe BASIC function code is 112.DIM coprostat :INTEGERDIM extstat

Strona 64 - Conversion Functions

""'  %$#Appendix BB-25Copies the characters of the current ASCII display to the user’s buffer.C Syntax

Strona 65 - Utility Function

Appendix BB-26BASIC ExampleThe BASIC function code is 103.DIM status : INTEGERDIM dspbuff(4)

Strona 66 - How to Use BPI Functions

Appendix BB-27Initializes internal data structures and installs trap handler.Important: The CC_INIT function must be ca

Strona 67 - Instructions

Appendix BB-28Requests the PLC-5 programmable controller to perform a block-transferread from an intelligent I/O modu

Strona 68

Chapter 1',*(-#'!,"(',*(%()*(++(*1-6&(, #'$(&&-'#,+ from a remote chassis /#,"

Strona 69 - Table 5.G

,%3$391)165,0(4Appendix B##B-29This parameter returns a final completion status. Possible completionstatus values are shown in the fo

Strona 70 - How to Use TAG Functions

Appendix BB-30BASIC ExampleImportant: For BASIC, the data type for the buff parameter isINTEGER. There is no byte-t

Strona 71 - Lock/Unlock Functions

Appendix BB-31Requests the PLC-5 programmable controller to perform a block-transferwrite to an intelligent I/O modul

Strona 72 - How to Use CC Utility

0)7(7=5-5:904,8Appendix B''!$B-32Value Meaning' "  56,7(9054 *5362,9,+ 8:**,88-:22= ''!

Strona 73 - Status Function

Appendix BB-33BASIC ExampleImportant: For BASIC, the data type for the buff parameter isINTEGER. There is no byte-t

Strona 74 - DirectĆConnect Mode

$,,2*!*/.$) -Appendix BB-34Returns current status of the processor status flags and major fault words. This function can be us

Strona 75 - Sample C Program

Appendix BB-35DescriptionUse CC_PLC_STATUS to get the current PLC-5 programmable- controller status.C Exampleunsig

Strona 76 - 

#"! Appendix BB-36Synchronize with PLC-5 program scan. This function can be used with adirect-connect mode control

Strona 77 - Sample BASIC Program

Appendix BB-37BASIC ExampleThe BASIC function code is 107.DIM status : INTEGER...rem * CC_PLC_SYNC - sync

Strona 78

+$2#280(054+/'3Appendix B"  !B-38Returns current status information of the coprocessor.C Syntax#include <copro.h>unsigned

Strona 79

Chapter 11-7ProgramĆDevelopment SoftwareThe PCBridge software package (1771-PCB) operates on a DOS- basedpersonal

Strona 80

Appendix BB-39C Exampleunsigned coprostat;...coprostat = CC_STATUS();if (!(coprostat & 0x0001)) BAT_LOW_ALARM ();.

Strona 81 - Sample ControlĆLogic Program

Appendix BB-40Adds a definition to the DTL data-definition table.C Syntax#include <copro.h>unsigned DTL_C_DEF

Strona 82

)"/!/6-&-21),%0Appendix B  B-41CC Data Type: Is: CC Data Type: Is: ,- #-,3%/0)-,  ),1 0)',%$ #(!/ 0)&apo

Strona 83 - Connecting Ethernet to

Appendix BB-42BASIC ExampleThe BASIC function code is 2.procedure COPRODIM status : INTEGERDIM fred : INTEGER

Strona 84 - Addresses for the

"((-&!&+*"% )Appendix BB-43Sets the control-coprocessor date and time to the same date and time foundin the PLC-5

Strona 85 - Configuration Files

Appendix BB-44BASIC ExampleThe BASIC function code is 18.procedure COPRODIM status : INTEGER...rem * DTL_CLOCK -

Strona 86 - HOSTS.EQUIV File

  $#"!Appendix BB-45Returns the number of data definitions that can be added to the DTLdata-definition table.C Synt

Strona 87 - PROTOCOLS File

Appendix BB-46BASIC ExampleThe BASIC function code is 4.procedure COPRODIM status : INTEGERDIM num_avail : INTE

Strona 88 - SERVICES File

 Appendix BB-47Gets a floating-point value from a byte array. C Syntax#include <copro.h>unsigned DTL_GET_FLT (i

Strona 89

Appendix BB-48BASIC ExampleImportant: For BASIC, the data type for float_val is REAL.The BASIC function code is 9.p

Strona 90

Chapter 11-8Programming LanguagesYou develop C, BASIC, and assembler programs using the PCBridgesoftware. You can

Strona 91 - STARTINET File

  &#"!Appendix BB-49Gets a word from a byte array.C Syntax#include <copro.h>short DTL_GET_WORD (in_buf)uns

Strona 92 - Ethernet Hardware Address

Appendix BB-50BASIC ExampleImportant: For BASIC, the data type for the word_val parameter is INTEGER.The BASIC fun

Strona 93 - FTP Utility

!!&$#"Appendix BB-51Gets a 3-digit BCD value from a byte array.Important: This function only examines the low-o

Strona 94 - FTP Send Session

Appendix BB-52BASIC ExampleThe BASIC function code is 10.procedure COPRODIM status : INTEGERDIM bcd_buff(2)

Strona 95

  %#"!Appendix BB-53Gets a 4-digit BCD value from a byte array.C Syntax#include <copro.h>unsigned DTL_GET_4BCD

Strona 96

Appendix BB-54BASIC ExampleThe BASIC function code is 11.procedure COPRODIM status : INTEGERDIM bcd_buff(2)

Strona 97 - FTP Get Session

$$)""'&!%Appendix BB-55Creates and initializes the DTL data-definition table.C Syntax#include <copro.h>

Strona 98 - TELNET Utility

Appendix BB-56C Exampleunsigned status; status = DTL_INIT (100); /*creates room for 100DTL data definitions*/BA

Strona 99

""'  %$#Appendix BB-57Puts a floating point value into a byte array. You can use this array to writeto a dat

Strona 100 - Library in C Programs

Appendix BB-58BASIC ExampleImportant: For BASIC, the data type for the float_val parameter is REAL.The BASIC funct

Strona 101 -  !!!!

Chapter 22-1Installing the Control CoprocessorThis chapter provides instructions on how to install yourcontrol-coprocessor main module and serial expa

Strona 102 -  !!!!

Appendix BB-59Puts a word into raw format.C Syntax#include <copro.h>unsigned DTL_PUT_WORD (in_val, out_buf)un

Strona 103 - Using the INTERD

Appendix BB-60BASIC ExampleThe BASIC function code is 12.procedure COPRODIM status : INTEGERDIM word_val :

Strona 104 - Allocation

  %#"!Appendix BB-61Puts a 3-digit BCD value into a byte array.C Syntax#include <copro.h>unsigned DTL_PUT_3BCD

Strona 105 - 

Appendix BB-62BASIC ExampleThe BASIC function code is 14.procedure COPRODIM status : INTEGERDIM bcd_buff(2)

Strona 106

$"! Appendix BB-63Puts a 4-digit BCD value into a byte array.C Syntax#include <copro.h>unsigned DTL_PUT_4BCD

Strona 107

Appendix BB-64BASIC ExampleThe BASIC function code is 15.procedure COPRODIM status : INTEGERDIM bcd_buff(2)

Strona 108 - Using the SNMPD Daemon

)"/!/5-&-21),%0Appendix B  B-65Reads data from the PLC-5 programmable-controller data table to thecontrol-coprocessor memory.

Strona 109 - Using the Serial Ports

Appendix BB-66DescriptionUse the DTL_READ_W function to read data from a PLC-5programmable controller that is directl

Strona 110 - Parameters

' --2+$+0/'*#.Appendix BB-67Reads any elements of a file, one element at a time, from the PLC-5programmable controlle

Strona 111

%++0)").-%(!,Appendix BB-68ReturnsStatus Symbolic Name Meaning  *!+-%)( ,.!,,".& 

Strona 112 - Serial Port

Because of the variety of uses for the products described in thispublication, those responsible for the application and use of this controlequipment m

Strona 113 - Communication

Chapter 2&+,$$#&!,"'&,*'$'(*'++'*2-2Before you install your control coprocessor, select an approp

Strona 114 - 

Appendix BB-69C Exampleunsigned machine;unsigned short parts[10];unsigned iostat; DTL_C_DEFINE (&machine, “N2

Strona 115

&,,1*#*/.&)"-Appendix BB-70Initiates an operation that reads a data element, modifies some of the bits,then writes it

Strona 116

*#0"07.'.32*-&1Appendix B!!B-71ReturnsStatus Symbolic Name Meaning! /&0"2*.- 13$$&11'3+ 

Strona 117

Appendix BB-72C Example/* * Suppose there is a 16-bit “status word” in binary file 10, word 1, * describing the curre

Strona 118 - RSĆ485 Communication

' --2+$+0/'*#.Appendix BB-73Initiates an operation that reads a data element of the PLC-5 programmablecontroller, modi

Strona 119

+$1#18/(/43+.'2Appendix B""" B-74indexThis parameter specifies the element or structure level of the data-fileite

Strona 120 - Chapter 7

Appendix BB-75Invalid Definition ExampleDTL_C_DEFINE (&idl, “N34:3”) /* not specified to element 0 */DTL_C_DEF

Strona 121

 &&*$$)( #'Appendix BB-76Gets the size of memory necessary to store the contents of a data item incontrol coprocessor

Strona 122

Appendix BB-77C Exampleunsigned status;unsigned size;unsigned integer_file;short *integer_data;...status = DTL_SIZE (in

Strona 123

&,,1*#*/.&)"-Appendix BB-78Gets the control-coprocessor data type of the named data.C Syntax#include <copro.h>uns

Strona 124

Chapter 22-3The 1770-XYC battery ships with the control coprocessor and requiresspecial handling. See Allen-Bradle

Strona 125 - RSĆ422 Communication

Appendix BB-79C Exampleunsigned status;int counter_id;int data_type;...status = DTL_TYPE (counter_id, &data_type);.

Strona 126 - ASCII Display

%%)##('"&Appendix BB-80Deletes a data definition from the DTL data-definition table.C Syntax#include <copro.h&

Strona 127 - Status for LEDs

Appendix BB-81BASIC ExampleThe BASIC function code is 3.procedure COPRODIM status : INTEGERDIM analog : INTEGER.

Strona 128 - Product Specifications

#)).' ',+#&*Appendix BB-82Writes data from the control-coprocessor memory to the PLC-5programmable -controller dat

Strona 129 - ControlĆCoprocessor

' --3+$+0/'*#.Appendix BB-83ReturnsStatus Symbolic Name Meaning ,#-/'+* .0!!#..$0(  /

Strona 130 - UL Certification

Appendix BB-84BASIC ExampleThe BASIC function code is 6.procedure COPRODIM status : INTEGERDIM fred : IN

Strona 131 - 

$**/(!(-,$' +Appendix BB-85Writes to any elements of a file, one element at a time, from thecontrol-coprocessor memory t

Strona 132 - Library of Functions

(!. .4,%,10(+$/Appendix BB-86ReturnsStatus Symbolic Name Meaning  -$. 0(,+ /1""$//%1)   0

Strona 133 - Using Pointers

Appendix BB-87Invalid Definition ExampleDTL_C_DEFINE (&idl, “N34:3”) /* not specified to element 0 */DTL_C_DEFINE (&idl

Strona 134 - BPI_DISCRETE

""'  %$#Appendix BB-88Clears the bit associated with the specified message number.C Syntax#include <copro

Strona 135 - References

Chapter 22-47. Using an erasable marker, record the battery-installation date.5. Place the battery and the wires in

Strona 136 - BPI_READ

Appendix BB-89BASIC ExampleThe BASIC function code is 44.DIM status : INTEGERDIM msg_w_mask : INT

Strona 137 - Description

Appendix BB-90Handles a PLC-5 programmable-controller message-read instruction.C Syntax#include <copro.h>

Strona 138

0)6(6;4- 49803,7Appendix B!' ' B-91cc_typeThis is the data type of the control-coprocessor data buffer. Possible values ar

Strona 139 - BPI_WRITE

'!- -2+%+0/'*$.Appendix BB-92ReturnsStatus Symbolic Name Meaning ,$- /'+* .0""$..%0( 

Strona 140

Appendix BB-93BASIC ExampleThe BASIC function code is 41.DIM status : INTEGERDIM iostat :

Strona 141

Appendix BB-94Handles a PLC-5 programmable-controller generated message-read instruction.C Syntax#include <

Strona 142 - CC_DISPLAY_DEC

/(5'5:3,387/2+6Appendix B &&$&B-95cc_typeThis is the data type of the control-coprocessor data buffer. Possible

Strona 143

,%2$280)054,/(3Appendix B## #B-96ReturnsStatus Symbolic Name Meaning# 1(2$4,0/ 35&&(33)5- ##  &a

Strona 144 - CC_DISPLAY_EHEX

Appendix BB-97C Exampleshort variable [4] /* buffer to store read data */unsigned timeout = 45; /* 45 second

Strona 145

##(!!&% $Appendix BB-98Sets the bit associated with the specified message number.C Syntax#include <copro.h>unsigne

Strona 146 - CC_DISPLAY_HEX

Chapter 2%)*##!%* &%*(&#&'(&))&(2-5You receive plastic keying bands with each I/O chassis. Insert the keyingband

Strona 147

Appendix BB-99BASIC ExamplesThe BASIC function code is 45.DIM status : INTEGERDIM msg_w_mask : IN

Strona 148 - CC_DISPLAY_STR

! Appendix BB-100Tests the bit associated with the specified message number.C Syntax#include <copro.h>status =

Strona 149

Appendix BB-101BASIC ExampleThe BASIC function code is 46.DIM status : INTEGERDIM msg_w_mask : IN

Strona 150 - CC_ERROR

Appendix BB-102Wait for one or more messages to complete.C Syntax#include <copro.h>unsigned MSG_WAIT (r_mask,w_ma

Strona 151

 Appendix BB-103w_rslt_maskBit map of the results from the requested write message instructions.Bit 0 = message 0; bit 3

Strona 152 - CC_ERRSTR

Appendix BB-104 status = MSG_WRITE_HANDLER ( &write_var, sizeof (write_var), 1, 1, 45,

Strona 153

Appendix BB-105Handles a PLC-5 programmable-controller message-write instruction.C Syntax#include <copro.h&

Strona 154 - CC_EXPANDED_STATUS

0)6(6;4- 49803,7Appendix B!'% "' B-106cc_typeThis is the data type of the control coprocessor’s data buffer. Possible

Strona 155

(".!.3,&,10(+%/Appendix B  B-107ReturnsStatus Symbolic Name Meaning  -%.!0(,+ /1##%//&1)    

Strona 156 - CC_GET_DISPLAY_STR

Appendix BB-108BASIC ExampleThe BASIC function code is 43.DIM status : INTEGERDIM iostat

Strona 157

Chapter 2"&' "'#"'%# #$%#&&#%2-6The COMM0 port has no switches to configure.Set the COMM1 swi

Strona 158 - Appendix B

Appendix BB-109Handles a PLC-5 programmable-controller generated message-write instruction.C Syntax#include

Strona 159 - CC_PLC_BTR

/(5'5:3,387/2+6Appendix B &$!&$&B-110cc_typeThis is the data type of the control-coprocessor’s data buffer. Poss

Strona 160

,%2$280)054,/(3Appendix B# # #B-111ReturnsStatus Symbolic Name Meaning# 1(2$4,0/ 35&&(33)5- ## 

Strona 161

Appendix BB-112BASIC ExampleThe BASIC function code is 42.DIM status : INTEGERDIM iostat

Strona 162 - CC_PLC_BTW

 Appendix BB-113Zeros all bits in the specified mask.C Syntax#include <copro.h>unsigned MSG_ZERO_MASK (mask)u

Strona 163

Appendix BB-114BASIC ExampleThe BASIC function code is 47.DIM status : INTEGERDIM msg_r_mask : I

Strona 164

Appendix BB-115Returns the number of TAG definitions available in the TAG table.C Syntax#include <copro.h>un

Strona 165 - CC_PLC_STATUS

$$(""'&!%Appendix BB-116Adds an entry to the control-coprocessor TAG table.C Syntax#include <copro.h>

Strona 166

#))0' ',+#&*Appendix BB-117ReturnsValue Symbolic Name Meaning ()+#'& *,** ,$ 

Strona 167 - CC_PLC_SYNC

Appendix BB-118BASIC ExampleThe BASIC function code is 60.DIM status : INTEGERDIM tag_id : INTE

Strona 168

Chapter 2 !!! 2-7Install the control coprocessor in either direct-connect or standalone mode.If you want to: Then select

Strona 169 - CC_STATUS

$$(""'&!%Appendix BB-119Removes a TAG or TAGs from the TAG table defined by any calling process.C Syn

Strona 170

Appendix BB-120BASIC ExampleThe BASIC function code is 62.DIM status : INTEGER...rem * TAG_GLOBAL_UN

Strona 171 - DTL_C_DEFINE

  $#"!Appendix BB-121Gets the handle from TAG name.C Syntax#include <copro.h>unsigned TAG_LINK (name_id,tag_name)u

Strona 172

Appendix BB-122C Exampleunsigned status;unsigned fred_id;...status = TAG_LINK (&fred_id,“Fred”);BASIC ExampleThe BA

Strona 173

")).' ',+"&*Appendix BB-123This function locks the requested TAG memory area.C Syntax#include <copro.h&g

Strona 174 - DTL_CLOCK

Appendix BB-124C Exampleunsigned name_id;register int x; /* loop counter */unsigned status; /* status return */int Fred

Strona 175

$++2)!).-$( ,Appendix BB-125Reads data from a user’s TAG memory area. C Syntax#include <copro.h>unsigned TAG_READ (tag,offset,

Strona 176 - DTL_DEF_AVAIL

Appendix BB-126DescriptionUse the TAG_READ function to read data from a tagged memory area.This function guarantees tha

Strona 177

%,,3*"*/.%)!-Appendix BB-127Reads data from a user’s TAG memory area after the TAG is written by TAG_WRITE_W. C Syntax#includ

Strona 178 - DTL_GET_FLT

Appendix BB-128DescriptionUse the TAG_READ_W function to read data from a tagged memory area.This function waits unti

Strona 179

Chapter 2#$$ $"  !" ## "2-8Connect Control Coprocessor to Programmable ControllerTo connect the control coprocessor

Strona 180 - DTL_GET_WORD

!&&*$$)(!#'Appendix BB-129Removes a TAG or TAGs from the TAG table defined by the calling process.C Syntax#include &

Strona 181

Appendix BB-130BASIC ExampleThe BASIC function code is 61.DIM status : INTEGER...rem * TAG_UNDEF - undefine

Strona 182 - DTL_GET_3BCD

"((,&&+*"%)Appendix BB-131This function unlocks the requested TAG memory area.C Syntax#include <copro.h>

Strona 183

Appendix BB-132C ExampleSee the TAG_LOCK() example on page B-123.BASIC ExampleThe BASIC function number is 70.DIM sta

Strona 184 - DTL_GET_4BCD

(!/ /6-%-21(,$0Appendix BB-133Writes data to a user’s TAG memory area.C Syntax#include <copro.h>unsigned TAG_WRITE (tag,offset,

Strona 185

Appendix BB-134DescriptionUse TAG_WRITE to write data to a tagged memory area. This function guarantees that the writ

Strona 186 - DTL_INIT

(!/ /6-%-21(,$0Appendix BB-135Writes data to a user’s TAG memory area then waits for it to be read by a TAG_READ_W.C Syntax#include

Strona 187

Appendix BB-136DescriptionUse TAG_WRITE_W to write data to a tagged memory area. Thisfunction writes the data, then

Strona 188 - DTL_PUT_FLT

)"/!/6-&-21),%0Appendix B//-/ !*2%0B-137The following Table B.A lists all error codes (DTL, CC, and PCCC) forthe control coprocesso

Strona 189

0)7(7>5-5:904,8Appendix B 77578B-138DecimalValueHexValueSymbolic Name Description '  56,7(9054 04 675.7,88  

Strona 190 - DTL_PUT_WORD

Chapter 2!"""  !! 2-9Install the Direct-Connect Control CoprocessorTo install the PLC-5 programmable controll

Strona 191

&..5+#+10&*"/Appendix B ..+./B-139DecimalValueHexValueSymbolic Name Description  ")+0" /00&

Strona 192 - DTL_PUT_3BCD

#**1( (-,#'+Appendix B **(*+B-140DecimalValueHexValueSymbolic Name Description  *++ * *' 0#+,+ ,(

Strona 193

.'5&5;3+387.2*6Appendix B 82(7.32 3)*6B-141The following Table B.B lists the BASIC function codes.Table B.BBASIC Function Code

Strona 194 - DTL_PUT_4BCD

-&5%5<2*287-1)6Appendix B 81'7-21 2()6B-142Function Name FunctionNumberDescription$ )*-1) 6<0&2/-'

Strona 195

Appendix CC-1Cable ConnectionsThis appendix provides pin assignments for ports on the main module and the serial expander module. This appendix also

Strona 196 - DTL_READ_W

!$##($#'Appendix CC-2Figure C.1Cable for a 9ĆPin IBM PC/AT, T50, T60, or T47 Computerto the Control Coprocessor 9ĆPin COMM0 Port

Strona 197

!#""% #"$Appendix CC-3Table C.B provides the pin assignments for the 25-pin COMM1, COMM2, and COMM3 (/t1, /t2, /t3) ports on th

Strona 198 - DTL_READ_W_IDX

%('',#('+Appendix CC-4Cable Length RequirementsRefer to Table C.C for information on the cable lengths that you can usewith the

Strona 199 - Invalid Definition Example

% ('' +#('*Appendix CC-5Table C.D provides pin assignments for connecting the transceiver to theEthernet port.Table C.DPin Assign

Strona 200

Appendix DD-1Using the PCBridge SoftwareThis appendix provides additional information about using the PCBridgesoftware. Getting started using the sof

Strona 201 - DTL_RMW_W

Chapter 22-10Standalone InstallationYou can place the control coprocessor in any available slot in the I/Ochassis w

Strona 202

*"& +!)" '+.)Appendix DD-2Edit Key DefinitionsUse k) Edit Key Definitions to edit the function-key definition file,PC

Strona 203

( $)' %),'Appendix DD-3To use any of the special characters literally, enter a circumflex (^) and anaccent grave (‘) charac

Strona 204 - DTL_RMW_W_IDX

Appendix DD-4The L) Load Memory Module option loads an OS-9 memory moduleproduced by the cross-compiler or cross-assembler.

Strona 205

Appendix DD-5Important: A wildcard specified on a receive is processed by Kermit onthe OS-9 target. A wildcard specified

Strona 206

Appendix DD-6Use the T) Modify Transfer List option to create, edit, or view the current transfer list. See page D-4 for t

Strona 207 - DTL_SIZE

Appendix DD-7For example, a build list (BUILD.LST) might look like Figure D.5.Figure D.5Build ListPCBridge Microware

Strona 208

Appendix DD-8Once you have logged in and changed to the desired directory:1. Press [F1] to get the PCBridge main menu.2. S

Strona 209 - DTL_TYPE

Appendix DD-9After HELLO is transferred, the PCBridge software looks for the symbolmodule created by the cross C compiler.

Strona 210

-$(".# ,$" )!.1, Appendix DD-10XCCThe following options are in the cross-compiler executive (XCC):Option Description6!)-.,$("

Strona 211 - DTL_UNDEF

2).'3(%1)$'%/&36!1%Appendix DD-11Use the following table to identify PCBridge problems and apply the solution.Problem Solution(

Strona 212

Chapter 22-11Relay Contact Output Modules Product Data, publication 1771-2.181, formore information.The control cop

Strona 213 - DTL_WRITE_W

Appendix DD-12Convert Binary Files to S-Record File/S-Record to BinarySyntaxbinex [<opts>] [<inpath>] [<outp

Strona 214

Appendix DD-13Using either command, if both paths are omitted, standard input and outputare assumed. If the second path is

Strona 215

+#&!,"*#!' ,/*Appendix DD-14Convert Text File EOL Characters to UNIX, DOS, or OS-9Syntaxcudo [<opts>] {<file name&

Strona 216 - DTL_WRITE_W_IDX

)!%* (!&*-(Appendix DD-15Fix Module CRC and ParitySyntaxfixmod [<opts>] {<modname> [<opts>]}Functionfixmod verif

Strona 217

Appendix DD-16Each of these sections is divided into four fields from right to left:read attributewrite attributeexecute at

Strona 218

Appendix DD-17Print OS-9 Module IdentificationSyntaxident [<opts>] {<modname>}Functionident displays module hea

Strona 219 - MSG_CLR_MASK

Appendix DD-18Each of these sections is divided into four fields from right to left:read attributewrite attribute execute a

Strona 220

Appendix DD-19Merge File to MERGE.OUT FileSyntaxmerge [<opts>] {<path>}Functionmerge copies multiple input file

Strona 221 - MSG_READ_HANDLER

Appendix DD-20List Names to stdout or fileSyntaxnames <names> /* list names to stdout */ornames <names> [>&l

Strona 222 - Possible values are:

%!&$"&($Appendix DD-21Compare Binary FilesSyntaxos9cmp [<opts>] <path1> <path2>Functionos9cmp opens

Strona 223

Summary of ChangesiSummary of ChangesThis edition of this publication contains new and updated information.To help you find new and updated informatio

Strona 224

Chapter 33-1Getting Started with thethe Control CoprocessorThis chapter provides instructions on how to set up your controlcoprocessor for communicati

Strona 225 - MSG_READ_W_HANDLER

Appendix DD-22Formatted File Data Dump in Hexadecimal and ASCIISyntaxos9dump [<opts>] [<path>] [<addr>]Fu

Strona 226

Appendix DD-23ExamplesThe following is sample output from the command:C>os9dump hello.c (starting (data bytes in hexade

Strona 227

IndexI-1Numbers25-pin COMM1, 2, 3 (/t1, /t2, t3)ports, cable connections, C-39-pin COMM0 (/TERM) port, cableconnections, C-1AAccess Unit Interface cab

Strona 228

I-2C return values, B-137C test programcompiling, 4-2creating, 4-1cables, C-1configurations25-pin COMM1, 2, 3 (/t1, /t2, /t3)ports, C-49-pin COM

Strona 229 - MSG_SET_MASK

I-3configuring (continued)system memorymodule memory, 3-15non-volatile, 3-11RAM disk, 3-12user memory, 3-13confirming, file passage, 4-5connectin

Strona 230 - BASIC Examples

I-4DTL_DEF_AVAIL, 5-3, B-45DTL_GET_3BCD, 5-5, B-51DTL_GET_4BCD, 5-5, B-53DTL_GET_FLT, 5-5, B-47DTL_GET_WORD, 5-5, B-49DTL_INIT, 5-3, B-55DTL_PUT_

Strona 231 - MSG_TST_MASK

I-5initialize control coprocessorfunctions, CC utility, 5-12installingbattery, 2-3control coprocessor, 2-1direct-connect mode, 2-7standalone mod

Strona 232

I-6MSG_WAIT, B-102MSG_WRITE_HANDLER, 5-9,B-105MSG_WRITE_W_HANDLER, 5-9,B-109MSG_ZERO_MASK, B-113NETWORKS file, configuration files,Ethernet, 6-6

Strona 233 - MSG_WAIT

I-7PCBridge (continued)utilities (continued)os9dump, D-22view, transfer list, D-6wildcards, D-4PLC programmable controllerdirect-connect mode, 1-

Strona 234

I-8serial expander module (continued)ASCII display, 8-1LEDs, 8-2keying bands, installing, 2-5keyswitch, 1-4LEDs, 1-4removing, control coprocessor

Strona 235

Chapter 3''"'%')''#"'%# #$%#&&#%3-2Connect the programming terminal to the

Strona 236 - MSG_WRITE_HANDLER

I-9TAG_UNLOCK, 5-11, B-131TAG_WRITE, 5-11, B-133TAG_WRITE_W, 5-11, B-135Telnet utility, 6-17text filecreating, 3-20sending, 3-21tmode, communicat

Strona 237 - 0)6(6;4- 49803,7

ASCII Character CodesChar Decimal Hex Char Decimal Hex Char Decimal Hex Char Decimal Hex[ctrlĆ@] NUL0 00 SPACE 32 20 @ 64 40 ` 96 60[ctrlĆA] SOH 1 01!

Strona 238

720=4, •=209?49, •@>?=,74, • @>?=4, •,3=,49 • 0724@8 •=,E47 • @72,=4, • ,9,/, • 3470 • 349, "$ • :7:8-4, • :>?, $4., • =

Strona 239

Chapter 33-3See Appendix D for more information. See Chapter 5 and Appendix B formore information on the

Strona 240 - MSG_WRITE_W_HANDLER

Chapter 3$$$"$%$$ $"  !" ## "3-4Figure 3.3Download the PCBridge Software6. Press [Return] to begin insta

Strona 241 - /(5'5:3,387/2+6

Chapter 33-5Access the PCBridge software from the DOS command line by typing pcband pressing [Return]. S

Strona 242

Chapter 33-6To configure parameters for the communication interface between thepersonal computer and the

Strona 243

Chapter 33-73. On the PCBridge Communications Parameters screen, select theparameters for communication w

Strona 244 - MSG_ZERO_MASK

Chapter 33-8Figure 3.8OSĆ9 CommandĆLine Interface Utility HelpWelcome to PCBridgePCBridge Microw

Strona 245

Chapter 3 3-9Create a Test DirectoryAt the $ prompt, type makdir followed by a space and the name of thete

Strona 246 - TAG_DEF_AVAIL

Chapter 33-10Configure the Default Startup ParametersConfigure the default startup parameters of the cont

Strona 247 - TAG_DEFINE

PrefaceiiiUsing This ManualUse this manual to help you install, configure, and operate your controlcoprocessor. This manual shows you examples of scr

Strona 248

Chapter 33-11Configure System MemoryConfigure the control coprocessor system memory using the MEM_CFGutil

Strona 249

Chapter 33-12RAM DiskThe RAM disk is an emulated drive that resides in Random AccessMemory (RAM). You ca

Strona 250 - TAG_GLOBAL_UNDEF

Chapter 33-13Non-Volatile User MemoryThis is a non-volatile area of memory that is not known to the opera

Strona 251

3-14Non-Volatile Memory Example User Program MY_MEM.C#include <time.h>

Strona 252 - TAG_LINK

Chapter 33-15ATTENTION: This program illustrates the use of non-volatileuser memory in its simplest for

Strona 253

Chapter 33-16NVMM UtilityWith the NVMM utility, you can: move modules from OS-9 to non-volatile module m

Strona 254 - TAG_LOCK

Chapter 33-17Figure 3.17NVMM Session (2 of 3)$Non-Volatile Module Memory Menu Selection------------------

Strona 255

Chapter 33-18See Figure 3.19 for an example MY_MEM boot screen. See page 3-14 forthe source file, MY_MEM

Strona 256 - TAG_READ

Chapter 33-19Use the CC_STATUS utility to view the current status of the controlcoprocessor. See Figure

Strona 257

Chapter 33-20Set Up a Password FileAfter the control coprocessor executes the startup file, it executes t

Strona 258 - TAG_READ_W

PrefaceivTable 2BASIC Programming Reference (D1771ĆL01)Manual Contents PublicationNumber2 )*,#'! 1+,& +* '-%0)%#'+ ,

Strona 259

Chapter 33-21Send the Text File to OSĆ9To send the TEST.TXT file to the OS-9 RAM disk:1. Select S) Send f

Strona 260 - TAG_UNDEF

Chapter 33-223. Select the file transfer type T) Text. See Figure 3.24.Figure 3.24Select File Transfer T

Strona 261

Chapter 33-235. At the $ prompt, type dir and press [Return]. Observe that the text file was successfull

Strona 262 - TAG_UNLOCK

Chapter 44-1Using the Programming EnvironmentThis chapter provides an example of creating and compiling a C programusing the PCBridge software and the

Strona 263

Chapter 44-2Figure 4.1C Test ProgramThis example creates a test file named HELLO.C.4. Use the exit function on your

Strona 264 - TAG_WRITE

Chapter 44-3The C cross-compiler function compiles the test file. See Figure 4.3.Figure 4.3Cross Compiling C Test

Strona 265

Chapter 44-4In OS-9, you type the full file name to execute the command. In ourexample, the full file name is HELLO

Strona 266 - TAG_WRITE_W

Chapter 44-5To confirm that the C file is resident in the control coprocessor:1. Select O) OS-9 Terminal on the PCBr

Strona 267

Chapter 44-6The following example program—HELLO.BAS—is the BASIC version ofthe C example program.rem hello.basrem

Strona 268 - Error Values

Chapter 44-7Example Program to Access RAM DiskRefer to the following C program (CAT.C) as an example of accessing th

Strona 269 - 0)7(7>5-5:904,8

Table of ContentsvChapter 1(!/2%0 "*%#2)4%1 80.$3#2 4%04)%5 8

Strona 270

Chapter 4!"  $ "4-8 /* * Now, as long as we have files on the command line to process, * open them,

Strona 271 - #**1( (-,#'+

Chapter 55-1Developing ProgramsThis chapter describes the library of commands and executable functionsavailable with the control coprocessor. You wil

Strona 272 - BASIC Function Codes

Chapter 5-#&'!%)&)$*5-2The Application Program Interface (API) is a set of library routines used tointerface your programs with

Strona 273

Chapter 5(!" $!$%5-3Use the DTL library of commands to access real-time data from the datatable of a direct-connect PLC-5 programmabl

Strona 274 - Cable Connections

Chapter 5& !" "#5-4Table 5.DDTL Read/Write Access FunctionsFunction What It Does Why You Need It When You Use It

Strona 275

Chapter 5-$'("& )' )%*5-5Table 5.EDTL Conversion FunctionsFunction What It Converts0/+ ))/ +' !'*

Strona 276 - COMM1, 2, and 3 Ports

Chapter 55-6The control coprocessor communicates with a standalone-modeprogrammable controller using backplane-interface (BPI) fun

Strona 277 - Cable Configurations

Chapter 55-7The control coprocessor can receive unsolicited messages from the PLC-5programmable controller. Two types of messages

Strona 278 - Ethernet Port

Chapter 5%!" #!#$5-8Figure 5.1MSG Instruction DataĆEntry Screen (MG Control Block) MESSAGE INSTRUCTION DATA ENTRY FOR CONT

Strona 279 - Using the PCBridge Software

Chapter 5* #$"&#&!'5-9This section defines the MSG functions that process unsolicited messagesfrom a PLC-5 programmable co

Strona 280 - Edit Key Definitions

Table of ContentsviChapter 4(!03%1 "*%#3)5%2 91%!3%!%231/'1!- 9

Strona 281 - Toggle the Status Line

Chapter 5-$'("& )' )%*5-10For example, a PLC-5 programmable controller initiates an unsolicitedREAD MSG instruction to the c

Strona 282 - OSĆ9 Terminal

Chapter 5) #$"%#%!&5-11Important: For the 1771-DMC1 and -DMC4 modules, the default sizeallows you to create 1024 TAGs; the -DMC mo

Strona 283 - T) Modify Transfer List

Chapter 5!0!'*+%)#,*#,(-5-12This section covers CC utility functions of the control coprocessor such as: initialization error handling ASCI

Strona 284 - Modify Build List

Chapter 55-13Synchronization FunctionUse the CC_PLC_SYNC function to synchronize the control-coprocessorcalling task to the PLC-5

Strona 285 - Using the Debugger

Chapter 5+"%& $'%'#(5-14In direct-connect mode, the control coprocessor can communicate directlywith a PLC-5 programmable

Strona 286

Chapter 55-15Link API Functions to ProgramsIn C and assembler programs, ABLIB.L provides the interface (link) to thelibrary of con

Strona 287 - Compiler Options

5-16/*********************************************************************** DTL_W_R.C — This program uses both the DTL_

Strona 288

" " # $# $!  & Chapter 5% !!"5-17Sample BASIC ProgramThe following is a BASIC progr

Strona 289 - PCBridge Utilities

Chapter 5'!" #!#$5-18In standalone mode, use BPI_ functions to communicate with aprogrammable controller.ATTENTION: The contro

Strona 290 - Function

5-19Important: The CC_INIT function is used in the following program. Call the CC_INIT function first and once only in

Strona 291 - Examples

Table of ContentsviiChapter 8,%36)4 &.)'6-8)5 ;)4-%/ 93%1()4 2(7/)  -53/%: ;

Strona 292 - Functions

Chapter 5% !!"5-20Sample BASIC ProgramThe following is a BASIC programming example. It uses bothBPI_WRITE and BPI_READ functions

Strona 293

Chapter 55-21Sample ControlĆLogic ProgramThe following is a control-logic programming example. This control-logicprogram initiate

Strona 294 - See Also

Chapter 66-1Using the Ethernet InterfaceThis chapter provides an overview of the Ethernet local area networkcapability of the control coprocessor. It

Strona 295

Chapter 6& $''%$'$'%6-2OS-9/Internet provides utilities for file transfer (FTP) and terminalconnection (TELN

Strona 296

Chapter 66-3You must have two separate and unique addresses for the control-coprocessor Ethernet port: software configur

Strona 297

Chapter 66-4Make a list of all the hosts with their IP addresses that are on the samephysical network as the control copr

Strona 298

Chapter 66-5Figure 6.1List of Hosts on NetworkHOSTS.EQUIV FileThe file C:\INET\HOSTS.EQU is required for the OS-9 Interne

Strona 299

Chapter 66-6NETWORKS FileChange file C:\INET\NETWORKS to include a line for the network towhich the control coprocessor w

Strona 300

Chapter 66-7Figure 6.4List of PROTOCOLS FileSERVICES FileThe file C:\INET\SERVICES contains standard Internet information

Strona 301

Chapter 66-8Figure 6.5List of SERVICES File (Sheet 1)Figure 6.6List of SERVICES File (Sheet 2)

Strona 302

Table of ContentsviiiDTL_READ_W BĆ65...DTL_READ_W_IDX BĆ67...DTL_RMW_W BĆ70...

Strona 303

Chapter 66-9Figure 6.7List of SERVICES File (Sheet 3)Figure 6.8List of SERVICES File (Sheet 4)

Strona 304

Chapter 66-10STARTINET FileThe STARTINET procedure file is used to start the network.Edit the second (setip) line of file

Strona 305

Chapter 66-11The STARTINET procedure file is used to start the network. This fileindicates which network daemons—e.g., F

Strona 306

Chapter 66-12Figure 6.10List Ethernet Hardware AddressTo download the Ethernet configuration files to the control coproce

Strona 307

Chapter 66-13FTP Send SessionThe following example shows how you might conduct an FTP send session:Important: The follow

Strona 308

Chapter 66-14Figure 6.12FTP Help5. At the ftp prompt, type connect and press [Return]. SeeFigure 6.13.Figure 6.13Connect

Strona 309

Chapter 66-1510. At the ftp prompt, type dir and press [Return] to get a list of filesin the remote directory. See Figur

Strona 310

Chapter 66-16FTP Get SessionThe following example shows how you might conduct an FTP get session.Important: The followin

Strona 311 - ASCII Character Codes

Chapter 66-17This utility provides user-interface communication to other nodes on theInternet system. The TELNET utility

Strona 312

Chapter 66-18Figure 6.18TELNET Connection to Remote Network4. At the (to) prompt, enter the name of the the remote host t

Komentarze do niniejszej Instrukcji

Brak uwag