ACR Binary Host Interface - 7000 and IPA

Products: ACR7000, IPA (also applies to ACR9000 family using Ethernet)

The ACR controllers can be interfaced to a PC application through the provided COM object. The controller is delivered with a software development kit called Parker Motion Manager, which installs the COM object: ComACRserver. The ComACRserver provides methods and functions that allow the user to create custom PC applications in VB, C++, .NET,LabView, etc to command the controller via Ethernet, USB, or serial.  

The ComACRserver is a wrapper for the lower level communication called the Binary Host Interface. Most application will use the ComACRserver but some programmers prefer to use the native Binary commands directly. Using the Binary Host Interface natively allows users to optimize the performance of applications by eliminating the COMACRservers overhead. It also provides a communication option for non-Windows applications (e.g. Linux) as the ComACRserver uses the MS COMobject model.

 

 

Ethernet:

Details about Ethernet communications to the ACR controller can be found in the Ethernet Spec which describes the base level TCP and UDP connections and data formats.

Port 5002 is an ASCII connection. With this connection you could send any Acrobasic command to the controller as if you were in the terminal emulator in Parker Motion Manager.

Port 5006 is a managed binary connection that expects to see commands in a specific format. 5006 is well suited for PC applications and constructing drivers.

 

Details about the Binary Host Interface can be found in the ACR Programmers Guide within Parker Motion Manager on-line help. Below is a summary of the functionality.

 

Binary Data Overview

The binary data transfers consist of a control character ( Header ID ) followed by a stream of data . During binary transfers to the controller, the delay between bytes must be no more than the communications timeout setting for the given channel. If the timeout activates, the transfer is thrown out and the channel goes back to waiting for a normal character or a binary header ID. The default communication timeout is 50 milliseconds.

 Ethernet connections are made to Port 5006 to use the Binary Host. All messages must be in four-byte packets. The user should pad commands with null bytes as needed to meet the four-byte requirement. 

The most common commands used are Binary Parameter Access, SET and CLR and Data Packets.

 

Binary Data Packets

                Used to query blocks of parameters from the controller.

Example. Request actual position for axes 0-3;

Byte 0

( 0x00 )

Byte 1

Group Code = 0x30

Byte 2

Group Index =0x02

Byte 3

Isolation Mask = 0x01+0x02+0x04+ 0x08 = 0x0F

 

Send to controller : 00 30 02 0F

Reply from controller : 00 30 02 0F  + 16 BYTES

Binary Parameter Access

Read and write single parameter values.

Binary parameter access provides a method of reading from and writing to single system parameters on the controller. Unlike binary data packets, binary parameter access uses the actual parameter number. There are no groups or masks.
A parameter access header consists of a Header ID ( 0x00 ) followed by a Packet ID code and a 2-byte parameter. The Packet ID codes for the different types of packets are shown below. The following pages define each of the packets in detail.

Packet ID Codes

 

Code

Packet Type

Description

0x88

Binary Get Long

Receive long integer from controller

0x89

Binary Set Long

Send long integer to controller

0x8A

Binary Get Float

Receive Float value from controller

0x8B

Binary Set Float

Send Float value to controller

When using the Binary Parameter Access, the parameter is converted to hex. The parameter is a 2-byte value sent low-order byte first. Here are some examples:

P12288(current position, axis0) converts to 30 00. Request is sent to controller as 00 88 00 30
P12546(actual position, axis1) converts to 31 02. Request is sent to controller as 00 88 02 31
P8193(vector velocity) converts to 2001.  Request is sent to controller as 00 8A 01 20

 

http://VB.Net example for formatting the byte packets

Imports System.BitConverter

 

Public Function GetLongPacket(ByVal iParm AsInteger) As System.Array

Dim bArr(3) As Byte

Dim byteParm(1) As Byte

bArr(0) = &H0

bArr(1) = &H88

byteParm = BitConverter.GetBytes(iParm)

System.Array.Copy(byteParm, 0, bArr, 2, 2)

Return  bArr

End Function

 

Binary Address Command

Used to obtain address locations for local variables and arrays.

 

Binary Parameter Address Command

Used to obtain address locations for system parameters.

 

Binary Peek Command

Read single or blocks of consecutive parameters. Must first obtain the address of the parameter using the Binary Address Command for local variables or Binary Parameter Address Command for system parameters.

 

Binary Poke Command

Write single or blocks of consecutive parameters. Must first obtain the address of the parameter using the Binary Address Command for local variables or Binary Parameter Address Command for system parameters.

 Binary Mask Command

Used to write a bit mask to Integer (LONG) parameter. Must first obtain the address of the parameter using the Binary Address Command for local variables or Binary Parameter Address Command for system parameters.

 

Binary Parameter Mask Command

Used to write a bit mask to Integer (LONG) parameter. Similar to Binary mask command, but in this case uses the parameter number rather than the memory address of the parameter.

 

Binary Move Command

Sends single and multi-axis move commands

 

Binary SET and CLR

Sets and Clears flags (bit)

The immediate setting and clearing of bits can be accomplished with a 3-byte binary command sequence. This sequence is a 1-byte command header followed by a two-byte index value. The index value is sent low order byte first. The command is not queued and the set or clear occurs when the command is first seen by the board.

Note: Ethernet communications expects 4-byte packets.

Binary CLR

 

Data Type

Description

Byte 0

Header ID ( 0x1C )

Byte 1

Index Byte 0

Byte 2

Index Byte 1

Byte 3

0x00 (padding)

 

 

Binary SET

 

Data Type

Description

Byte 0

Header ID ( 0x1D )

Byte 1

Index Byte 0

Byte 2

Index Byte 1

Byte 3

0x00 (padding)

 

Ethernet Examples:

Binary Output

Description

1C 08 02 00

Set bit 520 ( 0x0208 )

1D 20 00 00

Clear bit 32 ( 0x0010 )

1C 11 21 00

Set bit 8465 ( 0x2111 )

1D 13 21 00

Clear bit 8467 ( 0x2113 )