Peripheral Devices
550
9836 3521 01
8.14.4
Api object
The
Api
object represents the root of the PowerMACS API and is the only object in the interface that can
be created, or instantiated, by your client application.
Using the
Api
object your application get a description of the PowerMACS system that the
Api
currently is
connected to, read and write PLC data and access Process data, such as Cycle data, Trace and Events.
For any method of the
Api
object to function you must be connected to a PowerMACS target system.
Which TC to connect to is controlled using the property
IpAddress
. Normally you connect to the system
node, that is, the System TC. However, in order to access the PLC of another station but the first (which
always executes on the System TC) you must connect to the TC on which the station in question runs.
The following methods do only function if connected to the System TC:
If called when not connected to a System TC they will return
eRetCmdNotAllowed
.
8.14.4.1 Properties
The following table lists all properties on the
Api
object:
Property Name
Return Type
Description
IpAddress
String
This is the IP-address of the target that the Api will communicate to.
It should be the IP-address of the System TC a Station TC.
Must be set prior to any other call to an API-method.
DeviceInstance
DeviceInstanceEnum
This property points out which API device on the target that the API
should communicate with. Should correspond to the value of the
parameter "Port No" on the targets API device. Its default value is
eDevPrimary.
The syntax for accessing the properties of the
Api
object is as follows:
object
.
PropertyName
where
object
is an expression that evaluates to an object of type
Api
.
Summary of Contents for PowerMACS 4000
Page 2: ......
Page 46: ...System Architecture 46 9836 3521 01...
Page 267: ...Tightening 9836 3521 01 267...
Page 400: ...Tightening 400 9836 3521 01...
Page 486: ...Peripheral Devices 486 9836 3521 01...
Page 622: ...Peripheral Devices 622 9836 3521 01...
Page 664: ...References 664 9836 3521 01...
Page 668: ...9836 3521 01 2010 11 Edition 10 3 0 www atlascopco com...