[Bitfield - CAB A+ Series Programming Manual

Hide thumbs Also See for A+ Series:
Table of Contents

Advertisement

Special Functions
350

[BITFIELD:... ]

Bitfield creates a bitwise encoded data field. It fills up 8 bits in the Big - Endian - Mode
Syntax:
Example:
cab Produkttechnik GmbH & Co KG
Bitwise encoded data field
[BITFIELD:bits1,bits2,...bitsn:val1,val2,...val3n]
[BITFIELD:bits1,bits2,...bitsn:val1,val2,...val3n]
bits
= 1-32
val
= Value
The amount of bit width (bits1,...) and the amount of values (val1,...) must be identical !
; Testlabel for BITFIELD
m m
J
S l1;0,0,68,71,104
T:t1;10,10,0,3,5;[BITFIELD:12,4:1000,5][I]
T 10,10,0,3,5;[HEX:t1]
T:t2;10,20,0,3,5;[BITFIELD:3:2][I]
T 10,20,0,3,5;[HEX:t2]
T:t3;10,30,0,3,5;[BITFIELD:24:100000][I]
T 10,30,0,3,5;[HEX:t3]
T:t4;10,40,0,3,5;[BITFIELD:5,7,3,1:25,100,5,1][I]
T 10,40,0,3,5;[HEX:t4]
A 1
The example above creates 4 bitfields, marked as invisible (non printable) . The second
programming line converts the value into a HEX value for the printout.
350
350

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mach 4PxXd4

Table of Contents