Parker Hannifin
Binary Mask Command
A binary mask command consists of a four-byte header followed by
an address and two bit masks to be combined with the data at that
address. There is no information returned from this command. The
address must point to a long integer storage area. The NAND mask is
used to clear bits and the OR mask is used to set bits. The data is
modified as follows:
data = ( data AND NOT nandmask ) OR ormask
Binary Mask Packet
Transmit Packet
Data Field Data Type Description
Byte 0 BYTE Header ID ( 0x00 )
Byte 1 BYTE Packet ID ( 0x94 )
Byte 2 BYTE Reserved ( 0x00 )
Byte 3 BYTE Reserved ( 0x00 )
Long 0 BYTE Data Address
Long 1 BYTE NAND Mask
Long 2 BYTE OR Mask
Receive Packet
None.
Usage Example
NOTE: Addresses shown are for example only. Addresses will vary
from card to card, depending on system memory
allocation.
This example uses the Binary Mask Command to clear all of the
Opto-isolated Outputs and then set Output 32. The data address for
Opto-isolated Outputs Parameter P4097 is assumed to have been
previously returned using the Binary Parameter Address Command
on the previous page.
Fields: Header Parameter Address NAND Mask OR Mask
Output:
00 94 00 00 43 60 40 00 FF FF FF FF 01 00 00 00
Opto-isolated Output Parameter P4097 Modified Data at address:
0x406043: 0x00000001
Binary Host Interface 111