XPC Target For Use With Real-Time Workshop
XPC Target For Use With Real-Time Workshop
®
For Use with Real-Time Workshop
www.mathworks.com Web
comp.soft-sys.matlab Newsgroup
508-647-7000 Phone
508-647-7001 Fax
i
xPC Target RS-232 Drivers (Conventional) . . . . . . . . . . . . . 2-60
Simulink Blocks for RS-232 I/O (Conventional) . . . . . . . . . . . . 2-60
MATLAB Message Structures for RS-232 I/O (Conventional) 2-61
RS-232 Synchronous Mode (Conventional) . . . . . . . . . . . . . . . 2-62
RS-232 Asynchronous Mode (Conventional) . . . . . . . . . . . . . . 2-71
RS-232 Simulink Block Reference (Conventional) . . . . . . . . . . 2-83
RS-232 MATLAB Structure Reference (Conventional) . . . . . . 2-88
RS-232 Binary Mode (Conventional) . . . . . . . . . . . . . . . . . . . . 2-93
ii Contents
CAN I/O Support
4
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
xPC Target CAN Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
CAN-AC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
CAN-AC2-PCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
CAN-AC2-104 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
CAN Driver Blocks for the CAN-AC2 (ISA) with Intel 82527
CAN Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Setup Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Send Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Receive Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
iii
Model Execution Driven by CAN Messages
(Interrupt Capability of CAN Receive Blocks) . . . . . . . . . . 4-49
CAN-AC2 (ISA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-49
CAN-AC2-PCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-50
CAN-AC2-104 (PC/104) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-51
iv Contents
CAN FIFO Driver Blocks for the CAN-AC2-104 with
Philips SJA1000 CAN Controller . . . . . . . . . . . . . . . . . . . . . . . 5-22
FIFO Setup Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23
FIFO Write Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27
FIFO Read Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
FIFO Read Filter Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
FIFO Read XMT Level Driver Block . . . . . . . . . . . . . . . . . . . . . 5-34
FIFO Reset XMT Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . 5-35
FIFO Read RCV Level Driver Block . . . . . . . . . . . . . . . . . . . . . 5-36
FIFO Reset RCV Driver Block . . . . . . . . . . . . . . . . . . . . . . . . . 5-36
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-40
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-40
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-42
Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-43
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
Example 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-45
v
xPC Target UDP Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
UDP Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
Access IO
8
WDG-CSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
WDG-CSM Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
ADDI-DATA
9
APCI-1710 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
APCI-1710 Incremental Encoder . . . . . . . . . . . . . . . . . . . . . . . . 9-2
PA-1700 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
PA-1700 Incremental Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
vi Contents
Adlink
10
Adlink PCI-8133 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
PCI-8133 3-Phase PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Advantech
11
PCL-1800 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
PCL-1800 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
PCL-1800 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
PCL-1800 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6
PCL-1800 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
PCL-711B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8
PCL-711B Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8
PCL-711B Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 11-10
PCL-711B Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10
PCL-711B Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11
PCL-726 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-12
PCL-726 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 11-12
PCL-726 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
PCL-726 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-15
PCL-727 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16
PCL-727 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 11-16
PCL-727 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
PCL-727 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19
vii
PCL-728 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20
PCL-728 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 11-20
PCL-812 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22
PCL-812 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22
PCL-812 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 11-24
PCL-812 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25
PCL-812 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-26
PCL-812PG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27
PCL-812PG Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 11-27
PCL-812PG Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 11-29
PCL-812PG Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30
PCL-812PG Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31
PCL-818 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-32
PCL-818 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . 11-32
PCL-818 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 11-34
PCL-818 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-35
PCL-818 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-36
PCL-818H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-38
PCL-818H Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 11-38
PCL-818H Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 11-40
PCL-818H Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-41
PCL-818H Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-42
PCL-818HD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-43
PCL-818HD Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 11-43
PCL-818HD Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 11-45
PCL-818HD Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-46
PCL-818HD Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-47
PCL-818HG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-48
PCL-818HG Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 11-48
PCL-818HG Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 11-50
PCL-818HG Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-51
PCL-818HG Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-52
viii Contents
PCL-818L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-53
PCL-818L Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . 11-53
PCL-818L Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 11-55
PCL-818L Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56
PCL-818L Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-57
Analogic
12
AIM12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
AIM12 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
AIM12 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
AIM12 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
AIM16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-6
AIM16 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
AIM16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
AIM16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
BittWare
13
Audio-PMC+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Audio-PMC+ Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Audio-PMC+ Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5
BVM
14
PMCDIO64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
PMCDIO64 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
PMCDIO64 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-4
ix
Contec
15
Contec AD12-16(PCI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-3
AD12-16(PCI) Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . 15-3
AD12-16(PCI) Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-5
AD12-16(PCI) Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 15-6
x Contents
Data Translation
16
DT2821 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
DT2821 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
DT2821 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . . 16-5
DT2821 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-6
DT2821 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-7
DT2821-F-8DI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-8
DT2821-F-8DI Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . 16-8
DT2821-F-8DI Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . 16-10
DT2821-F-8DI Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 16-11
DT2821-F-8DI Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 16-12
DT2821-G-8DI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-13
DT2821-G-8DI Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . 16-13
DT2821-G-8DI Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 16-15
DT2821-G-8DI Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 16-16
DT2821-G-8DI Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 16-17
DT2821-F-16SE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-18
DT2821-F-16SE Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . 16-18
DT2821-F-16SE Analog Output (D/A) . . . . . . . . . . . . . . . . . . 16-20
DT2821-F-16SE Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 16-21
DT2821-F-16SE Digital Output . . . . . . . . . . . . . . . . . . . . . . . 16-22
DT2821-G-16SE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-23
DT2821-G-16SE Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . 16-23
DT2821-G-16SE Analog Output (D/A) . . . . . . . . . . . . . . . . . . 16-25
DT2821-G-16SE Digital Input . . . . . . . . . . . . . . . . . . . . . . . . 16-26
DT2821-G-16SE Digital Output . . . . . . . . . . . . . . . . . . . . . . . 16-27
DT2823 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-28
DT2823 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-28
DT2823 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 16-29
DT2823 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-30
DT2823 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-31
xi
DT2824-PGH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-33
DT2824-PGH Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . 16-33
DT2824-PGH Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-35
DT2824-PGH Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 16-36
DT2824-PGL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-37
DT2824-PGL Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . 16-37
DT2824-PGL Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-39
DT2824-PGL Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 16-40
DT2825 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-41
DT2825 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-41
DT2825 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 16-43
DT2825 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-44
DT2825 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-45
DT2827 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-46
DT2827 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-46
DT2827 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 16-47
DT2827 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-48
DT2827 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-49
DT2828 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-51
DT2828 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-51
DT2828 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 16-53
DT2828 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-54
DT2828 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-55
Diamond
17
Diamond-MM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3
MM Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3
MM Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-5
MM Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7
MM Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7
xii Contents
Diamond-MM-16-AT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-9
MM-16-AT Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 17-10
MM-16-AT Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 17-11
MM-16-AT Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12
MM-16-AT Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-13
Diamond-MM-32-AT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-15
MM-32-AT Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 17-16
MM-32-AT Frame Analog Input (A/D) . . . . . . . . . . . . . . . . . . 17-17
MM-32-AT Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 17-20
MM-32-AT Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-21
MM-32-AT Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-22
Garnet-MM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-25
Garnet-MM Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-25
Garnet-MM Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-26
Onyx-MM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-28
Onyx-MM Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-28
Onyx-MM Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-29
Onyx-MM-DIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-31
Onyx-MM-DIO Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 17-31
Onyx-MM-DIO Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 17-32
Prometheus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-34
Prometheus Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 17-35
Prometheus Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 17-36
Prometheus Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-37
Prometheus Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-38
xiii
Quartz-MM 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-40
Quartz-MM 5 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-41
Quartz-MM 5 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 17-42
Quartz-MM5 Counter PWM . . . . . . . . . . . . . . . . . . . . . . . . . . 17-43
Quartz-MM5 Counter PWM & ARM . . . . . . . . . . . . . . . . . . . 17-44
Quartz-MM5 Counter FM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-46
Quartz-MM5 Counter FM & ARM . . . . . . . . . . . . . . . . . . . . . 17-47
Quartz-MM5 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . 17-49
Quartz-MM5 FM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-50
Quartz-MMxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-51
Quartz-MM 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-52
Quartz-MM 10 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 17-53
Quartz-MM 10 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 17-54
Quartz-MM 10 Counter PWM . . . . . . . . . . . . . . . . . . . . . . . . . 17-54
Quartz-MM 10 Counter PWM & ARM . . . . . . . . . . . . . . . . . . 17-56
Quartz-MM 10 Counter FM . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-57
Quartz-MM 10 Counter FM & ARM . . . . . . . . . . . . . . . . . . . . 17-59
Quartz-MM 10 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . 17-60
Quartz-MM 10 FM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . 17-61
Quartz-MMxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-62
Ruby-MM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-63
Diamond Ruby-MM Analog Output (D/A) . . . . . . . . . . . . . . . 17-63
Diamond Ruby-MM Digital Input . . . . . . . . . . . . . . . . . . . . . . 17-65
Diamond Ruby-MM Digital Output . . . . . . . . . . . . . . . . . . . . 17-66
Ruby-MM-416 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-68
Ruby-MM-416 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . 17-68
Ruby-MM-416 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 17-70
Ruby-MM-416 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 17-71
Ruby-MM-1612 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-73
Ruby-MM-1612 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 17-73
Ruby-MM-1612 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 17-76
Ruby-MM-1612 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 17-77
xiv Contents
General Standards
18
Overview of PMC-ADADIO Functionality . . . . . . . . . . . . . . 18-2
A/D Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-3
Create Enable Signal Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-5
D/A Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8
Interleaving Analog Input and Analog Output Blocks . . . . . 18-10
Using Multiple Boards for Simultaneous Analog to Digital
Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-12
PMC-ADADIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-14
PMC-ADADIO Analog Input (A/D) Start . . . . . . . . . . . . . . . . 18-15
PMC-ADADIO Analog Input (A/D) Read . . . . . . . . . . . . . . . . 18-16
PMC-ADADIO Analog Output (D/A) Write . . . . . . . . . . . . . . 18-17
PMC-ADADIO Analog Output (D/A) Update . . . . . . . . . . . . . 18-20
PMC-ADADIO Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 18-21
PMC-ADADIO Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 18-22
Create Enable Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-24
PMC-16AO-12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-25
PMC-16AO-12 Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . 18-25
Humusoft
19
AD 512 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2
AD 512 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-3
AD 512 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-4
AD 512 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-5
AD 512 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-6
xv
Keithley
20
DAS-1800HR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-2
DAS-1800HR Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 20-3
DAS-1800HR Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-5
DAS-1800HR Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-5
KCPI-1801HC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-7
KPCI-1801HC Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . 20-8
KPCI-1801HC Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . 20-10
KPCI-1801HC Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 20-11
KPCI-1801HC Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 20-12
KPCI-1802HC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-14
KPCI-1802HC Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . 20-15
KPCI-1802HC Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . 20-17
KPCI-1802HC Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 20-18
KPCI-1802HC Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 20-19
xvi Contents
CIO-CTR10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-14
CIO-CTR10 Counter PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-15
CIO-CTR10 Counter PWM & ARM . . . . . . . . . . . . . . . . . . . . . 21-16
CIO-CTR10 Counter FM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-18
CIO-CTR10 Counter FM & ARM . . . . . . . . . . . . . . . . . . . . . . 21-19
CIO-CTR10 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-21
CIO-CTR10 Frequency Capture . . . . . . . . . . . . . . . . . . . . . . . 21-22
CIO-CTRxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-22
CIO-DAC08/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-25
CIO-DAC08/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 21-25
CIO-DAC16/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-30
CIO-DAC16/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 21-30
CIO-DAS16/330 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-33
CIO-DAS16/330 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . 21-34
CIO-DAS16JR/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-40
CIO-DAS16JR/16 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . 21-41
CIO-DAS1601/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-42
CIO-DAS1601/12 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . 21-43
CIO-DAS1601/12 Analog Output (D/A) . . . . . . . . . . . . . . . . . 21-44
CIO-DAS1601/12 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . 21-45
CIO-DAS1601/12 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-46
xvii
CIO-DAS1602/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-49
CIO-DAS1602/12 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . 21-50
CIO-DAS1602/12 Analog Output (D/A) . . . . . . . . . . . . . . . . . 21-51
CIO-DAS1602/12 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . 21-52
CIO-DAS1602/12 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-53
CIO-DAS1602/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-55
CIO-DAS1602/16 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . 21-56
CIO-DAS1602/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . 21-57
CIO-DAS 1602/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . 21-58
CIO DAS1602/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-59
CIO-DDA06/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-67
CIO-DDA06/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 21-68
CIO-DDA06/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-69
CIO-DDA06/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 21-70
CIO-DIO24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-73
CIO-DIO24 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-73
CIO-DIO24 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-74
CIO-DIO24 Signal Conditioning . . . . . . . . . . . . . . . . . . . . . . . 21-76
CIO-DIO24H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-77
CIO-DIO24H Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-77
CIO-DIO24H Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 21-78
CIO-DIO48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-80
CIO-DIO48 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-80
CIO-DIO48 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-81
CIO-DIO48H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-84
CIO-DIO48H Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-84
CIO-DIO48H Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 21-86
xviii Contents
CIO-DIO96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-88
CIO-DIO96 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-88
CIO-DIO96 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-89
CIO-DIO192 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-92
CIO-DIO192 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-92
CIO-DIO192 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 21-93
CIO-DO24DD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-96
CIO-DO24DD Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 21-96
CIO-PDISO16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-98
CIO-PDISO16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 21-98
CIO-PDISO16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 21-99
CIO-QUAD02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-101
CIO-QUAD02 Incremental Encoder . . . . . . . . . . . . . . . . . . . 21-101
CIO-QUAD02 Incremental Encoder (Obsolete) . . . . . . . . . . 21-106
CIO-QUAD04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-109
CIO-QUAD04 Incremental Encoder . . . . . . . . . . . . . . . . . . . 21-110
CIO-QUAD04 Incremental Encoder (Obsolete) . . . . . . . . . . 21-114
PC104-DAS16JR/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-119
PC104-DAS16JR/12 Analog Input (A/D) . . . . . . . . . . . . . . . 21-119
PC104-DAS16JR/12 Digital Input . . . . . . . . . . . . . . . . . . . . 21-121
PC104-DAS16JR/12 Digital Output . . . . . . . . . . . . . . . . . . . 21-122
PC104-DAS16JR/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-123
PC104-DAS16JR/16 Analog Input (A/D) . . . . . . . . . . . . . . . 21-123
PC104-DAS16JR/16 Digital Input . . . . . . . . . . . . . . . . . . . . 21-125
PC104-DAS16JR/16 Digital Output . . . . . . . . . . . . . . . . . . . 21-126
PC104-DIO48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-127
PC104-DIO48 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-128
PC104-DIO48 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 21-129
xix
PCI-CTR05 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-131
PCI-CTR05 Counter PWM . . . . . . . . . . . . . . . . . . . . . . . . . . 21-132
PCI-CTR05 Counter PWM & ARM . . . . . . . . . . . . . . . . . . . . 21-133
PCI-CTR05 Counter FM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-135
PCI-CTR05 Counter FM & ARM . . . . . . . . . . . . . . . . . . . . . 21-137
PCI-CTR05 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . 21-138
PCI-CTR05 Frequency Capture . . . . . . . . . . . . . . . . . . . . . . 21-139
PCI-CTRxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-140
PCI-DAS1200 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-141
PCI-DAS1200 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . 21-141
PCI-DAS1200 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 21-143
PCI-DAS1200 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-144
PCI-DAS1200 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 21-146
PCI-DAS1200/JR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-148
PCI-DAS1200/JR Analog Input (A/D) . . . . . . . . . . . . . . . . . . 21-148
PCI-DAS1200/JR Digital Input . . . . . . . . . . . . . . . . . . . . . . . 21-149
PCI-DAS1200/JR Digital Output . . . . . . . . . . . . . . . . . . . . . 21-151
PCI-DAS1602/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-153
PCI-DAS1602/12 Analog Input (A/D) . . . . . . . . . . . . . . . . . . 21-153
PCI-DAS1602/12 Analog Output (D/A) . . . . . . . . . . . . . . . . . 21-155
PCI-DAS 1602/12 Digital Input . . . . . . . . . . . . . . . . . . . . . . 21-156
PCI-DAS1602/12 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-158
PCI-DAS1602/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-160
PCI-DAS1602/16 Analog Input (A/D) . . . . . . . . . . . . . . . . . . 21-161
PCI-DAS1602/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . 21-162
PCI-DAS 1602/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . 21-163
PCI-DAS1602/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-165
PCI-DDA02/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-167
PCI-DDA02/12 Analog Output (D/A) . . . . . . . . . . . . . . . . . . 21-167
PCI-DDA02/12 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-169
PCI-DDA02/12 Digital Output . . . . . . . . . . . . . . . . . . . . . . . 21-170
xx Contents
PCI-DDA02/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-173
PCI-DDA02/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . . 21-173
PCI-DDA02/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-175
PCI-DDA02/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . 21-176
PCI-DDA04/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-179
PCI-DDA04/12 Analog Output (D/A) . . . . . . . . . . . . . . . . . . 21-179
PCI-DDA04/12 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-181
PCI-DDA04/12 Digital Output . . . . . . . . . . . . . . . . . . . . . . . 21-182
PCI-DDA04/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-185
PCI-DDA04/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . . 21-185
PCI-DDA04/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-187
PCI-DDA04/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . 21-188
PCI-DDA08/12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-191
PCI-DDA08/12 Analog Output (D/A) . . . . . . . . . . . . . . . . . . 21-191
PCI-DDA08/12 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-193
PCI-DDA08/12 Digital Output . . . . . . . . . . . . . . . . . . . . . . . 21-194
PCI-DDA08/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-197
PCI-DDA08/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . . 21-197
PCI-DDA08/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-199
PCI-DDA08/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . 21-200
PCI-DIO24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-203
PCI-DIO24 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-203
PCI-DIO24 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 21-204
PCI-DIO24 Signal Conditioning . . . . . . . . . . . . . . . . . . . . . . 21-206
PCI-DIO24H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-207
PCI-DIO24H Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 21-207
PCI-DIO24H Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 21-208
PCI-DIO48H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-211
PCI-DIO48H Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 21-211
PCI-DIO48H Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 21-212
xxi
PCI-DIO96H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-215
PCI-DIO96H Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 21-215
PCI-DIO96H Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 21-216
PCI-DIO96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-219
PCI-DIO96 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-219
PCI-DIO96 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 21-220
PCI-PDISO8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-223
PCI-PDISO8 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 21-223
PCI-PDISO8 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 21-225
PCI-PDISO16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-226
PCI-PDISO16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 21-226
PCI-PDISO16 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 21-228
PCIM-DAS1602/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-229
PCIM-DAS1602/16 Analog Input (A/D) . . . . . . . . . . . . . . . . 21-230
PCIM-DAS1602/16 Analog Output (D/A) . . . . . . . . . . . . . . . 21-231
PCIM-DAS 1602/16 Digital Input . . . . . . . . . . . . . . . . . . . . . 21-233
PCIM-DAS1602/16 Digital Output . . . . . . . . . . . . . . . . . . . . 21-234
PCIM-DDA06/16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-236
PCIM-DDA06/16 Analog Output (D/A) . . . . . . . . . . . . . . . . . 21-236
PCIM-DDA06/16 Digital Input . . . . . . . . . . . . . . . . . . . . . . . 21-238
PCIM-DDA06/16 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-239
PCI-DUAL-AC5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-242
PCI-DUAL-AC5 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . 21-242
PCI-DUAL-AC5 Digital Output . . . . . . . . . . . . . . . . . . . . . . 21-243
PCI-QUAD04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-246
PCI-QUAD04 Incremental Encoder . . . . . . . . . . . . . . . . . . . 21-247
PCI-QUAD04 Incremental Encoder (Obsolete) . . . . . . . . . . 21-251
PCI-DAS-TC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-254
PCI-DAS-TC Thermocouple . . . . . . . . . . . . . . . . . . . . . . . . . . 21-255
xxii Contents
National Instruments
22
AT-AO-6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-4
AT-AO-6 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 22-4
AT-AO-10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-6
AT-AO-10 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . 22-6
PC-DIO-24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-8
PC-DIO-24 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-8
PC-DIO-24 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-9
PC-TIO-10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-12
PC-TIO-10 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-12
PC-TIO-10 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-13
PC-TIO-10 Counter PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-15
PC-TIO-10 Counter PWM & ARM . . . . . . . . . . . . . . . . . . . . . 22-16
PC-TIO-10 Counter FM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-17
PC-TIO10 Counter FM & ARM . . . . . . . . . . . . . . . . . . . . . . . . 22-19
PC-TIO10 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-21
PC-TIO10 FM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-22
PC-TIO-10xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-22
PCI-6023E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-23
PCI-6023E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 22-24
PCI-6023E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-26
PCI-6023E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-27
PCI-6023E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . . 22-28
PCI-6023E Pulse Width/Period Measurement . . . . . . . . . . . . 22-29
PCI-6024E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-31
PCI-6024E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 22-32
PCI-6024E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-34
PCI-6024E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-35
PCI-6024E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-36
PCI-6024E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . . 22-37
PCI-6024E Pulse Width/Period Measurement . . . . . . . . . . . . 22-38
xxiii
PCI-6025E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-40
PCI-6025E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 22-41
PCI-6025E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-43
PCI-6025E and PCI-6025E 8255 Digital Input . . . . . . . . . . . 22-44
PCI-6025E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-45
PCI-6025E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . . 22-46
PCI-6025E Pulse Width/Period Measurement . . . . . . . . . . . . 22-47
PCI-6031E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-59
PCI-6031E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 22-60
PCI-6031E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-62
PCI-6031E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-64
PCI-6031E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-65
PCI-6031E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . . 22-66
PCI-6031E Pulse Width/Period Measurement . . . . . . . . . . . . 22-67
PCI/PXI-6052E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-79
PXI/PCI-6052E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . 22-80
PXI/PCI-6052E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 22-82
PXI/PCI-6052E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 22-84
PXI/PCI-6052E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 22-85
PXI/PCI-6052E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . 22-86
PXI/PCI-6052E Pulse Width/Period Measurement . . . . . . . . 22-87
xxiv Contents
PCI-6070E (Formerly PCI-MIO-16E-1) . . . . . . . . . . . . . . . . . 22-89
PCI-6070E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . 22-90
PCI-6070E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-92
PCI-6070E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-94
PCI-6070E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-95
PCI-6070E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . . 22-96
PCI-6070E Pulse Width/Period Measurement . . . . . . . . . . . . 22-97
PCI-6071E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-99
PCI-6071E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 22-100
PCI-6071E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 22-102
PCI-6071E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-104
PCI-6071E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-105
PCI-6071E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . 22-106
PCI-6071E Pulse Width/Period Measurement . . . . . . . . . . . 22-107
PCI-6503 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-109
PCI-6503 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-109
PCI-6503 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-110
PCI-6527 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-113
PCI-6527 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-113
PCI-6527 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-115
PCI-6601 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-117
PCI-6601 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-117
PCI-6601 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-118
PCI-6601 Incremental Encoder . . . . . . . . . . . . . . . . . . . . . . . 22-120
PCI-6601 Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . . . 22-121
PCI-6601 Pulse Width/Period Measurement . . . . . . . . . . . . 22-122
PCI-6601 Armed Pulse Generation . . . . . . . . . . . . . . . . . . . . 22-124
PCI/PXI-6602 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-125
PCI/PXI-6602 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 22-125
PCI/PXI-6602 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 22-126
PCI/PXI-6602 Incremental Encoder . . . . . . . . . . . . . . . . . . . 22-128
PCI/PXI-6602 Pulse Generation . . . . . . . . . . . . . . . . . . . . . . 22-129
PCI/PXI-6602 Pulse Width/Period Measurement . . . . . . . . 22-130
PCI/PXI-6602 Armed Pulse Generation . . . . . . . . . . . . . . . . 22-132
xxv
PCI-6703 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-134
PCI-6703 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-134
PCI-6704 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-136
PCI-6704 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-136
PCI-6711 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-138
PCI-6711 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-138
PCI-6711 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-140
PCI-6711 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-141
PCI/PXI-6713 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-143
PCI/PXI-6713 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . 22-143
PCI/PXI-6713 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 22-145
PCI/PXI-6713 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 22-146
PCI-DIO-96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-148
PCI-DIO-96 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-148
PCI-DIO-96 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 22-149
PXI-6040E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-152
PXI-6040E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 22-153
PXI-6040E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 22-155
PXI-6040E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-157
PXI-6040E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-158
PXI-6040E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . 22-159
PXI-6040E Pulse Width/Period Measurement . . . . . . . . . . . 22-160
PXI-6070E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-162
PXI-6070E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 22-162
PXI-6070E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 22-165
PXI-6070E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-166
PXI-6070E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-167
PXI-6070E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . 22-169
PXI-6070E Pulse Width/Period Measurement . . . . . . . . . . . 22-169
xxvi Contents
PXI-6071E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-171
PXI-6071E Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . 22-172
PXI-6071E Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . 22-174
PXI-6071E Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-176
PXI-6071E Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-177
PXI-6071E Pulse Generation . . . . . . . . . . . . . . . . . . . . . . . . 22-178
PXI-6071E Pulse Width/Period Measurement . . . . . . . . . . . 22-179
PXI-6508 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-181
PXI-6508 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-181
PXI-6508 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-182
PXI-6527 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-185
PXI-6527 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-185
PXI-6527 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-187
PXI-6704 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-189
PXI-6704 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . 22-189
xxvii
NAII (Apex) 76CS1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-21
NAII 76CS1 S/D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-21
NAII 76CS1 D/S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-25
Quanser
24
Q8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2
Q8 Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2
Q8 Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-4
Q8 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-6
Q8 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-7
Q8 Incremental Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-8
Q8 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-11
DM6430 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-9
DM6430 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-9
DM6430 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 25-11
DM6430 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-12
DM6430 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-13
DM6604 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-15
DM6604 Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . 25-15
DM6604 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-16
DM6604 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-17
xxviiiContents
DM6804 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-19
DM6804 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-20
DM6804 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-20
DM6804 Counter PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-21
DM6804 Counter PWM & ARM . . . . . . . . . . . . . . . . . . . . . . . 25-23
DM6804 Counter FM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-24
DM6804 Counter FM & ARM . . . . . . . . . . . . . . . . . . . . . . . . . 25-26
DM6804 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-27
DM6804 FM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-28
DM6804xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-29
DM6814 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-30
DM6814 Incremental Encoder . . . . . . . . . . . . . . . . . . . . . . . . 25-31
DM6814 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-31
DM6814 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-32
DM6816 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-34
DM6816 PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-34
DM7420 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-36
DM7420 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . 25-36
DM7420 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-40
DM7420 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-40
SBS Technologies
26
Flex/104A PC/104 IP Carrier Board . . . . . . . . . . . . . . . . . . . . 26-2
Flex-104A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-2
IP-16ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-4
IP-16ADC Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-4
IP-16DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-6
IP-16DAC Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . 26-6
xxix
IP-DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-8
IP-DAC Analog Output (D/A) . . . . . . . . . . . . . . . . . . . . . . . . . . 26-8
IP-Digital 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-10
IP-Digital 24 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-10
IP-Digital 24 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 26-11
IP-HiADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-13
IP-HiADC Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . 26-13
IP-Synchro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-15
IP-Synchro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-15
IP-Unidig-E-48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-17
IP-Unidig-E-48 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 26-17
IP-Unidig-E-48 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 26-18
xxx Contents
Sensoray
27
526 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2
Sensoray526 AD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2
Sensoray526 Dual AD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-3
Sensoray526 DA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-4
Sensoray526 Dual DA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-5
Sensoray526 DI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-7
Sensoray526 DO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-8
Sensoray526 Encoder Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-9
626 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-11
Sensoray 626 Initialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-11
Sensoray 626 Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-12
Sensoray 626 Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . 27-13
Sensoray 626 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-14
Sensoray 626 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . 27-14
Sensoray 626 Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-15
Sensoray 626 PWM Capture . . . . . . . . . . . . . . . . . . . . . . . . . . 27-16
Softing
28
xxxi
Systran
29
Before You Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29-2
Create Shared Memory Partitions . . . . . . . . . . . . . . . . . . . . . . 29-2
Initialize Shared Memory Nodes . . . . . . . . . . . . . . . . . . . . . . . . 29-4
xxxiiContents
PD2-MF 14-Bit Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-23
PD2-MF 14-Bit Series Analog Input (A/D) . . . . . . . . . . . . . . . 30-24
PD2-MF 14-Bit Series Frame Analog Input . . . . . . . . . . . . . . 30-25
PD2-MF 14-Bit Series Analog Output (D/A) . . . . . . . . . . . . . 30-29
PD2-MF 14-Bit Series Digital Input . . . . . . . . . . . . . . . . . . . . 30-30
PD2-MF 14-Bit Series Digital Output . . . . . . . . . . . . . . . . . . 30-31
xxxiii
PDXI-MF 12-Bit Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-73
PDXI-MF 12-Bit Series Analog Input (A/D) . . . . . . . . . . . . . . 30-74
PDXI-MF 12-Bit Series Frame Analog Input . . . . . . . . . . . . . 30-75
PDXI-MF 12-Bit Series Analog Output (D/A) . . . . . . . . . . . . 30-79
PDXI-MF 12-Bit Series Digital Input . . . . . . . . . . . . . . . . . . . 30-80
PDXI-MF 12-Bit Series Digital Output . . . . . . . . . . . . . . . . . 30-81
xxxivContents
PDXI-MFS 16-Bit Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-124
PDXI-MFS 16-Bit Series Analog Input (A/D) . . . . . . . . . . . . 30-125
PDXI-MFS 16-Bit Series Frame Analog Input . . . . . . . . . . . 30-126
PDXI-MFS 16-Bit Series Analog Output (D/A) . . . . . . . . . . 30-130
PDXI-MFS 16-Bit Series Digital Input . . . . . . . . . . . . . . . . . 30-131
PDXI-MFS 16-Bit Series Digital Output . . . . . . . . . . . . . . . 30-132
PD2-DIO-64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-139
PD2-DIO-64 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-140
PD2-DIO-64 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 30-141
PD2-DIO-128 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-143
PD2-DIO-128 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 30-143
PD2-DIO-128 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 30-144
PD2-DIO-128i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-146
PD2-DIO-128i Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . 30-146
PD2-DIO-128i Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 30-147
PDL-DIO-64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-149
PDL-DIO-64 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-150
PDL-DIO-64 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . 30-151
PDXI-DIO-64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-153
PDXI-DIO-64 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . 30-154
PDXI-DIO-64 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . 30-155
xxxv
xPC Target Support for Vector CANape
31
Vector CANape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31-2
Notes on xPC Target and Vector CANape . . . . . . . . . . . . . . . . 31-3
Versalogic
32
VSBC-6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-2
VSBC-6 Analog Input (A/D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-2
VSBC-6 Digital Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-3
VSBC-6 Digital Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-4
VSBC-6 Watch Dog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32-4
xxxviContents
VMIC
33
Before You Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-2
Create Shared Memory Partitions . . . . . . . . . . . . . . . . . . . . . . 33-2
Initialize Shared Memory Nodes . . . . . . . . . . . . . . . . . . . . . . . . 33-4
VMICPCI-5565 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-6
5565 init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-6
5565 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-7
5565 write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-8
5565 pack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-9
5565 unpack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-9
5565 broadcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33-9
Miscellaneous Blocks
34
xPC Target Scope Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34-3
xPC Target Scope of Type Target Parameters . . . . . . . . . . . . . 34-3
xPC Target Scope of Type Host Parameters . . . . . . . . . . . . . . . 34-6
xPC Target Scope of Type File Parameters . . . . . . . . . . . . . . . 34-7
xxxvii
I/O Port Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34-19
Obsoleted Drivers
35
xPC Target Library of Obsoleted Drivers . . . . . . . . . . . . . . . 35-2
Burr-Brown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-3
PCI-20003M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-3
PCI-20019M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-4
PCI-20023M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-7
PCI-20041C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-9
PCI-20098C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-11
Gespac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-15
GESADA-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-15
GESPIA-2A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35-18
xxxviiiContents
1
xPC Target I/O Library
xPC Target is a solution for prototyping, testing, and deploying real-time systems using standard PC
hardware. In support of this, xPC Target allows you to add I/O blocks to your model. I/O blocks in
xPC Target provide a particular function of an I/O board. By using I/O blocks in your model, you can
generate executable code tuned specifically for your hardware. This chapter includes the following
sections:
I/O Driver Blocks (p. 1-2) Introduction to the xPC Target I/O library of driver blocks
Adding I/O Blocks with the xPC Target Adding I/O blocks to a model using the xPC Target library
Library (p. 1-11)
Adding I/O Blocks with the Simulink Adding I/O blocks to a model using the Simulink® library
Library Browser (p. 1-15) browser
Defining I/O Block Parameters Configuring I/O driver blocks
(p. 1-19)
1 xPC Target I/O Library
Refer to the following sections for descriptions on how to add I/O blocks to your
model, and how to configure those blocks:
• “Adding I/O Blocks with the xPC Target Library” on page 1-11
• “Adding I/O Blocks with the Simulink Library Browser” on page 1-15
• “Defining I/O Block Parameters” on page 1-19
1-2
I/O Driver Blocks
Note Opening a dialog box for a source block causes Simulink to pause.
While Simulink is paused, you can edit the parameter values. You must close
the dialog box to have the changes take effect and allow Simulink to continue.
In particular, hardware input blocks in the xPC Target library (blocks that
acquire data from hardware) are affected by this change.
When you double-click one of these groups, the sublibrary opens, displaying a
list grouped by manufacturer as shown below.
1-3
1 xPC Target I/O Library
Double-clicking one of the manufacturer groups then displays the set of I/O
device driver blocks for the specified I/O functionality (for example, A/D, D/A,
Digital Inputs, Digital Outputs, and so on).
The following figure shows the A/D drivers for the manufacturer Measurement
Computing, Inc.
1-4
I/O Driver Blocks
When you double-click one of these blocks, a Block Parameters dialog box
opens, allowing you to enter hardware-specific parameters. Parameters
typically include
• Sample time
• Number of channels
• Voltage range
• PCI slot (PCI boards)
• Base address (ISA boards)
Memory-Mapped Devices
Some supported boards in the xPC Target I/O library are memory-mapped
devices, for example, Burr-Brown boards. These memory-mapped boards are
accessed in the address space between 640 K and 1 MB in the lower memory
area. xPC Target reserves a 112 KB memory space for memory-mapped devices
in the address range
C0000 - DBFFF
Some drivers for memory-mapped devices allow you to select an address range
supported by the device, but not supported by xPC Target. For example, the
CAN drivers for Softing allow you to select memory ranges above DBFFF. Base
addresses of memory-mapped devices must be chosen within this memory
space for your target application to work properly. Select a memory range
supported by both the device and xPC Target.
xPC Target only supports jumper addressable ISA cards (non-PnP ISA boards)
where you have to set the base address manually.
1-5
1 xPC Target I/O Library
In this example, the third line indicates the location of the Measurement
Computing PCI-DIO48 board. This is known since the Measurement
Computing vendor ID is 0x1307 and the device ID is 0xb. In this case, you now
can see that the Measurement Computing board is plugged into PCI slot 11
(Device No.), and that this value must be entered in the dialog box entry in your
I/O device driver for each model that uses this I/O device.
1-6
I/O Driver Blocks
The field names are defined by the driver, and need to be entered with the
correct upper- and lowercase letters. However, you can choose your own
structure name and enter that name into the driver parameter dialog box.
Creating a message structure — You could enter the message structure
directly in the edit field of the driver parameter dialog box. But because the
message structure is an array and very large, this becomes cumbersome very
easily.
A better way is to define the message structure as an array in an M-file and
pass the structure array to the driver by referencing it by name. For example,
to initialize an external A/D module and acquire a value during each sample
interval, create an M-file with the following statements:
1-7
1 xPC Target I/O Library
• When you move or copy the model file to a new directory, you also need to
move or copy the M-file defining the message structure.
During each sample interval, the driver block locates the structure defined in
the Block Parameters dialog box, interprets the series of messages, and
executes the command defined by each message.
Specific drivers and structures — For detailed information on the fields in a
message structure, see the following chapters in this document:
• Chapter 2, “Serial Communications Support”
• Chapter 3, “GPIB I/O Support”
• Chapter 4, “CAN I/O Support”
1-8
I/O Driver Blocks
At the beginning of each sample time, two unsigned 16-bit integers, n and m,
are computed based on the block parameters and the current values of the
input signals. During the current sample period, the output signal is held high
for m cycles of the base frequency, low for the next n-m cycles, high for the next
m cycles, and so forth.
1-9
1 xPC Target I/O Library
1-10
Adding I/O Blocks with the xPC Target Library
Alternatively, you can access the I/O driver library with the Simulink
Library Browser. See “Adding I/O Blocks with the Simulink Library
Browser” on page 1-15.
2 Open a function group. For example, to open the A/D group, double-click the
A/D block.
1-11
1 xPC Target I/O Library
Within each manufacturer group are the blocks for a single function.
3 Open a manufacturer group. For example, to open the A/D driver blocks
from Measurement Computing, double-click the group marked
Measurement Computing.
The window with the A/D driver blocks for Measurement Computing opens.
1-12
Adding I/O Blocks with the xPC Target Library
5 From the block library, click and drag the name of an A/D board to the
Simulink block diagram. Likewise, click and drag the name of a D/A board
to your model.
1-13
1 xPC Target I/O Library
6 Remove the Signal Generator block and add the Analog Input block in its
place. Remove the Scope block and add the Analog Output block in its place.
The demo model xpcosc should look like the figure shown below.
You cannot run this model unless you have the I/O board shown installed in
your target PC. However, you can substitute the driver blocks for another
I/O board that is installed in the target PC.
Your next task is to define the I/O block parameters. See “Defining I/O Block
Parameters” on page 1-19.
1-14
Adding I/O Blocks with the Simulink Library Browser
1-15
1 xPC Target I/O Library
2 In the Simulink window, from the View menu, click Library Browser.
The Simulink Library Browser window opens. Alternatively, you can open
the Simulink Library Browser by typing simulink in the MATLAB
Command Window.
You can access the xPC Target I/O library by right-clicking xPC Target and
then clicking Open the xPC Target Library.
Alternatively, you can access driver blocks using the xPC Target I/O driver
library. See “Adding I/O Blocks with the xPC Target Library” on page 1-11.
1-16
Adding I/O Blocks with the Simulink Library Browser
4 Open a function group. For example, to open the A/D group for Measurement
Computing, double-click A/D, and then click Measurement Computing.
A list with the A/D driver blocks for Measurement Computing opens.
1-17
1 xPC Target I/O Library
5 From the block library, click and drag the name of an A/D board to the
Simulink block diagram. Likewise, click and drag the name of a D/A board
to your model.
6 Remove the Signal Generator block and add the analog input block in its
place. Remove the Scope block and add the analog output block in its place.
The model xpc_osc should look like the figure shown below.
You cannot run this model unless you have the I/O board shown above
installed in your target PC. However, you can substitute the driver blocks
for another I/O board that is installed in the target PC.
Your next task is to define the I/O block parameters. See “Defining I/O Block
Parameters.”
1-18
Defining I/O Block Parameters
1 In the Simulink window, double-click the input block labeled Analog Input.
2 Fill in the dialog box. For example, for a single channel enter 1 in the
Number of Channels box, select –10 V for the input range, and select
single-ended (16 channels) for the MUX switch position. Enter the same
sample time you entered for the fixed step size in the Simulation ->
Configuration Parameters dialog box Solver pane. Enter the base address
for this ISA-bus board.
1-19
1 xPC Target I/O Library
The Block Parameters dialog box should look similar to the figure shown
below.
4 Fill in the dialog box. For example, for one channel enter [1] in the Channel
Vector box; for an output level of –10 V enter the code [-10] in the Range
Vector box. Enter the same sample time you entered for the fixed step size
in the Simulation -> Configuration Parameters dialog box Solver pane.
Enter the base address for this ISA-bus board. E
1-20
Defining I/O Block Parameters
The Block Parameters dialog box should look similar to the figure shown
below.
If you change the sample time by changing the target object property
SampleTime, the sample times you entered in both of the I/O blocks are set to
the new value. The step size you entered in the Configuration Parameters
dialog box remains unchanged.
Your next task is to build and run the target application. See “xPC Target
Application” in Chapter 3 of the xPC Target getting started documentation.
1-21
1 xPC Target I/O Library
1-22
2
Serial Communications
Support
xPC Target interfaces the target PC to serial devices using either the COM1 or COM2 port of the
main board, through Quatech drivers, or through Diamond Systems drivers. This chapter includes
the following sections:
Introduction to Serial Drivers (p. 2-2) Description of hardware connections and host/target PC
communications.
xPC Target RS-232 and 422/485 Description of composite xPC Target RS-232/422/485
Drivers (Composite) (p. 2-5) drivers. Includes description of procedure to add an
RS-232 driver block to your Simulink model. Also
describes associated Simulink blocks.
xPC Target RS-232 Drivers Description of conventional xPC Target RS-232 drivers.
(Conventional) (p. 2-60) Includes description of procedures to add an RS-232
driver block to your Simulink model and create the
message structures associated with those blocks. Also
describes associated Simulink blocks and MATLAB
message structures associated with the Simulink blocks.
2 Serial Communications Support
For the target PC serial ports, xPC Target can use these ports as the RS-232
I/O devices. You can initiate RS-232 communications with these ports and the
accompanying xPC Target drivers.
xPC Target also supports the following:
xPC Target provides a set of functionally similar drivers for these boards. See
“RS-232/422/485 Simulink Block Reference” on page 2-12 for a description of
the driver blocks that support the different protocols.
xPC Target supplies two types of drivers to support RS-232 I/O communication,
conventional and composite:
• The composite drivers support RS-232 I/O for the target PC serial ports, the
Quatech RS-232, RS-422, and RS-485 I/O devices, and the Diamond Systems
RS-232 I/O devices. These drivers support communication in asynchronous
binary mode. xPC Target uses Simulink blocks for the I/O drivers. The
composite drivers provide a simple ASCII encode/decode for the send and
receive RS-232, RS-422, and RS-485 blocks. This set of drivers has the
descriptive name “composite” because the driver represents each functional
piece of the driver as a Simulink block. For more precise behavior, you can
customize the RS-232 driver with these blocks.
2-2
Introduction to Serial Drivers
• The conventional drivers support RS-232 I/O only for the target PC serial
ports. These drivers support synchronous, asynchronous, and binary
(asynchronous) communication mode. xPC Target uses a model for this
RS-232 I/O that includes both Simulink blocks for the I/O drivers and
MATLAB structures for sequencing messages and commands.
RS-232
Target PC RS-232
connection Device
2-3
2 Serial Communications Support
message appears when you attempt to build and download the target
application. In this example, you must use COM2 as an I/O device in your block
diagram.
If you are using TCP/IP as your host PC to target PC communications protocol,
then you can use any of the COM ports for RS-232 I/O.
Note When you use composite driver blocks, COM1 and COM3 often share
interrupt line 4. Similarly, COM2 and COM4 often share interrupt line 3. If
you use COM1 for host-target communication, you cannot also use COM1 or
COM3 in a model. This is because the shared interrupt is caught in the xPC
Target operating system. However, if COM3 uses an interrupt different from
that for COM1, you can use COM3 in a model while using COM1 for
host-target communications. If COM1 and COM3 share an interrupt line, you
can use COM2 or COM4 as your RS-232 I/O port.
2-4
xPC Target RS-232 and 422/485 Drivers (Composite)
Note Many of the blocks that support the RS-232 and RS-422/485 composite
drivers are common across the main board, Quatech, and Diamond Systems
boards. The descriptions for these blocks are applicable for all drivers, with
specific board notes as appropriate.
2-5
2 Serial Communications Support
• Com1/none
• Com2/none
• Com1/Com3
• Com2/Com4
• none/Com3
• none/Com4
• Custom
If you choose either the Com1/Com3 or Com2/Com4 pair, check that the port pair
shares an interrupt. If the port pair does not share an interrupt, you cannot use
the two ports as a pair.
Alternatively, you can define a Custom port pair. A Custom port pair is one that
does not match the existing combinations of port pairs. When you select
Custom, the dialog allows you to configure your own port pair. For example, you
can set the IRQ and two addresses for the port pair. If one of the ports is not
used, set that address to 0.
2-6
xPC Target RS-232 and 422/485 Drivers (Composite)
2-7
2 Serial Communications Support
Alternatively, you can access the xPC Target block library from the Simulink
Library Browser. In the Simulink window, and from the View menu, click
Show Library Browser. In the left pane, double-click xPC Target, and then
click RS232.
3 Drag and drop an ASCII Encode block to your Simulink model. This block
encodes input for the RS-232 Send Receive block.
5 Drag and drop an ASCII Decode block to your Simulink model. This block
decodes output from the RS-232 Send Receive block.
8 Depending on your port pair configuration, drag and drop one or two
Baseboard RS-232 Send/Receive blocks to your Simulink model.
2-8
xPC Target RS-232 and 422/485 Drivers (Composite)
Your model should look similar to one of the following figures. The first
figure shows a single-block model. This model uses the Com1/Com3 port pair.
The second figure shows a two-block model. This model uses two sets of
Custom port pairs.
2-9
2 Serial Communications Support
For example, if the target PC is connected to COM1, your Send Receive block
dialog box should look similar to the following figure. Note, this is a dynamic
dialog box that changes depending on the Parameter group selection.
2-10
xPC Target RS-232 and 422/485 Drivers (Composite)
15 Click OK. The Send Receive block dialog box dialog box closes.
Note You cannot use a serial port to communicate between the host PC and
target PC with this example. You can only use COM1 if it is not already in use
for host-target communications. Additionally, if COM1 and COM3 share an
interrupt, you cannot use COM3 if COM1 is already in use for host-target
communications.
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop, and then click Build Model.
2-11
2 Serial Communications Support
• “Signal Data Types” on page 2-12 — Describes signal data types that
composite drivers support.
• “ASCII Encode/Decode” on page 2-16 — (Generic) Describes encoder and
decoder blocks. Encoders convert input signals for the send/receive
subsystem to ASCII strings. ASCII decoders parse the string from the
Send/Receive subsystem.
• “FIFO Read/Write” on page 2-19 — (Generic) Describes FIFO read and write
blocks.
• “RS232 State” on page 2-29 — (Generic) Monitors the hardware error state
information that is present in the output vector from all blocks.
• “Send/Receive Blocks” on page 2-30 — Provides blocks for sending and
receiving.
• “Modem Control” on page 2-44 — Controls the state of either or both of the
RTS and DTR output lines.
• “Modem Status” on page 2-47 — Reads the states of the four input modem
control lines.
• “RS-232/422/485 Internal Blocks and Subsystems” on page 2-49 — Provides
blocks to customize the RS-232/422/485 drivers.
2-12
xPC Target RS-232 and 422/485 Drivers (Composite)
M unused values
H E L LO W O RLD 0
This string has 11 characters terminated with a NULL byte (0). This data type
cannot contain a NULL byte as part of the real data.
16- and 32-bit data types use the first element of the vector as a count of the
valid data. In the following figure of a 16-bit data type, C is the count of the
valid data, N is the width of the vector.
C
unused and
undefined values
5 0 H 0 E 0 L 0 L 0 O
These serial blocks interpret each entry in the vector as a single character. The
low-level hardware Send block writes the low-order byte of each entry to the
UART. The 16- and 32-bit data types allow the embedding of any 8-bit data
value, including 0.
The 8-bit data type is most useful with the ASCII Encode and Decode blocks.
The 16- and 32-bit data types are most useful for binary data streams.
• Clock Bits in the Fastcom 422/2-PCI Send Receive block with the
Parameter group parameter set to Board Setup
2-13
2 Serial Communications Support
• Baud Divisor in the Fastcom 422/2-PCI Send Receive block with the
Parameter group parameter set to Basic Setup
The Fastcom 422/2-PCI board has two serial channels, each of which has an
independent counter (baud clock). A master clock generator, which has a phase
locked loop, controls the master clock for both serial channels. The master clock
generates a maximum baud rate for both channels. The block determines the
actual baud rate of a channel by dividing the maximum baud rate from the
master clock by the baud rate divisor (n).
Maximum
Master clock baud rate
with phase Channel 1
locked loop
a, b /n Baud Clock
Channel 2
To correctly set the block parameters for this board, choose a maximum baud
rate, as follows. This procedure assumes that both channels require different
baud rates. Determine a common base clock that can be divided to produce the
required baud rates for both channels, as follows:
2-14
xPC Target RS-232 and 422/485 Drivers (Composite)
1 In the MATLAB command window, type a command like the following. With
a desired frequency (for example, 1.5e6) as the desired input, the
fc422mexcalcbits utility calculates parameter values that you can use to
configure the board rate for your board.
[a b df ] = fc422mexcalcbits(1.5e6)
2 Examine the df value. The df value is the actual frequency the board will be
able to attain compared to your desired frequency. If the actual attainable
frequency is not accurate enough, you might want to try another frequency.
In this example, the board can match the desired frequency of 1500000
(1.5e6).
3 Enter the first two values in the Clock Bits parameter of the Fastcom
422/2-PCI Send Receive block with the Parameter group parameter set to
Board Setup.
2-15
2 Serial Communications Support
After you define a maximum baud rate, you can set a unique baud rate for each
channel by choosing a different baud rate divisor for each channel. For
example, you can have Channel 1 have a baud rate of 750000 (1500000/2) and
Channel 2 have a baud rate of 1500000 (1500000/1). To set Channel 1 to have
a baud rate of 750000, with the Fastcom 422/2-PCI Send Receive block with the
Parameter group parameter set to Basic Setup, set
• Port to modify to 1
• Baud Divisor to 2
Note For very slow baud rates (less than 30000), you must use the Baud
Divisor parameter to achieve the desired baud rate.
ASCII Encode/Decode
The ASCII Encode block generates a UINT8 output vector that contains a
NULL-terminated string based on a printf like format string and data on the
input ports. The dialog box for the RS-232 ASCII Encode block contains the
following fields:
Parameter Description
2-16
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameter Description
Max output string Enter the maximum allowed length of the converted
length string, in bytes. The block allocates enough memory
to support this length for the output port. When
selecting this length, take into account the NULL
termination on the string.
The ASCII Decode block parses an input vector according to a format specifier
similar to scanf, and makes converted values available to a Simulink program.
The input vector to the ASCII Decode block can be either 8-bit or 16-bit and
signed or unsigned. If the data format is 16-bit, the ASCII Decode block ignores
2-17
2 Serial Communications Support
the upper eight bits of each entry. The dialog box for the RS-232 ASCII Decode
block contains the following fields:
Parameter Description
2-18
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameter Description
FIFO Read/Write
This section describes the FIFO Read and Write blocks. Of particular note are
the FIFO Read blocks, of which there three. Use the following guidelines when
using these blocks:
• Simple data streams — Use the FIFO Read block to read simple data
streams. An example of a simple data stream is one that has numbers,
separated by spaces, and that is terminated by a newline. The FIFO Read
block is a simple block that can easily extract these numbers.
• More complicated data streams — Use the FIFO Read HDRS and FIFO
Binary blocks for more complicated data streams. A more complicated data
stream can be one that contains headers, messages of varying lengths, or
2-19
2 Serial Communications Support
All three FIFO read block types need their input to be of type serialfifoptr,
which is output from F type Send Receive subsystems.
The following are examples of when can use the FIFO read blocks.
use the simple FIFO Read block to read the message. Configure the FIFO
Read block Delimiter parameter for a line feed (value of 10).
2-20
xPC Target RS-232 and 422/485 Drivers (Composite)
You should then connect the output to an ASCII Decode block with a format
that separates the numbers and feeds them to the output ports.
• For an instrument that can send one of a number of different messages, and
each message begins with a different fixed string, use the FIFO Read HDRS
block. For example, a digital multimeter connected through an RS-232 port,
might send a voltage reading and an amp reading with messages of the
following format:
volts <number> <CR><LF>
amps <number> <CR><LF>
Configure the FIFO Read HDRs block Header parameter for the volts and
amps headers, in a cell array. Also configure the Terminating string
parameter for carriage return (value of 13) and line feed (value of 10).
2-21
2 Serial Communications Support
You should then connect the output to multiple ASCII Decode blocks, one for
each header and message. See the xpcserialasciitest and
xpcserialasciisplit models in xpcdemos for examples of how to use this
block in a model.
• For an instrument that sends a binary message, you typically know the
length of each full message, including the header. Configure the FIFO Read
Binary block Header parameter for the headers of the message, in a cell
array, and the Message Lengths parameter for the message lengths. See the
xpcserialbinarytest and xpcserialbinarysplit models in xpcdemos for
further examples of how to use this block in a model.
FIFO Read/Write. The FIFO Read block is the read side of a FIFO read/write
pair. There are two modes for this block:
• If Read to delimiter is checked, this block only reads elements if the chosen
delimiter is found in the FIFO. If the delimiter has not yet been written to
the write side of this FIFO, the block returns a zero length vector, as
2-22
xPC Target RS-232 and 422/485 Drivers (Composite)
determined by the data type. If the delimiter is found, the block returns
elements up to and including the delimiter in the output vector. Selecting
this check box cause the block to perform ASCII reads.
• If Read to delimiter is not checked, this block returns a number of elements
between Minimum read size and the smaller of the number of elements
currently in the FIFO and Maximum read size. Selecting this check box
cause the block to perform binary reads.
The dialog box for the RS-232 FIFO Read block contains the following fields:
Parameter Description
Maximum read Enter the largest desired read size in bytes. This
size parameter specifies the width of the output vector
and the maximum number of elements to return. See
Output vector type for more information about data
formats. This value is always the absolute maximum
read size, whether or not the Max and Min read size
ports check box is selected.
Minimum read Enter the smallest desired read size in bytes. The
size FIFO must contain at least this number of elements
before any elements will be returned. If you select
the Max and Min read size ports check box, this
value is superseded by the external signals.
Read to delimiter Select this check box to enable the return of element
sets that terminate with the Delimiter value. Use
this parameter when working with character-based
elements.
Delimiter Enter the decimal value for an 8-bit input
terminator. This parameter specifies the value on
which a FIFO read operation should terminate. It
works with the Read to delimiter parameter. By
default, this block looks for a carriage return. It only
returns characters when one is found. For reference,
the decimal value of a carriage return is 13, a line
feed is 10.
2-23
2 Serial Communications Support
Parameter Description
Output vector From the list, select count+32 bit int, count+32
type bit uint, count+16 bit int, count+16 bit uint, 8
bit int null terminated, or 8 bit uint null
terminated. This parameter specifies the output
vector type. The 8-bit data types produce a null
terminated string in the output vector. For 16- and
32-bit data types, the first element contains the
number of elements to expect in the rest of the
output vector.
Max and Min Select this check box to enable the maximum and
read size ports minimum input ports. When this check box is
selected,
• The value from the maximum input port is the
maximum number of characters to be removed
from the FIFO. Note that if this number exceeds
the value of Maximum read size, the block
disregards the value from the maximum input port
and takes the value of Maximum read size as the
maximum number of characters to be removed
from the FIFO.
• The value from the minimum input is the
minimum number of characters the FIFO must
contain before any elements can be returned. This
value supersedes the value set with the Minimum
read size parameter.
2-24
xPC Target RS-232 and 422/485 Drivers (Composite)
The following are some examples of how you can set up the FIFO Read block:
• In the transmit side of the interrupt service routine, the maximum input port
receives a value of 0 if the interrupt reason is not an empty hardware FIFO,
and the hardware FIFO size if the hardware FIFO is empty. The minimum
input port receives the constant value of 1.
On the receive side, the typical case with ASCII data has the minimum and
maximum input ports disabled. The Read to delimiter parameter check
box is selected and the Delimiter parameter has the value of carriage return
or line feed. The value of the Maximum read size parameter is large (along
the order of the FIFO size) and the value of Minimum read size parameter
is 1. In this form, the driver acts like a nonblocking read line.
• An alternate receive-side configuration for fixed-length binary blocks of data
has the value of the Maximum read size and Minimum read size
parameters set to the fixed length of the block. The Read to delimiter
parameter is not selected.
The FIFO Write block is the write side of a FIFO read/write pair. The dialog
box for the RS-232 FIFO Write block contains the following fields:
Parameter Description
2-25
2 Serial Communications Support
Parameter Description
Data present Select this check box to create a Boolean output that
output is true if data is present in the FIFO. The transmit
side of the send/receive subsystem uses this output.
This output is given to the Enable TX block, which
enables the transmitter buffer empty interrupt.
SampleTime Base sample time or a multiple of the base sample
time.
ID Enter a user-defined identifier for overflow
messages.
FIFO Read HDRS. The FIFO Read HDRS block identifies and separates ASCII
data streams that have embedded identifiers. The data following a particular
header might have varying lengths, but all have a common termination marker
such as <CR><LF>. While you can attain this same functionality with the
sample FIFO Read block, doing so requires a complicated state machine.
The xpcdemos directory contains the following demos that illustrate how to use
the FIFO Read HDRS block: xpcserialasciitest and xpcserialasciisplit.
The dialog box for the RS-232 FIFO Read HDRS block contains the following
fields:
Parameter Description
Header Enter the headers that you want the block to look for
in a block of data from the FIFO. Enter each header
as an element in a cell array.
Terminating Enter the terminating string for the data. Enter as
string many characters as needed to define the end of
string. This is typically one or two characters.
2-26
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameter Description
Output behavior From the list, select the behavior of the block if the
FIFO has no new data. Select Zero output if no new
data if you want the block to have no output if there
is no new data. Select Hold last output if no new
data if you want the block to keep the output from
the last FIFO message.
Enable input Select this check box to turn on a new input that
takes Boolean signals that enable or disable the
read.
Maximum read Enter the largest desired read size in bytes. This
size parameter specifies the width of the output vector
and the maximum number of elements to return. See
Output vector type for more information about data
formats.
Output vector From the list, select count+32 bit int, count+32
type bit uint, count+16 bit int, count+16 bit uint, 8
bit int null terminated, or 8 bit uint null
terminated. This parameter specifies the output
vector type. The 8-bit data types produce a null
terminated string in the output vector. For 16- and
32-bit data types, the first element contains the
number of elements to expect in the rest of the
output vector.
SampleTime Base sample time or a multiple of the base sample
time.
FIFO Read Binary. The FIFO Read Binary block reads multiple binary headers
from a FIFO. This block identifies and separates data by finding unique byte
sequences (headers) that mark the data. Each header indicates the start of a
fixed length binary message.
The xpcdemos directory contains the following demos that illustrate how to use
the FIFO Read HDRS block: xpcserialbinarytest and
xpcserialbinarysplit.
2-27
2 Serial Communications Support
Parameter Description
Header Enter the headers that you want the block to look for
in a block of data from the FIFO. Enter each header
as an element in a cell array either as a quoted
string or a concatenation with char(val) for
non-printable byte patterns.
Message Lengths Enter the message length of each byte of data as
bytes of data. Include the header in the length.
Output behavior From the list, select the behavior of the block if the
FIFO has no new data. Select Zero output if no new
data if you want the block to have no output if there
is no new data. Select Hold last output if no new
data if you want the block to keep the output from
the last FIFO message.
Enable input This check box enables or disables a FIFO read.
Select this check box to turn on a new input that
takes Boolean signals that enable or disable the
read.
Maximum read Enter the largest desired read size in bytes. This
size parameter specifies the width of the output vector
and the maximum number of elements to return. See
Output vector type for more information about data
formats.
2-28
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameter Description
Output vector From the list, select count+32 bit int, count+32
type bit uint, count+16 bit int, count+16 bit uint, 8
bit int null terminated, or 8 bit uint null
terminated. This parameter specifies the output
vector type. The 8-bit data types produce a null
terminated string in the output vector. For 16- and
32-bit data types, the first element contains the
number of elements to expect in the rest of the
output vector.
SampleTime Base sample time or a multiple of the base sample
time.
RS232 State
The RS232 State block monitors the board state information that is present in
the vector coming out of a receive port on a send/receive block.
The input data vector can be one of Int8, UInt8, Int16, or UInt16. If the input
vector is Int8 or UInt8, no error status is available and the Boolean outputs are
always false. If the input vector is Int16 or UInt16, the upper byte should
contain the error status bits from the UART.
This block accumulates errors over the whole input vector. An output error
state is true if it is true for any byte in the input vector.
The FIFO Hardware FIFO block puts the UART status in 16+32 bit data
streams. The RS232 State block looks at this status. Note that only the FIFO
Read block passes this status information to its output port.
2-29
2 Serial Communications Support
The dialog box for the RS-232 State block contains the following fields:
Parameter Description
Note Disconnecting the serial cable does not cause a break with some serial
port hardware.
Send/Receive Blocks
The dynamic dialog for these subsystem blocks allows you to perform basic
board setup and setup of send/receive data. You control parameter visibility
with the Parameter Group parameter and the port number.
There are two versions of this block, non-F and F (FIFO). All serial boards plus
the main board have these two versions. The primary difference is that the F
blocks bring the FIFO signal out of the subsystem. For example
2-30
xPC Target RS-232 and 422/485 Drivers (Composite)
• The non-F blocks have RCV outputs. These blocks have basic FIFO read
blocks inside the subsystem. These blocks are most useful for simple
character streams. These subsystem blocks generate output as an array of
packed integers (settable at 8, 16, or 32 bits) with characters in the lower
byte and received status information in the upper byte.
• The F blocks have FIFO outputs. These blocks give you greater flexibility
and allow you to use any one of the FIFO read blocks.
- FIFO Read block — A model that contains an F block in combination with
the FIFO Read block provides the same capability as the non-F block.
- FIFO Read HDRS and FIFO Read Binary — A model that contains an F
block in combination with a FIFO Read HDRS or FIFO Read Binary block
provides greater capability than the FIFO Read block. (See “FIFO Read
HDRS” on page 2-26and “FIFO Read Binary” on page 2-27 for details.)
Only one Send/Receive block can exist for each interrupt. All ports that use
that interrupt must be associated with that block.
For example, if you have four ports configured on the mainboard, COM1 and
COM3 typically share an interrupt. In this case, COM1 and COM3 must then
share the same Send/Receive block. COM1 is also of note because you can use
it for host PC/target PC communication. If COM1 is the host PC/target PC link,
neither COM1 nor COM3 can be used with this block as long as they share an
interrupt. The same is true for COM2 and COM4.
2-31
2 Serial Communications Support
Each F Send Receive has Board Setup and Basic Setup configuration
parameter options that are the same as their non-F Send Receive block
counterparts. To provide direct access to the board, these blocks also have a
FIFO Setup parameter option. The following descriptions do not distinguish
between the F and non-F blocks unless necessary.
The Parameter Group parameter allows you to choose which subset of
configuration parameters you want to modify.
Parameter Group — From the list, choose Board Setup, Basic Setup,
Transmit Setup, or Receive Setup. The visible set of parameters changes
according to your selection. The following screenshots reflect the Send Receive
block for the Quatech ESC-100.
Parameter Group: Board Setup
2-32
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameters Description
IRQ number Enter the number of the interrupt request line for
(Quatech, this board. If you do not know the interrupt request
Commtech) line number for this board, at the MATLAB
Command Window, enter
getxpcpci
2-33
2 Serial Communications Support
Parameters Description
Slot (PCI boards) If only one board of this type is physically present in
the target PC, enter
-1
2-34
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameters Description
Base address Enter the base address of the board that you are
(Diamond setting up. This is the address of the configuration
Emerald-MM-8) register on the board. The first port address
referenced in Modem Control and Modem Status
blocks is offset 0x10 from the configuration register
address, and each subsequent port address is offset
0x8 from that.
First port address From the list, select the first port address for the
(Diamond board. This address is the first of four port addresses
Emerald-MM) for the Emerald-MM board. You must initially set
this address on the board with a jumper. The
remaining three addresses follow consecutively in
increments of 0x8. Be sure that these addresses do
not conflict with the COM port addresses listed in
“Adding RS-232 Blocks” on page 2-6.
2-35
2 Serial Communications Support
2-36
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameters Description
Port to modify From the list, choose a port. The Port to modify
parameter specifies the port for which you want to
view or modify the parameters.
2-37
2 Serial Communications Support
Parameters Description
2-38
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameters Description
2-39
2 Serial Communications Support
Parameters Description
Port to modify From the list, choose a port. The Port to modify
parameter specifies the port for which you want to
view or modify the parameters.
Transmit Enter the transmit software FIFO size, in bytes.
software FIFO This parameter specifies the size of the software
size FIFO used to buffer transmitted characters.
Transmit FIFO From the list, choose count+32 bit int, count+32
data type bit uint, count+16 bit int, count+16 bit uint, 8
bit int null terminated, or 8 bit uint null
terminated. This parameter specifies the data type
of the transmitter. The 8-bit data types require a
NULL-terminated string in the input vector.
The 16- and 32-bit data types reserve the first full
element to contain the number of elements to expect
in the rest of the input vector. Only the low-order
byte of each data element is sent. Setting this data
type allows a wider data type to hold the bytes. If the
data stream needs to include a NULL byte, you must
select one of the 16- or 32-bit data types.
2-40
xPC Target RS-232 and 422/485 Drivers (Composite)
2-41
2 Serial Communications Support
Parameters Description
Port to modify From the list, choose a port. The Port to modify
parameter specifies the port for which you want to
view or modify the parameters.
Receive software Enter the size of the receive software FIFO, in bytes.
FIFO size This parameter specifies the size of the software
FIFO to buffer characters between interrupt service
and periodic execution.
Receive Enter the maximum number of elements that you
maximum read want returned by a single call to this block. This
parameter is also used to set the output vector width.
If the Read to delimiter check box is selected, the
maximum number of characters read is limited by
this parameter even if the delimiter is not found.
Receive Enter the minimum number of characters to read. If
minimum read the FIFO does not contain at least this number of
characters, the output vector is empty.
Read to delimiter Select this check box to have this block return all
characters in the FIFO up to and including the
specified delimiter. If the block does not find the
delimiter in the FIFO, it returns no characters.
2-42
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameters Description
Receive data type From the list, select count+32 bit int, count+32
bit uint, count+16 bit int, count+16 bit uint, 8
bit int null terminated, or 8 bit uint null
terminated. This parameter specifies the data type
of the receiver. The 8-bit data types produce a null
terminated string in the output vector. For 16- and
32-bit data types, the first element contains the
number of valid elements in the rest of the output
vector.
Parameters Description
Port to modify From the list, choose port 1 or 2. The Port to modify
parameter specifies the port for which you want to
view or modify the parameters.
Transmit Enter the transmit software FIFO size, in bytes.
software FIFO This parameter specifies the size of the software
size FIFO used to buffer transmitted characters.
2-43
2 Serial Communications Support
Parameters Description
Transmit FIFO From the list, choose count+32 bit int, count+32
data type bit uint, count+16 bit int, count+16 bit uint, 8
bit int null terminated, or 8 bit uint null
terminated. This parameter specifies the data type
of the transmitter. The 8-bit data types require a
NULL-terminated string in the input vector.
The 16- and 32-bit data types reserve the first full
element to contain the number of elements to expect
in the rest of the input vector. Only the low-order
byte of each data element is sent. Setting this data
type allows a wider data type to hold the bytes. If the
data stream needs to include a NULL byte, you must
select one of the 16- or 32-bit data types.
Receive software Enter the size of the receive software FIFO, in bytes.
FIFO size This parameter specifies the size of the software
FIFO to buffer characters between interrupt service
and periodic execution.
Modem Control
The Modem Control block controls the state of either or both of the RTS and
DTR output lines on the specified port.
This block requires an input of type double. If the input value is greater than
0.5, the block asserts the RTS or DTR control bit to true and the output goes to
a positive voltage. If the value is less than or equal to 0.5, the block asserts the
RTS or DTR control bit to false and the output goes to a negative voltage. If
RTS or DTR is not selected, the corresponding output is not changed.
2-44
xPC Target RS-232 and 422/485 Drivers (Composite)
The dialog box for the Modem Control block contains the following fields:
Parameter Description
Port (Quatech, From the list, choose a port. The Port parameter
Commtech) defines the port to configure for this driver block.
RTS Select this check box to control the RTS line for this
board.
DTS Select this check box to control the DTR line for this
port.
Port (Diamond) From the list, choose a port. The Port parameter
defines the port to configure for this driver block.
First port address For Emerald-MM, this value should be the same as
(Diamond) the First port address parameter value you select in
the Parameter Group: Board Setup dialog of the
Send/Receive block. See the Diamond user’s manual
documentation for the appropriate jumper settings.
2-45
2 Serial Communications Support
Parameter Description
COM1 — 0x3F8
COM2 — 0x2F8
COM3 — 0x3E8
COM4 — 0x2E8
Slot (PCI boards) If only one board of this type is physically present in
the target PC, enter
-1
2-46
xPC Target RS-232 and 422/485 Drivers (Composite)
Modem Status
The Modem Status block reads the state of the four input modem control lines.
This block has an output of type Boolean. If the input voltage is positive, the
output is true. If the input voltage is negative, the output is false.
Parameter Description
Port (Quatech, From the list, choose a port. The Port parameter
Commtech) defines the port to configure for this driver block.
CTS Select this check box to monitor the CTS line.
DSR Select this check box to monitor the DSR line.
RI Select this check box to monitor the RI line.
DCD Select this check box to monitor the DCD line.
Sample Time Base sample time or a multiple of the base sample
time.
Port (Diamond) From the list, choose a port. The Port parameter
defines the port to configure for this driver block.
First port address This parameter specifies the first port whose input
(Diamond) modem control line states you want to read. Do not
change this value.
2-47
2 Serial Communications Support
Parameter Description
COM1 — 0x3F8
COM2 — 0x2F8
COM3 — 0x3E8
COM4 — 0x2E8
Slot (PCI boards) If only one board of this type is physically present in
the target PC, enter
-1
2-48
xPC Target RS-232 and 422/485 Drivers (Composite)
• “Setup Block” on page 2-49 — Sets up the interface characteristics for the
board.
• “Read Hardware FIFO Block” on page 2-51 — Reads characters from the
hardware FIFO in the UART.
• “Write Hardware FIFO” on page 2-53 — Writes the data from the input port
to the hardware FIFO in the UART for this port.
• “Read Int(errupt) Status” on page 2-55 — Reads the interrupt status for the
boards in the system.
• “Enable TX Interrupt” on page 2-57 — Enables the transmitter buffer empty
interrupt when data is present in the software FIFO.
• “Filter Interrupt Reason” on page 2-58 — Filters the output of the Read
Int(errupt) Status block.
• “Board Setup (Commtech) and Interrupt Check (Quatech)” on page 2-58 —
Checks for instances where the hardware IRQ differs from the software for
which it is listening.
Setup Block. A setup block is a subsystem block that sets up the interface
characteristics for the board.
For Quatech boards, this setup block is for one channel or port.
2-49
2 Serial Communications Support
The dialog box for the Setup block contains the following fields:
Parameters Description
Port (Quatech, From the list, choose a port. The Port parameter
Commtech) defines the port this driver block configures.
2-50
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameters Description
Base Address Enter the base address of the board that you are
(Mainboard, ISA, setting up.
or Diamond)
For Diamond-MM-8 boards, this block uses the base
address you enter for the Send/Receive block.
Slot (PCI boards) If only one board of this type is physically present in
the target PC, enter
-1
Read Hardware FIFO Block. The Read Hardware FIFO block reads characters
from the hardware FIFO in the UART. It then outputs those characters as the
low-order byte of an unsigned 32-bit integer vector with a width of 65. This
output vector is large enough to hold the maximum number of characters that
the hardware FIFO can hold. The first element of the vector specifies the
number of data elements in the remainder of the vector.
2-51
2 Serial Communications Support
If the input to the enable port (input port, labeled E) is not true, this block
outputs a 0 length vector. The following illustrates the vector.
0 0
UART error
status
The UART error status can contain one of the following error values:
0x02 — Overrun error
Parameter Description
Port (Quatech, From the list, choose a port. This block reads the
Commtech) hardware FIFO from this port.
Flush HW FIFO Select this check box to flush the hardware FIFO
on startup when the device starts up.
2-52
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameter Description
Base address Enter the base address of the UART for which you
(Mainboard, ISA want to read the hardware FIFO.
boards)
PCI Slot (PCI If only one board of this type is physically present in
boards) the target PC, enter
-1
Write Hardware FIFO. The Write Hardware FIFO block writes the data from the
input port (labeled E) to the hardware FIFO in the UART for this port. The
following pseudocode most accurately describes the behavior of this FIFO.
if (enable is false)
return
else
{
if (input data empty)
disable transmitter buffer empty interrupt
return
else
copy input data to HW FIFO
}
2-53
2 Serial Communications Support
The dialog box for the RS-232 FIFO Write block contains the following fields:
Parameter Description
Base address Enter the base address of the UART for which you
(Mainboard, ISA want to write the hardware FIFO.
boards)
For Diamond-MM-8 boards, this block uses the base
address you enter for the Send/Receive block.
Port From the list, choose a port. This is the port that this
block writes data to.
PCI Slot (PCI If only one board of this type is physically present in
boards) the target PC, enter
-1
2-54
xPC Target RS-232 and 422/485 Drivers (Composite)
Read Int(errupt) Status. The Read Interrupt Status block reads the interrupt
status for the boards in the system. The output for this block is a vector with
one 32-bit element for each port. Each element contains two pieces of
information for that port, where the four bytes are
[0, 0, IIR, Reason]
The Read Interrupt Status block has signal output with the following format:
This output is a vector of integers. The values in the reason byte and their
definitions are
0 — This UART did not cause this interrupt.
This second byte is the value read from the Interrupt Reason Register (IIR).
This register is specific to the 16450, 16550, and 16750 types of UARTs. Several
bites in this register indicate the active hardware FIFO depth and the
maximum number of characters that can be written in the transmitter empty
interrupt handlers to the transmit hardware FIFO.
The dialog box for the Read Interrupt Status block contains the following fields:
Parameter Description
Base address 1 Enter the base address of the first UART for which
(Mainboard, ISA you want to read the interrupt status.
boards)
Base address 2 Enter the base address of the second UART for
(Mainboard, ISA which you want to read the interrupt status.
boards)
2-55
2 Serial Communications Support
Parameter Description
PCI Slot (PCI If only one board of this type is physically present in
boards) the target PC, enter
-1
First to Fourth These parameters contain the address of the port for
port address which you want to read the interrupt status.
(Diamond-MM)
Starting from the First port address parameter
value you select in the Parameter Group: Board
Setup dialog of the Send/Receive block, the
subsequent parameters contain the incremental port
addresses.
2-56
xPC Target RS-232 and 422/485 Drivers (Composite)
Parameter Description
Base address Enter the base address of the UART for which you
(Mainboard, ISA want to enable the transmitter buffer empty
boards) interrupt.
Port (Quatech, From the list, choose a port. This parameter specifies
Commtech) the input port for which this block enables the
interrupt.
PCI Slot (PCI If only one board of this type is physically present in
boards) the target PC, enter
-1
The input port for controlling this is a Boolean value. If the input port value is
true, the Enable Transmit Interrupt block enables the transmitter buffer
empty interrupt in the UART. After the interrupt service routine empties the
software FIFO, the interrupt is disabled.
2-57
2 Serial Communications Support
Filter Interrupt Reason. The Filter Interrupt Reason block filters the output of the
Read Int(errupt) Status block. If the condition that the interrupt query block
reads from the IIR register matches the one chosen here, the output is true.
This block is used exclusively inside the interrupt service subsystem for this
board.
Parameter Description
Board Setup (Commtech) and Interrupt Check (Quatech). (Quatech and Commtech
only) The Board Setup and Interrupt Check block checks for instances where
the hardware IRQ differs from the software for which it is listening. This block
compares the software-selected interrupt against the value for which the board
2-58
xPC Target RS-232 and 422/485 Drivers (Composite)
(PCI only) is configured. This check prevents IRQ mismatches. For the
Commtech Fastcom board, the corresponding block also sets up the board clock.
Parameter Description
-1
2-59
2 Serial Communications Support
• RS-232 Setup — One setup block is needed for each RS-232 port you use in
your model. The setup block does not have any inputs or outputs, but sends
the initialization and termination messages.
• RS-232 Send/Receive (Synchronous Mode) — Send/Receive blocks have
inputs and outputs from your Simulink model, and wait for responses to
messages sent and received.
• RS-232 Send (Asynchronous Mode) — Send blocks have inputs from your
Simulink model, and wait for responses to messages sent.
2-60
xPC Target RS-232 Drivers (Conventional)
2-61
2 Serial Communications Support
RS232_Send
RS232_Send(1) . . . RS232_Send(n)
.SendData - ‘start,%f,%f,stop:\;’
.InputPorts - [1,2]
.Timeout - 0.01
RS232_Receive
RS232_Receive(1) . . . RS232_Receive(n)
.RecData - ‘start,%f,%f,stop:\;’
.OutputPorts - [1,2]
.Timeout - 0.01
.Eom - 1
2-62
xPC Target RS-232 Drivers (Conventional)
2-63
2 Serial Communications Support
Note This library contains two main sections, Composite drivers and
Conventional drivers. Refer to the Conventional drivers section, where there
are two setup blocks. The second block is included for compatibility with xPC
Target Version 1.0.
Alternatively, you can access the xPC Target block library from the Simulink
Library Browser. In the Simulink window, and from the View menu, click
Show Library Browser. In the left pane, double-click xPC Target, and then
click RS-232.
3 From the Conventional drivers area, drag and drop an RS-232 Setup block
to your Simulink model.
2-64
xPC Target RS-232 Drivers (Conventional)
Note This library contains two Setup and Receive blocks. The second block is
included for compatibility with xPC Target Version 1.0.
Your model should look similar to the figure shown below. Note that inputs
on the RS-232 Send/Receive block are not defined or visible. The inputs are
defined in a MATLAB message structure, and visible only after you load that
structure into the MATLAB workspace and update your Simulink model.
2-65
2 Serial Communications Support
7 Double-click the RS-232 Setup block. Enter values to configure the COM1
port on the target PC.
2-66
xPC Target RS-232 Drivers (Conventional)
For more information on entering the block parameters, see “RS-232 Setup
Block” on page 2-84. For the procedure to create the initialization and
termination structures, see “RS-232 MATLAB Structure Reference
(Conventional)” on page 2-88.
10 From the Port list, select either COM1 or COM2. For this example, select COM1.
In the Message struct name box, enter the name for the MATLAB structure
this block uses to send messages to the COM1 port. The name of the message
2-67
2 Serial Communications Support
structure is not the name of the M-file, but the name of the structure created
with the M-file.
In the Sample Time box, enter the sample time or a multiple of the sample
time you entered in the Receive block.
Your Block Parameter dialog box should look similar to the figure shown
below.
Your next task is to create the MATLAB message structures that the RS-232
driver blocks use to sequence commands to the RS-232 device. See “Creating
RS-232 Message Structures (Synchronous)” on page 2-68.
2-68
xPC Target RS-232 Drivers (Conventional)
After you add an RS-232 Setup and RS-232 Send/Receive block to your
Simulink model, you can create the message structures to communicate with
the RS-232 devices. You need to create and load these structures into the
MATLAB workspace before you build your target application. The easiest way
to create these structures is using an M-file and loading that M-file into the
MATLAB workspace.
1 In the MATLAB Command Window, and from the File menu, point to New,
and then click M-file.
For example, assume that you have an external RS-232 device with a D/A
module that requires a string in the format 'identifier, channel,
value;\n'. identifier is any string. channel is an integer value between 1
and 2, defining which D/A channel to update. value is a floating-point value
indicating the new voltage for the D/A output.
Additionally, when the external device receives a legal string, it accepts the
string as an input message and returns the message 'noerror;\n'. This
message is provided as a confirmation. As an example, you can type the
following.
RS232_Send_Receive(1).SendData = 'da_1234,%d,%f,;\n';
RS232_Send_Receive(1).InputPorts = [1 2];
RS232_Send_Receive(1).RecData = 'noerror\n';
RS232_Send_Receive(1).Timeout = 0.01;
RS232_Send_Receive(1).EOM = 1;
2-69
2 Serial Communications Support
3 From the File menu, click Save As. In the Save as file dialog box, enter the
name of the M-file script. For example, enter
RS232Sync_Messages.m
5 In the MATLAB Command Window, type the name of the M-file you created
with the RS-232 structures. For example, type
RS232Sync_Messages
MATLAB loads and runs the M-file to create the message structures in the
MATLAB workspace needed by the RS-232 driver blocks.
Simulink updates the RS-232 driver blocks with the information from the
structures. For example, Simulink adds inputs and outputs defined in the
structures to the blocks.
7 Connect the input and output ports on the RS-232 driver blocks to other
blocks in your Simulink model.
2-70
xPC Target RS-232 Drivers (Conventional)
8 Set the PreLoadFcn for your Simulink model to load the message structures
when you open your model. For example, if you saved the message
structures in the M-file RS232Sync_messages, type
set_param(gcs, 'PreLoadFcn','RS232Sync_messages.m')
Note If you do not manually load the message structures before opening your
Simulink model, or have the message structures automatically loaded with
the model, the port connections to the RS-232 driver break.
Your next task is to build and run the target application. However, the example
above only illustrates how to set up the dialog entries when using the Send &
Receive block. Without an external RS-232 device to receive the messages and
return a reply 'no error\n', this model cannot run successfully on your target
PC. It will block and wait for a reply each time the application sends a message.
2-71
2 Serial Communications Support
2-72
xPC Target RS-232 Drivers (Conventional)
Alternatively, you can access the xPC Target block library from the Simulink
Library Browser. In the Simulink window, and from the View menu, click
Show Library Browser. In the left pane, double-click xPC Target, and then
click RS-232.
3 Drag and drop two RS-232 Setup blocks to your Simulink model.
Note This library contains two send and two receive blocks. The second block
is included for compatibility with xPC Target Version 1.0.
2-73
2 Serial Communications Support
Alternatively, you can access the xPC Target block library from the
Simulink Library Browser. In the Simulink window, and from the View
menu, click Show Library Browser. In the left pane, double-click xPC
Target, and then click RS-232.
5 Drag and drop the RS-232 Send and RS-232 Receive blocks into your
Simulink model.
Your model should look similar to the figure below. Note that you cannot
connect to the inputs on the RS-232 Send block and the outputs on the
RS-232 Receive block, because they are not defined or visible. The inputs
and outputs are defined in a MATLAB message structure, and visible only
after you load that structure into the MATLAB workspace and update your
Simulink model.
2-74
xPC Target RS-232 Drivers (Conventional)
7 Double-click the first RS-232 Setup block. Enter values to configure the
COM1 port on the target PC.
For example, if the COM1 and COM2 ports of the target are connected with
a RS-232 NULL modem cable, and you set serial communication to 57600
baud, 8 data bits, and 1 stop bit. Your Block Parameters dialog box should
look similar to the figure shown below.
2-75
2 Serial Communications Support
For more information on entering the block parameters, see “RS-232 Setup
Block” on page 2-84. For the procedure to create the initialization and
termination structures, see “RS-232 MATLAB Structure Reference
(Conventional)” on page 2-88.
9 Repeat the previous setup for the second RS-232 Setup block and the COM2
port. Use the same Baudrate, Databits, Stopbits, Parity, and Protocol
that you entered in the first RS-232 Setup block.
10 Double-click the Send block. The Block Parameters dialog box opens.
2-76
xPC Target RS-232 Drivers (Conventional)
11 From the Port list, select either COM1 or COM2. For this example, select COM1.
In the Message struct name box, enter the name for the MATLAB structure
this block uses to send messages to the COM1 port. In the Sample Time box,
enter the sample time or a multiple of the sample time you entered in the
RS-232 Receive block.
Your Block Parameters dialog box should look similar to the figure shown
below.
For information on entering the block parameters, see “RS-232 Send Block
(Asynchronous)” on page 2-87. For the procedure to create the send
structure, see “RS-232 MATLAB Structure Reference (Conventional)” on
page 2-88.
15 From the Port list, select either COM1 or COM2. For this example, select COM2.
In the Message Struct Name box, enter the name for the MATLAB
structure this block uses to receive messages from the COM2 port. In the
2-77
2 Serial Communications Support
Sample Time box, enter the sample time or a multiple of the sample time
you entered in the RS-232 Send block.
Your Block Parameters dialog box should look similar to the figure shown
below.
17 Double-click the Signal Generator block and enter parameters. For example,
from the Wave Form list, select sine. In the Amplitude and Frequency
boxes, enter 1. From the Units list, select Hertz. Click OK.
18 Double-click the Gain block and enter parameters. For example, in the Gain
box, enter -1. Click OK.
Your next task is to create the MATLAB message structures that the RS-232
driver blocks use to sequence commands to the RS-232 device. See “Creating
RS-232 Message Structures (Synchronous)” on page 2-68.
2-78
xPC Target RS-232 Drivers (Conventional)
1 In the MATLAB Command Window, and from the File menu, point to New,
and then click M-file.
For example, if you want to send and receive one floating-point number, type
the following. In this example, the floating-point number field for SendData
is filled from InputPorts 1. In the case of RecData, the floating-point
number field is sent to OutputPorts 1.
2-79
2 Serial Communications Support
RS232_Send(1).SendData = 'start,%f,%f,stop;\r';
RS232_Send(1).InputPorts = [1];
RS232_Send(1).Timeout = 0.01;
RS232_Send(1).EOM = 1;
RS232_Receive(1).RecData = 'start,%f,%f,stop;\r';
RS232_Receive(1).OutputPorts = [1];
RS232_Receive(1).Timeout = 0.01;
RS232_Receive(1).EOM = 1;
Note If you do not manually load the message structures before opening your
Simulink model, or have the message structures automatically loaded with
the model, the port connections to the RS-232 blocks break.
3 From the File menu, click Save As. In the Save As File dialog box, enter the
name of the M-file. For example, enter
RS232Async_Messages.m
5 In the MATLAB Command Window, type the name of the M-file you created
with the RS-232 structures. For example, type
RS232Async_Messages
MATLAB loads and runs the M-file to create the message structures in the
MATLAB workspace needed by the RS-232 driver blocks.
Simulink updates the RS-232 driver blocks with the information from the
structures. For example, Simulink adds the inputs and outputs defined in
the structures to the blocks.
7 Connect the input and output ports on the RS-232 driver blocks to other
blocks in your Simulink model.
2-80
xPC Target RS-232 Drivers (Conventional)
8 Set the preload function for your Simulink model to load the message
structures when you open the model. For example, if you saved the message
structures in the M-file RS232async_messages, type
set_param(gcs, 'PreLoadFcn','RS232async_messages')
Note If you do not manually load the message structures before opening your
Simulink model, or have the message structures automatically loaded with
the model, the port connections to the RS-232 blocks break.
2-81
2 Serial Communications Support
Note You cannot use a serial port to communicate between the host PC and
target PC with this example. You can only use COM1 if it is not already in use
for host-target communications.
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop, and then click Build Model.
For each sample period, the RS-232 messages you entered in the RS-232
send and receive message structures are executed.
In this example, the target PC displays the inverted waveform. The RS-232
Send and RS-232 Receive blocks require a minimum delay or one sample to
send the data and also receive it. When running at faster sample rates,
several sample intervals might elapse while one set of data is transmitted,
because RS-232 communication is not particularly fast. The sample delay
just described is not visible in this example.
2-82
xPC Target RS-232 Drivers (Conventional)
You can extend this example for multiple D/A channels by simply adding more
input signals and modifying the format string to have additional '%f' format
specifiers.
Note This example requires that you not use host PC to target PC
communication using a serial port because that would block that COM port
and the example would not operate.
2-83
2 Serial Communications Support
• “RS-232 Setup Block” on page 2-84 — Sends the initialize and termination
messages. You need one Setup block for each RS-232 port you use in your
model.
• “RS-232 Send/Receive Block (Synchronous)” on page 2-86 — Sequences the
send and receive messages for synchronous serial communication.
• “RS-232 Send Block (Asynchronous)” on page 2-87 — Sequences the send
messages.
• “RS-232 Receive Block (Asynchronous)” on page 2-87 — Sequences the
receive messages.
Parameter Description
Port From the list, select COM1, COM2, COM3, or COM4. This is
the serial connection the target PC uses to
communicate with the RS-232 device.
Baud rate From the list, select 115200, 57600, 38400, 19200,
9600, 4800, 2400, 1200, 300, or 110.
2-84
xPC Target RS-232 Drivers (Conventional)
Parameter Description
The RS232 Setup block defines the number of databits, baudrate, protocol,
and so on for each COM port used in your Simulink model. Each model that
uses RS232 I/O must have one RS232 Setup block for each COM port in the
model. The RS232 Setup block does not have any inputs or outputs.
If your host PC and target PC are connected using serial communication, one
COM port on your target PC is dedicated for communication with your host PC.
You cannot use this COM port in your block diagram as an I/O device. For
example, if the target PC uses COM1 for communication with the host PC,
COM1 cannot be used by your block diagram. An error message is displayed if
you use COM1 as an I/O device in your block diagram. The error message
appears when you attempt to build and download the target application. In this
2-85
2 Serial Communications Support
example, you must use COM2 as an I/O device in your block diagram. If you are
using TCP/IP as your host PC to target PC communications protocol, then you
can use any COM ports with RS-232 I/O drivers in your block diagram.
Parameter Description
Port From the list, select COM1, COM2, COM3, or COM4. This list
allows you to define which COM port is used to send and
receive the data. The model must contain one Setup block
for each COM port you use to send and receive data.
Otherwise, an error message is displayed. Note that data is
sent and received on the same COM port.
Message Enter the name of the MATLAB structure this block uses to
struct send and receive messages and data to an RS-232 device.
name For information to create this structure, see “Creating
RS-232 Message Structures (Synchronous)” on page 2-68.
Sample This entry allows you to define the sample time of the block.
time Because this block waits for data to be received from the
RS-232 external device before the block finishes executing,
small sample times are not suitable with synchronous mode.
You must allow sufficient time for both the RS232 send and
the RS232 receive operations to be completed. The smallest
sample time depends on the following:
2-86
xPC Target RS-232 Drivers (Conventional)
Parameter Description
Port This list allows you to define which COM port is used for
sending data. The model must contain one RS232 Setup
block to configure its COM port. Otherwise, an error
message is displayed.
Message Enter the name of the MATLAB structure this block uses to
struct send messages and data to an RS-232 device. For
name information on creating this structure, see “Creating
RS-232 Message Structures (Asynchronous)” on page 2-79.
Sample This entry allows you to define the sample time of the block.
time Because the block does not wait until data is received from
the external RS-232 device, you can set sample times to
small values.
Parameter Description
Port This list allows you to define which COM port is used to send
and receive data. The model must contain one RS232 Setup
block for the same COM port. Otherwise, an error message
is displayed.
2-87
2 Serial Communications Support
Parameter Description
Message Enter the name of the MATLAB structure this block uses to
struct receive messages and data from an RS-232 device. For
name information on creating this structure, see “Creating
RS-232 Message Structures (Asynchronous)” on page 2-79.
Sample This entry allows you to define the sample time of the block.
time Because the block does not wait until data is received from
the external RS-232 device, you can set sample times to
small values.
2-88
xPC Target RS-232 Drivers (Conventional)
Message Description
Field
InputPorts Number of input ports for the driver block. Data from the
input ports is sent to the RS-232 device with the message
field.SendData. Default value = []. The highest number
you enter determines the number of input ports on the
driver block
For example, the following message creates two input
ports on the driver block,
RS232_Send_Receive(1).InputPorts= [1 2];
RecData Data and format received from the RS-232 device. Default
value = ''. The format of this statement is very similar to
a scanf statement. The read data is mapped to the output
ports defined in the message field .OutputPorts. If a
negative output port is given, the data is read in, but not
sent to any output port.
2-89
2 Serial Communications Support
Message Description
Field
2-90
xPC Target RS-232 Drivers (Conventional)
Message Description
Field
2-91
2 Serial Communications Support
Message Description
Fields
RecData Data and format received from the RS-232 device. Default
value = ''. The format of this statement is very similar to
a scanf statement. The read data is mapped to the output
ports defined in the message field .OutputPorts. If a
negative output port is given, the data is read in but not
sent to any output port.
OutputPorts Number of output ports from the driver block. Data
received from an RS-232 device is sent to the output ports
with the message field .ReceiveData. Default value = [].
The highest number you enter determines the number of
output ports on the driver block.
For example, to use output ports 1 and 2 on the driver
block,
RS232_Send_Receive.OutputPorts = [1 2];
2-92
xPC Target RS-232 Drivers (Conventional)
Format Description
2-93
2 Serial Communications Support
• “Example Using RS232 Binary Mode I/O” on page 2-99 — Simulink model
using xPC Target driver blocks
2-94
xPC Target RS-232 Drivers (Conventional)
2-95
2 Serial Communications Support
4 Drag and drop any of these blocks into your Simulink model.
Block Parameters.
COM Port — From the list, select COM1, COM2, COM3, or COM4. This is the RS-232
port you want to receive data from. An RS232 Setup block must also exist for
the same COM port in your model.
Maximum width per packet — Enter a value that Simulink and Real-Time
Workshop use to allocate memory for the received data. This is also the width
of the data output. In case the actual data is less wide than the maximum, the
first few bytes of the output vector are the real data and the remaining bytes
are undefined.
2-96
xPC Target RS-232 Drivers (Conventional)
Sample time — Specifies how often the block is to be executed. In the example
dialog box shown above, the setting of -1 specifies an inherited sample time,
either from the base sample time of the model or from the block that the output
of this block goes to.
Block Inputs. The RS232 Binary Receive Block has two input ports:
• First input port — This port is labeled Length, and is the size of the packet
it will receive. This value should be less than or equal to the Maximum width
per packet length parameter. The effect of changing the Length input
during reception of one packet is undefined.
• Second input port — This port is labeled Enable, and turns the block on or
off. If the Enable input is nonzero, the block attempts to receive data,
otherwise it simply does nothing.
Block Outputs. The RS232 Binary Receive block has two output ports:
• First output port — This port is labeled Done, and is a function call output.
This output issues a function call as soon as the block has completed
receiving one packet. This can be used to drive a function call subsystem to
switch. For example, to switch from a “header-receive” block to a
“body-receive” block.
• Second output port — This port is labeled Data, and is the data output port.
The data is a vector of uint8s, and is a vector of width equal to that specified
in the Maximum width per packet parameter. If the Length input is less than
this width, the first number of bytes equal to Length are the real data and
the rest is garbage.
2-97
2 Serial Communications Support
Block Parameters. COM Port — From the list, select COM1, COM2, COM3, or COM4.
This is the port you want to use to send the data.
Maximum width per packet — Enter the width of the incoming data. This
value is a constant, unlike the Receive block.
Sample time — Enter the frequency this data is sent.
Block Input
Input Port — This port represents the data to be transmitted. The data should
be a vector of type uint8 and of a Packet width specified in the dialog box.
2-98
xPC Target RS-232 Drivers (Conventional)
2-99
2 Serial Communications Support
2-100
3
GPIB I/O Support
xPC Target interfaces the target PC to a GPIB instrument bus using an external GPIB controller
from National Instruments. This external controller is connected to the target PC with a serial cable.
This chapter includes the following sections:
Introduction to GPIB Drivers (p. 3-2) Description of hardware connections, Simulink blocks,
and MATLAB message structures associated with the
Simulink blocks
Using GPIB Drivers (p. 3-5) Procedures to add GPIB driver blocks to your Simulink
model and create the message structures associated with
those blocks
GPIB Simulink Block Reference Description of block parameters for GPIB driver blocks
(p. 3-13)
GPIB MATLAB Structure Reference Description of the fields in the message structures,
(p. 3-16) shortcuts, and data types supported in the message fields
3 GPIB I/O Support
RS-232
connection
GPIB-232CT-A
Target PC RS-232 IEEE 488 Controller
GPIB
instrument
bus
GPIB Device
3-2
Introduction to GPIB Drivers
• GPIB Setup — One setup block is needed for each GPIB controller. The
setup block does not have any inputs or outputs, but sends the initialization
and termination messages.
• GPIB Send/Receive — The send/receive block has inputs and outputs from
your Simulink model, and sequences both the send and receive messages.
3-3
3 GPIB I/O Support
GPIB_Send_Receive
.Address - 16 .Address
.Command - ‘wrt’ .Command - ‘rd 16’
.SendData - ‘:read?’ .SendData -
.InputPorts .InputPorts
.RecData .RecData - ‘%f’
.RdLength .RdLength - 20
.OutputPorts .OutputPorts - [1]
.OutputDataTypes .OutputDataTypes - {double}
.Wait .Wait
.Timeout - 0.05 .Timeout - 0.05
Currently, only two limitations exist. xPC Target does not support string data
types as input and output data types. Also, you must know the size and order
of data returned from a read command.
For more information on this example, see “Creating GPIB Message
Structures” on page 3-10.
3-4
Using GPIB Drivers
• “Adding GPIB Driver Blocks” on page 3-5 — Add the setup and send/receive
blocks you need to add to your Simulink model for GPIB communication.
• “Creating GPIB Message Structures” on page 3-10 — Create the initialize,
send/receive, and termination message structures you need in the MATLAB
workspace.
3-5
3 GPIB I/O Support
Alternatively, you could access the xPC Target block library from the
Simulink Library Browser. In the Simulink window, and from the View
menu, click Show Library Browser. In the left pane, double-click xPC
Target, double-click GPIB, and then click National Instruments.
4 Drag and drop a GPIB Setup block and a GPIB Send/Receive block to your
Simulink model.
Your model should look similar to the figure below. Note that the input and
output ports are not defined or visible on the blocks. The inputs and outputs
are defined in a MATLAB message structure, and are visible only after you
load that structure into the MATLAB workspace and update your Simulink
model.
3-6
Using GPIB Drivers
5 Double-click the GPIB Setup block. Enter values that correspond to the DIP
switch settings you set on the GPIB-232CT-A controller. In the
Initialization Struct box, enter the name for the MATLAB structure this
block uses to send initialization messages to the GPIB device.
For example, if the target PC is connected to COM1, and you set the switches
on the controller to 38400 baud, 8 data bits, and 1 stop bit, your Block
Parameter dialog box should look similar to the figure shown below.
3-7
3 GPIB I/O Support
7 Double-click the GPIB Send/Receive block. The Block Parameters dialog box
opens.
3-8
Using GPIB Drivers
8 From the Port list, select either COM1 or COM2. This is the port on the target
PC connected to the GPIB controller. In the Message Struct Name box,
enter the name for the MATLAB structure this block uses to send and
receive messages to the GPIB device. In the Sample Time box, enter the
same sample time or multiple of the sample time you entered for the fixed
step size in the Simulation -> Configuration Parameters dialog box Solver
pane.
Your Block Parameter dialog box should look similar to the figure shown
below.
Your next task is to create the MATLAB message structures that the GPIB
driver blocks use to sequence commands to the GPIB controller. See “Creating
GPIB Message Structures” on page 3-10.
3-9
3 GPIB I/O Support
1 In the MATLAB Command Window, and from the File menu, point to New,
and then click M-file.
GPIB_Send_Receive(1).Address= 16;
GPIB_Send_Receive(1).Command = 'wrt 16';
GPIB_Send_Receive(1).SendData = ':read?';
GPIB_Send_Receive(1).Timeout = 0.05;
3-10
Using GPIB Drivers
GPIB_Send_Receive(2).OutputDataTypes = {'double'};
GPIB_Send_Receive(2).Timeout = 0.15;
This example did not need a termination structure. But if it did, the format
of the structure is the same as the initialization structure. For example, a
termination structure could have a message with the .Command and
.SendData fields.
GPIB_Termination(1).Command
GPIB_Termination(1).SendData
3 From the File menu, click Save As. In the Save As File dialog box, enter the
name of the M-file. For example, enter
GPIB_Messages.m
5 In the MATLAB Command Window, type the name of the M-file you created
with the GPIB structures. For example, type
GPIB_Messages
MATLAB loads and runs the M-file to create the message structures in the
MATLAB workspace needed by the GPIB driver blocks.
The GPIB driver blocks are updated with the information from the
structures. For example, inputs and outputs defined in the structures are
now visible on the driver blocks.
3-11
3 GPIB I/O Support
7 Set the PreLoadFcn for your Simulink model to load the message structures
when you open the model. For example, if you saved the message structures
in the M-file GPIB_messages, type
set_param(gcs, 'PreLoadFcn','GPIB_messages.m')
Note If you do not manually load the message structures before opening
your Simulink model, or have the message structures automatically loaded
with the model, the port connections to the GPIB driver blocks break.
Your next task is to build the target application and download it to the target
PC.
3-12
GPIB Simulink Block Reference
Board Characteristics
Parameter Description
3-13
3 GPIB I/O Support
Parameter Description
Baud rate From the list, select 115200, 57600, 38400, 19200, 9600,
4800, 2400, 1200, 600, or 300.
3-14
GPIB Simulink Block Reference
Parameter Description
Port From the list, select COM1, COM2, COM3, or COM4. This is the
serial connection the target PC uses to send and receive
data with the GPIB-232CT-A controller.
Message Enter the name of the MATLAB structure containing the
structure messages to be sent to the GPIB controller.
Sample Enter the base sample time or a multiple of the base sample
time time you entered for the fixed step size in the Simulation ->
Configuration Parameters dialog box Solver pane.
3-15
3 GPIB I/O Support
3-16
GPIB MATLAB Structure Reference
Below is a description of the possible message fields for the initialization and
termination structures. The order of the message fields does not matter.
However, the field names are case sensitive.
Message Description
Fields
Address Sets the GPIB address for the device being accessed and
defines the keyword ADDR. Default value = [].
Command GPIB command sent to a GPIB device. Default value = ''.
SendData Data sent with the GPIB command. Default value = ''.
RdLength Defines the length of the acknowledge string, in bytes, from
the GPIB controller.
Ack The expected acknowledgment string from the controller as
a result of an initialization or termination message. If this
value is set, you need to set the time-out value. If no string
is defined, then no acknowledge is expected.
Timeout Time, in seconds, allowed for the GPIB controller to respond
to a message and send back an acknowledge string. Default
value = 0.049 seconds.
If the time-out value is exceeded, a time-out error is
reported.
3-17
3 GPIB I/O Support
Message Description
Fields
Address Sets the GPIB address for the device being accessed. After
the GPIB address is set, the remaining messages use this
address value until another message changes the address
value. Default value = 0.
The keyword ADDR is equal to the value in the message
field .Address. You can use this keyword in the message
fields .Command or .SendData to replace the numerical value
of the GPIB address. For example, you can write
GPIB_Send_Receive(1).Command='wrt 16';
3-18
GPIB MATLAB Structure Reference
Message Description
Fields
RdLength Defines the length of the data, in bytes, received with the
read command and defines the keyword LENGTH. Default
value = 0.
OutputPorts Defines the output ports from the driver block. Data
received from a GPIB device with the read command is sent
to the output ports. Default value = []. The highest
number you enter determines the number of output ports on
the driver block.
For example, to use output ports 1 and 2 on the driver block,
type
GPIB_Send_Receive.OutputPorts = [1 2];
3-19
3 GPIB I/O Support
Message Description
Fields
OutputData Defines the data types for the output ports on the driver
Types block. Default value = [].
If this value is not defined, and there are output ports, the
default type is double. Also, if there are more output ports
than output data types listed, the default type for the
undefined ports is double.
Wait The amount of time, in seconds, to wait before executing the
next message. This value is limited to 50 milliseconds.
Default value = 0.
Timeout Time, in seconds, the driver block waits for data to be
returned. Default value = 0.049.
3-20
GPIB MATLAB Structure Reference
The following message fields, with the keyword ADDR, use the address value
8 defined in the message field .Address.
If you enter numerical values in the wrt and rd commands, then the
command uses those values instead of the values in the variables ADDR and
LENGH. For example, the following message uses the GPIB address 10 even
though the value for ADDR is defined as 8.
GPIB_Initialize(1).Address = 8;
GPIB_Initialize(1).Command = 'wrt 10';
3-21
3 GPIB I/O Support
GPIB_Message(1).OutputPorts = [1 -1];
The code %d reads the length of data and the -1 discards the length. Using the
modified xPC Target rd command, you would write
GPIB_message(1).Command = 'rd #20 16';
GPIB_message(1).RecData = '%f';
GPIB_message(1).OutputPorts = [1];
or you can write the following, and the appropriate escape characters are
added.
GPIB_Message.Command = 'wrt 16';
GPIB_Message.SendData = ':conf:volt:dc';
GPIB_Message.Ack = '10';
3-22
GPIB MATLAB Structure Reference
Format Description
3-23
3 GPIB I/O Support
3-24
4
CAN I/O Support
Defining Initialization and The CAN Setup driver blocks for all supported CAN
Termination CAN Messages (p. 4-53) boards allow the definition of CAN messages to be sent
out during initialization and termination of the target
application.
CAN-AC2 and CANopen Devices xPC Target CAN-AC2 supports CAN specification 2.0a
(p. 4-55) and 2.0b but this does not generally include the CANopen
protocol on driver level. Nevertheless it is possible to
access CANopen devices by the CAN-AC2 drivers in a
general way.
4-2
Introduction
Introduction
xPC Target offers support to connect a target PC to a CAN network using the
CAN driver blocks provided by the xPC Target I/O block library. This support
is for I/O device drivers for the CAN-AC2-ISA and CAN-AC2-PCI boards from
Softing GmbH (Germany). The CAN driver library allows xPC Target
applications to connect to any CAN field bus network for I/O communication or
real-time target-to-target communication. This topics in this section are
4-3
4 CAN I/O Support
The xPC Target CAN library intentionally restricts its support to Softing
boards with two CAN ports (boards with one channel would be available as
well). This is because the two-port versions allow you to check the correct
functioning of the board and drivers by just connecting the first CAN port to
the second CAN port. This forms a loop-back without you needing to connect
the board to a “real” CAN-network. The xpcdemos directory contains simple
loop-back test models to test the ISA, PCI, and PC/104 boards. Type the
following commands to open the corresponding test models.
xpccanisa CAN-AC2
xpccanpci CAN-AC2-PCI
xpccanpc104 CAN-AC2-104
The size of the driver code of the CAN boards supported by the xPC Target
block library is significant, and because not all xPC Target applications will use
CAN, the CAN library code is not linked by default when building a target
application. This makes target applications smaller if no CAN communication
functionality is needed. If the model to be built contains CAN driver blocks,
xPC Target links in the appropriate CAN library code when necessary.
For each CAN board three driver blocks are provided:
• A setup block, which defines the type of physical connection (baud rate and
so forth). Exactly one instance of the setup block must be defined in a model
for each physically installed CAN board.
• A send block, which transmits (sends) the data entering the block’s input
ports to the connected CAN network. One or more instances of the Send block
can be used in a model.
• A receive block, which retrieves (reads) CAN messages received by the board
and outputs the data at the corresponding output ports. One or more
instances of the Receive block can be used in a model.
The maximum size of the data frame of a CAN message is 8 bytes. This is the
same size as the C data type double uses on PC-compatible systems. At the
same time, the double data type is the default data type used for Simulink
signals. Therefore the CAN data frame within a Simulink model can be easily
4-4
Introduction
represented by a scalar Simulink signal even if the data frame has nothing in
common with a double floating point value. The xPC Target CAN library
provides a Utility sublibrary that offers bit-packing and bit-unpacking blocks.
These blocks are used to pack data types other than doubles into 64 bits (8
bytes or a double) as well as for the opposite operation. This is discussed in
greater detail below. What is important for now is that CAN data frames are
represented by Simulink signals of data type double.
All drivers for the supported CAN boards program the boards for the so-called
dynamic object mode. This is one of three modes the CAN board firmware from
Softing can operate in. For a more detailed discussion of the three modes see
the board’s user manual. Dynamic object mode is best suited for real-time
environments where each component of the application must have
deterministic time behavior. This is the case for xPC Target, and that is the
main reason why this mode has been chosen over the other two modes, which
are FIFO and static object mode.
The following paragraphs summarize the differences among the three
supported Softing boards.
CAN-AC2
This is the CAN board for the ISA bus offering two CAN ports (highspeed). In
its standard hardware configuration it uses the Philips PCA 82C200 CAN
controller, which supports standard identifiers only. Piggyback modules are
available (one for each port) that replace the Philips CAN controllers with Intel
82527 CAN controllers. The Intel controllers support both standard and
extended identifiers. The board is a memory-mapped device and uses a 16 KB
address range between 640 KB and 1 MB. We do not recommend this board for
new projects; use the CAN-AC2-PCI which is described below instead. Softing
plans that no new firmware versions are planned for this board.
4-5
4 CAN I/O Support
CAN-AC2-PCI
This is the CAN board for the PCI bus offering two CAN ports. The CAN
controllers used on the board are the SJA1000 from Philips. In its standard
hardware configuration the board is designed for both standard and extended
identifiers for high-speed CAN. Piggyback modules are available (one for each
port) that add low-speed CAN support to switch between high-speed and
low-speed CAN. The board is a memory mapped PCI device that uses 64 KB of
address space. The address space is assigned automatically by the PCI BIOS of
the target PC and lies usually in the range between 2 GB and 4 GB. Any new
projects where a desktop PC is used as the target system should use this board
and not the ISA board described above.
CAN-AC2-104
This is the CAN board for the PC/104 bus offering two CAN ports. The CAN
controllers used on the board are the SJA1000 from Philips. The board offers
both standard and extended identifiers for high-speed CAN. A low-speed CAN
hardware extension is not available. The board is both I/O mapped and
memory mapped. The I/O-mapped area uses a 3 B address range and the
memory-mapped area uses a 4 KB address range between 640 KB and 1 MB.
4-6
CAN Driver Blocks for the CAN-AC2 (ISA) with Philips PCA 82C200 CAN Controller
CAN Driver Blocks for the CAN-AC2 (ISA) with Philips PCA
82C200 CAN Controller
The driver blocks described here support the CAN-AC2 (ISA) without
piggyback modules. The Philips PCA 82C200 chip is used as the CAN
controller in this configuration and supports the standard identifier range
only. The driver block set for this board is found in the xPC Target I/O block
library in the group CAN/Softing.
The first group, Phillips C200, contains the three available CAN blocks: Setup,
Send, and Receive.
4-7
4 CAN I/O Support
CAN 1 - baud rate — Defines the most common baud rates for CAN port 1. If
special timing is necessary (baud rate), select the value User defined. In this
case, use CAN 1 - user defined baud rate to provide the four values for the
timing information. The vector elements have the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
CAN 2 - baud rate — Defines the most common baud rates for CAN port 2. If
special timing is necessary (baud rate), the value User defined can be selected.
4-8
CAN Driver Blocks for the CAN-AC2 (ISA) with Philips PCA 82C200 CAN Controller
In this case, use CAN 1 - User defined baud rate to provide the four values for
the timing information. The vector elements have the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
Initialization command structure and Termination — Defines CAN
messages sent during initialization and termination of the Setup block.
Memory base address — Defines the memory base address of the board.
Hardware jumpers on the board itself set the address range that the board
uses. Refer to the Softing user manual on how to set the various address
ranges. The setting in the dialog box must correspond to the jumper setting;
otherwise the board cannot be accessed. The available address ranges (memory
base address) in the pop-up menu are those supported by the board. Because
the xPC Target kernel only reserves a subrange (C0000 to DC000) of the
640 KB to 1 MB address range for memory-mapped devices, the valid settings
when used within a xPC target system are
1 (16k): D0000-D3FFF
2 (16k): D4000-D7FFF
The board allows you to terminate each of the two CAN ports separately by
means of hardware jumpers. Refer to the Softing user manual on how to set the
jumpers. Both CAN ports must be terminated properly when you use the
loop-back model provided to test the board and drivers.
4-9
4 CAN I/O Support
CAN port — Selects the CAN port to which the CAN message is sent.
Identifiers — Defines the identifiers of the CAN messages sent by this block.
It must be a row vector where the elements define a set of standard identifiers.
Each element must be in the range between 0 and 2031. The number of
identifiers for each CAN port in a model per physical CAN board cannot exceed
200 (limitation of the firmware’s dynamic object mode). The number of
elements defined here also specifies the number of input ports of the block. The
block icon displays the selected identifier at each input port. Each input port
accepts the data frame to be sent along with the CAN message. The signal
entering each input port must be a scalar of type double representing the
maximum size of 8 bytes of a CAN message data frame.
Data frame sizes — Defines the data frame size for each identifier (CAN
message) in bytes. It must be a row vector in which the elements define a set of
data frame sizes. Each element must be in the range between 1 and 8. If the
data frame sizes for all the identifiers defined in the Identifiers parameter
must be the same, you can provide the size as a scalar only and scalar
4-10
CAN Driver Blocks for the CAN-AC2 (ISA) with Philips PCA 82C200 CAN Controller
expansion applies. If the sizes are different for at least two identifiers (CAN
messages), you must provide one size element for each identifier defined in the
Identifiers parameter. Therefore the length of the two vectors must be the
same.
Show status output ports — Enables status output ports for each identifier
(CAN message). If the check box is checked the block shows as many output
ports as input ports. The data type of each output port is a double and the value
is identical to the return argument of function CANPC_write_object(…),
described in the Softing user manual. Refer to the manual for more
information.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Send block in the model as needed. For
example, by using two instances of the block with different sample times, you
can send CAN messages out at different rates. Or you can use multiple
instances to structure your model more efficiently.
4-11
4 CAN I/O Support
CAN port — Defines the CAN port from which the CAN messages are
retrieved.
Identifiers — Defines the identifiers of the CAN messages retrieved by this
block. It must be a row vector in which the elements define a set of standard
identifiers. Each element must be in the range between 0 and 2031. The
number of identifiers for each CAN port in a model per physical CAN board
cannot exceed 200 (limitation of the firmware’s dynamic object mode). The
number of elements defined here, also defines the number of output ports of the
block. The block icon displays the selected identifier at each output port. Each
output port outputs the data frame being retrieved along with the CAN
message. The signal leaving each output port is a scalar of type double
representing the maximum size of 8 bytes of a CAN message data frame.
Output port options — Defines the type of retrieved data output at each
output port. Three different types of data can be output, data frame, status,
and timestamp. The status information is of type double and is identical to the
return value of function CANPC_read_rcv_data(…), described in the Softing
user manual. Refer to the manual for more information. The timestamp
information is of type double and outputs the latest time at which a
CAN message with the corresponding identifier was received. This time
information in seconds (with a resolution of 1 microsecond) can be used to
implement time-out logic within your model.
The pop-up menu lets you select the output information output at each output
port of the block. If you select Data, each output port signal is a scalar only. If
you select Data - Status, each output port signal is a vector with two elements
in which the first element contains the data frame and the second element the
status information. If you select Data - Status - Timestamp, each output port
signal is a vector with three elements in which the first element contains the
data frame, the second element the status information, and the third element
the timestamp.
Generate interrupts — Defines whether the CAN messages defined in this
instance of the block initiate an interrupt from the CAN board each time they
are received. If selected, you can use CAN messages to control model (target
application) execution.
Sample time — Defines the sample time at which the Receive block is executed
during a model (target application) run.
4-12
CAN Driver Blocks for the CAN-AC2 (ISA) with Philips PCA 82C200 CAN Controller
You can use as many instances of the Receive block in the model as needed. For
example, by using two instances of the block with different sample times, you
can retrieve CAN messages at different rates. Or you can use multiple
instances to structure your model more efficiently.
4-13
4 CAN I/O Support
CAN Driver Blocks for the CAN-AC2 (ISA) with Intel 82527
CAN Controller
The driver blocks described here support the CAN-AC2 (ISA) with piggyback
modules. The Intel 82527 chip is used as the CAN controller in this
configuration and supports both standard and extended identifier ranges in
parallel. The driver block set for this board is found in the xPC Target I/O block
library in the group CAN/Softing.
The second block, CAN-AC2-ISA Intel527, contains the three available CAN
blocks: Setup, Send, and Receive.
4-14
CAN Driver Blocks for the CAN-AC2 (ISA) with Intel 82527 CAN Controller
4-15
4 CAN I/O Support
CAN 1 - baud rate — Defines the most common baud rates for CAN port 1. If
special timing is necessary (baud rate), the value User defined can be selected.
In this case, use the CAN 1 - user-defined baud rate parameter to provide the
four values for the timing information. The vector elements have the following
meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
CAN 2 - baud rate — Defines the most common baud rates for CAN port 1. If
special timing is necessary (baud rate), the value User defined can be selected.
In this case, use CAN 1 - user-defined baud rate parameter the four values for
the timing information. The vector elements have the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
4-16
CAN Driver Blocks for the CAN-AC2 (ISA) with Intel 82527 CAN Controller
For more information about these values, see the Softing user manual for this
board.
Initialization command structure and Termination — Define CAN
messages sent during initialization and termination of the Setup block.
Memory base address — Defines the memory base address of the board. The
address range used by the board must be set by hardware jumpers on the board
itself. Refer to the Softing user manual on how to set the various address
ranges. The setting in the dialog box must correspond to the jumper setting;
otherwise the board cannot be accessed. The available address ranges (memory
base address) in the pop-up menu are those supported by the board. Because
the xPC Target kernel only reserves a subrange (C0000 to DC000) of the
640 KB to 1 MB address range for memory-mapped devices, the valid settings
when used within a xPC Target system only are
1 (16k): D0000-D3FFF
2 (16k): D4000-D7FFF
The board allows you to terminate each of the two CAN ports separately by
means of hardware jumpers. Refer to the Softing user manual on how to set the
jumpers. Both CAN ports must be terminated properly when you use the
loop-back model provided to test the board and drivers.
4-17
4 CAN I/O Support
CAN port — Selects the CAN port to which the CAN message is sent.
CAN identifier range — Selects the identifier range of the CAN messages sent
by this block instance. If an application makes use of mixed standard and
extended identifier ranges, you must use at least two instances of this block,
each defining the corresponding identifier range.
Identifiers — Defines the identifiers of the CAN messages sent by this block.
It must be a row vector in which the elements define a set of either standard or
extended identifiers. Each element must be in the range between 0 and 2031
29
for standard identifiers or 0 and 2 -1 for extended identifiers. The number of
identifiers for each CAN port in a model per physical CAN board cannot exceed
200 (limitation of the firmware’s dynamic object mode). The number of
elements defined here also defines the number of input ports of the block. The
block icon displays the selected identifier at each input port. Each input port
accepts the data frame to be sent along with the CAN message. The signal
4-18
CAN Driver Blocks for the CAN-AC2 (ISA) with Intel 82527 CAN Controller
entering each input port must be a scalar of type double representing the
maximum size of 8 bytes of a CAN message data frame.
Data frame sizes — Defines the data frame size for each identifier (CAN
message) in bytes. It must be a row vector where the elements define a set of
data frame sizes. Each element must be in the range between 1 and 8. If the
data frame sizes for all identifiers defined in the Identifiers parameter must
be the same, you can provide the size as a scalar only and scalar expansion
applies. If the sizes are different for at least two identifiers (CAN messages),
you can provide one size element for each identifier defined in the Identifiers
parameter. Therefore the length of the two vectors must be the same.
Show status: Output ports — Enables status output ports for each identifier
(CAN message). If the check box is checked, the block shows as many output
ports as input ports. The data type of each output port is a double and the value
is identical to the return argument of function CANPC_write_object(…),
described in the Softing user manual. Refer to the manual for more
information.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Send block in the model as needed. For
example, by using two instances of the block, you can send CAN messages at
different sample times. Or you can use multiple instances to structure your
model more efficiently.
4-19
4 CAN I/O Support
CAN port — Selects the CAN port from which to retrieve the CAN messages.
CAN identifier range — Selects the identifier range of the CAN messages
retrieved by this block instance. If an application makes use of mixed standard
and extended identifier ranges, you must use at least two instances of this
block, each defining the corresponding identifier range.
Identifiers — Defines the identifiers of the CAN messages retrieved by this
block. It must be a row vector in which the elements define a set of either
standard or extended identifiers. Each element must be in the range between
29
0 and 2031 for standard identifiers or 0 and 2 - 1 for extended identifiers.
The number of identifiers for each CAN port in a model per physical CAN board
cannot exceed 200 (limitation of the firmware’s dynamic object mode). The
number of elements defined here also defines the number of output ports of the
block. The block icon displays the selected identifier at each output port. Each
output port outputs the data frame being retrieved along with the CAN
4-20
CAN Driver Blocks for the CAN-AC2 (ISA) with Intel 82527 CAN Controller
message. The signal leaving each output port is a scalar of type double
representing the maximum size of 8 bytes of a CAN message data frame.
Output port options — Defines the type of retrieved data output at each
output port. Three different types of data can be output, data frame, status,
and timestamp. The status information is of type double and is identical to the
return value of function CANPC_read_rcv_data(…), described in the Softing
user manual. Refer to the manual for more information. The timestamp
information is of type double and outputs the latest time at which a
CAN message with the corresponding identifier was received. This time
information in seconds (with a resolution of 1 microsecond) can be used to
implement time-out logic within your model.
The pop-up menu lets you select the output information output at each output
port of the block. If you select Data, each output port signal is a scalar only. If
you select Data - Status, each output port signal is a vector with two elements
in which the first element contains the data frame and the second element the
status information. If you select Data - Status - Timestamp, each output port
signal is a vector with three elements in which the first element contains the
data frame, the second element the status information, and the third element
the timestamp.
Generate interrupts — Defines whether the CAN messages defined in this
instance of the block initiate an interrupt from the CAN board each time they
are received. If selected, you can use CAN messages to control model (target
application) execution.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Receive block in the model as needed. For
example, by using two instances of the block, you can send CAN messages at
different sample times. Or you can use multiple instances to structure your
model more efficiently.
4-21
4 CAN I/O Support
The third block group, CAN-AC2-PCI SJA 1000, contains the three available
CAN blocks: Setup, Send, and Receive, plus a FIFO Mode block, which is
discussed in Chapter 5, “CAN I/O Support for FIFO.”
4-22
CAN Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
4-23
4 CAN I/O Support
Board — Defines the board being accessed by this driver block instance. If
multiple boards are present in the target PC, you can use the board number
(1…3) to differentiate the boards. The physical board referenced by the board
number depends on the PCI Slot parameter. If just one board is present in the
target system, select board number 1.
CAN 1 - physical bus — Defines the physical CAN bus type of CAN port 1. In
the board’s standard hardware configuration, only high-speed CAN is
supported. By extending the board with low-speed CAN piggyback modules,
you can also select low-speed CAN as the physical bus. Do not change this value
to low-speed if no module is present for the corresponding CAN port. If the
module is present (see the Softing user manual on how to install the modules),
you can select between high-speed and low-speed CAN here.
4-24
CAN Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
CAN 1- baud rate — Defines the most common baud rates for CAN port 1. If
special timing is necessary (baud rate), you can select the value User defined.
In this case, you use the CAN 1 - user defined baud rate parameter to provide
the four values for the timing information. The vector elements have the
following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
CAN 2 - physical bus — Defines the physical CAN bus type of CAN port 2. In
the board’s standard hardware configuration, only high-speed CAN is
supported. By extending the board with lows-peed CAN piggyback modules,
you can also select low-speed CAN as the physical bus. Do not set this value
should to low-speed if no module is present for the corresponding CAN port. If
the module is present (see the Softing user manual on how to install the
modules), you can select between high-speed and low-speed CAN here.
CAN 2 - baud rate — Defines the most common baud rates for CAN port 2. If
special timing is necessary (baud rate), the value User defined can be selected.
In this case, you can use the CAN 2 - user defined baud rate parameter to
provide the four values for the timing information. The vector elements have
the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
Initialization command structure and Termination — Defines CAN
messages sent during initialization and termination of the Setup block.
PCI slot (-1: autosearch) — Defines the PCI slot in which the referenced board
(board number) resides. If only one board is present in the target system, set
the value for this control to -1 (autosearch). This ensures that the xPC Target
kernel automatically finds the board regardless of the PCI slot it is plugged
into. If two or more boards of this type are physically present in the target PC,
enter the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. Use the xPC Target
4-25
4 CAN I/O Support
function getxpcpci to query the target system for installed PCI boards and the
PCI slots they are plugged into. For more information see help getxpcpci.
The board allows you to terminate each of the two CAN ports separately by
means of DIP switches at the rear panel. Refer to the Softing user manual on
how to set the DIP switches. Both CAN ports must be terminated properly
when you use the loop-back model provided to test the board and drivers.
Board — Defines the board used to send out the CAN messages defined by this
block instance. For more information about the meaning of the board number
see the Setup driver block described above. If just one board is present in the
target system, select board number 1.
CAN port — Selects the CAN port to which the CAN message is sent.
4-26
CAN Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
CAN identifier range — Selects the identifier range of the CAN messages sent
by this block instance. If an application makes use of mixed standard and
extended identifier ranges, you must use at least two instances of this block,
each defining the corresponding identifier range.
Identifiers — Defines the identifiers of the CAN messages sent by this block.
It must be a row vector in which the elements define a set of either standard or
extended identifiers. Each element must be in the range between 0 and 2031
29
for standard identifiers or 0 and 2 -1 for extended identifiers. The number of
identifiers for each CAN port in a model per physical CAN board cannot exceed
200 (limitation of the firmware’s dynamic object mode). The number of
elements defined here also define the number of input ports of the block. The
block icon displays the selected identifier at each input port. Each input port
accepts the data frame to be sent along with the CAN message. The signal
entering each input port must be a scalar of type double representing the
maximum size of 8 bytes of a CAN message data frame.
Data frame sizes — Defines the data frame size for each identifier (CAN
message) in bytes. It must be a row vector in which the elements define a set of
data frame sizes. Each element must be in the range between 1 and 8. If the
data frame sizes for all identifiers defined in the control above must be the
same, you can provide the size as a scalar only and scalar expansion applies. If
the sizes are different for at least two identifiers (CAN messages), you must
provide one size element for each identifier defined in the Identifiers
parameter. Therefore the lengths of the two vectors must be the same.
Show status output ports — Enables status output ports for each identifier
(CAN message). If the check box is checked the block shows as many output
ports as input ports. The data type of each output port is a double and the value
is identical to the return argument of function CANPC_write_object(…),
described in the Softing user manual. Refer to the manual for more
information.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Send block in the model as needed. For
example, by using two instances of the block, you can send CAN messages at
different sample times. Or you can use multiple instances to structure your
model more efficiently.
4-27
4 CAN I/O Support
Board — Defines the board the CAN messages defined by this block instance
are retrieved from. For more information about the meaning of the board
number, see the Setup driver block described above. If just one board is present
in the target system, select board number 1.
CAN port — Selects the CAN port from which the CAN messages are retrieved.
CAN identifier range — Selects the identifier range of the CAN messages
retrieved by this block instance. If an application makes use of mixed standard
and extended identifier ranges, you must use at least two instances of this
block, each defining the corresponding identifier range.
Identifiers — Defines the identifiers of the CAN messages retrieved by this
block. It must be a row vector in which the elements define a set of either
standard or extended identifiers. Each element must be in the range between
4-28
CAN Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
0 and 2031 for standard identifiers or 0 and 229 - 1 for extended identifiers. The
number of identifiers for each CAN port in a model per physical CAN board
cannot exceed 200 (limitation of the firmware’s dynamic object mode). The
number of elements defined here also defines the number of output ports of the
block. The block icon displays the selected identifier at each output port. Each
output port outputs the data frame being retrieved along with the CAN
message. The signal leaving each output port is a scalar of type double
representing the maximum size of 8 bytes of a CAN message data frame.
Output port options — Defines the type of retrieved data output at each
output port. Three different types of data can be output, data frame, status,
and timestamp. The status information is of type double and is identical to the
return value of function CANPC_read_rcv_data (…), described in the Softing
user manual. Refer to the manual for more information. The timestamp
information is of type double and outputs the latest time at which a CAN
message with the corresponding identifier was received. This time information
in seconds (with a resolution of 1 microsecond) can be used to implement
time-out logic within your model. The pop-up menu lets you select the output
information at each output port of the block. If you select Data, each output port
signal is a scalar only. If you select Data - Status, each output port signal is
a vector with two elements, in which the first element contains the data frame
and the second element the status information. If you select Data - Status -
Timestamp, each output port signal is a vector with three elements, in which
the first element contains the data frame, the second element the status
information, and the third element the timestamp.
Generate interrupts — Defines whether the CAN messages defined in this
instance of the block will initiate an interrupt from the CAN board each time
they are received. If selected, you can use CAN messages to control model
(target application) execution.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Send block in the model as needed. For
example, by using two instances of the block, you can send CAN messages at
different sample times. Or you can use multiple instances to structure your
model more efficiently.
4-29
4 CAN I/O Support
The fourth block group, CAN-AC2-104 SJA 1000, contains the three available
CAN blocks: Setup, Send, and Receive, plus a FIFO Mode block, which is
discussed in Chapter 5, “CAN I/O Support for FIFO.”
4-30
CAN Driver Blocks for the CAN-AC2-104 (PC/104) with Philips SJA1000 CAN Controller
4-31
4 CAN I/O Support
Board — Defines the board being accessed by this driver block instance. If
multiple boards are present in the target PC, you can use the board number
(1…3) to differentiate the boards. The physical board referenced by the board
number depends on the PCI Slot parameter. If just one board is present in the
target system, select board number 1. The physical board referenced by the
board number depends on the I/O base address parameter.
CAN 1 - baud rate — Defines the most common baud rates for CAN port 1. If
special timing is necessary (baud rate), you can select the value User defined.
In this case, use the CAN 1 - user defined baud rate parameter to provide the
four values for the timing information. The vector elements have the following
meanings:
4-32
CAN Driver Blocks for the CAN-AC2-104 (PC/104) with Philips SJA1000 CAN Controller
For more information about these values, see the Softing user manual for this
board.
CAN 2 - baud rate — Defines the most common baud rates for CAN port 2. If
special timing is necessary (baud rate), you can select the value User defined.
In this case, use the CAN 2 - user defined baud rate parameter to provide the
four values for the timing information. The vector elements have the following
meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
Initialization command structure and Termination — Define CAN
messages sent during initialization and termination of the Setup block.
I/O base address — Defines the I/O base address of the board to be accessed
by this block instance. The I/O base address is given by the DIP switch setting
on the board itself. The I/O address range is 3 bytes and is mainly used to
transfer the memory base address the board should use. See the Softing user
manual for this board to set the I/O base address. The I/O base address entered
in this control must correspond with the DIP switch setting on the board. If
more than one board is present in the target system, a different I/O base
address must be entered for each board. In this case the I/O base address itself
defines which board is referenced by which board number.
Memory base address — Defines the memory base address of the board to be
accessed by this block instance. The memory base address is a software setting
only (no corresponding DIP switch is found on the board). The memory address
range is 4 KB. If more than one board is present in the target system, a
different memory base address must be entered for each board. You must make
sure that the defined address ranges do not overlap. Because the xPC Target
kernel only reserves a subset of the address range between 640 KB and 1 MB
for memory mapped devices, the address ranges must lie within the following
range:
C0000 - DC000
4-33
4 CAN I/O Support
The board allows you to terminate each of the two CAN ports separately by
means of jumpers found on the board. Refer to the board user manual for how
the DIP switches must be set. Both CAN ports must be terminated properly
when you use the loop-back model provided to test the board and drivers.
Interrupt line — Selects an interrupt line from the list.
Board — Defines the board to use to send the CAN messages defined by this
block instance. For more information about the meaning of the board number,
see the Setup driver block described above. If just one board is present in the
target system, select board number 1.
CAN Port — Selects the CAN port to send the CAN message.
4-34
CAN Driver Blocks for the CAN-AC2-104 (PC/104) with Philips SJA1000 CAN Controller
CAN identifier range — Selects the identifier range of the CAN messages sent
by this block instance. If an application makes use of mixed standard and
extended identifier ranges, you must use at least two instances of this block,
each defining the corresponding identifier range.
Identifiers — Defines the identifiers of the CAN messages sent by this block.
It must be a row vector in which the elements define a set of either standard or
extended identifiers. Each element must be in the range between 0 and 2031
for standard identifiers or 0 and 229 - 1 for extended identifiers. The number of
identifiers for each CAN port in a model per physical CAN board cannot exceed
200. The number of elements defined also defines the number of input ports of
the block. The block icon displays the selected identifier at each input port.
Each input port accepts the data frame to be sent along with the CAN message.
The signal entering each input port must be a scalar of type double
representing the maximum size of 8 bytes of a CAN message data frame.
Data frame sizes — Defines the data frame size for each identifier (CAN
message) in bytes. It must be a row vector in which the elements define a set of
data frame sizes. Each element must be in the range between 1 and 8. If the
data frame sizes for all identifiers defined in the preceding control must be the
same, you can provide the size as a scalar only and scalar expansion applies. If
the sizes are different for at least two identifiers (CAN messages), one size
element must be provided for each identifier specified in the Identifiers
control. Therefore the lengths of the two vectors must be the same.
Show status output ports — Enables status output ports for each identifier
(CAN message). If the check box is selected, the block shows as many output
ports as input ports. The data type of each output port is a double and the value
is identical to the return argument of function CANPC_write_object(…),
described in the Softing user manual. Refer to the manual for more
information.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Send block in the model as needed. For
example, by using two instances of the block, you can define different sample
times at which CAN messages are sent out. Or you can use multiple instances
to structure your model more efficiently.
4-35
4 CAN I/O Support
Board — Defines the board from which the CAN messages defined by this
block instance are to be retrieved. For more information about the meaning of
the board number, see the Setup driver block. If just one board is present in the
target system, select board number 1.
CAN Port — Selects the CAN port from which to retrieve the CAN message.
CAN identifier range — Selects the identifier range of the CAN messages
retrieved by this block instance. If an application makes use of mixed standard
and extended identifier ranges, at least two instances of this block must be
used, each defining the corresponding identifier range.
Identifiers — Specifies the identifiers of the CAN messages retrieved by this
block. It must be a row vector where the elements define a set of either
standard or extended identifiers. Each element must be in the range between
4-36
CAN Driver Blocks for the CAN-AC2-104 (PC/104) with Philips SJA1000 CAN Controller
0 and 2031 for standard identifiers, or 0 and 229 - 1 for extended identifiers.
The number of identifiers for each CAN port in a model per physical CAN board
cannot exceed 200. The number of elements defined here defines the number of
output ports of the block. The block icon displays the selected identifier at each
output port. Each output port outputs the data frame being retrieved along
with the CAN message. The signal leaving each output port is a scalar of type
double representing the maximum size of 8 bytes of a CAN message data
frame.
Output port options — Defines the type of retrieved data output at each
output port. Three different types of data can be output: data frame, status,
and timestamp. The status information is of type double and is identical to the
return value of function CANPC_read_rcv_data(…), described in the Softing
user manual. Refer to the manual for more information. The timestamp
information is of type double and outputs the most recent time at which a CAN
message with the corresponding identifier was received. This time information
in seconds (with a resolution of 1 microsecond) can be used to implement
time-out logic within your model.
The pop-up menu lets you select the output information output at each output
port of the block. If you select Data, each output port signal is a scalar only. If
you select Data-Status, each output port signal is a vector with two elements,
in which the first element contains the data frame and the second element the
status information. If you select Data-Status-Timestamp, each output port
signal is a vector with three elements, in which the first element contains the
data frame, the second element the status information, and the third element
the timestamp.
Generate interrupts — Defines whether the CAN messages defined in this
instance of the block initiate an interrupt from the CAN board each time they
are received. If selected, you can use CAN messages to control model (target
application) execution.
Sample time — Defines the sample time at which the Send block is executed
during a model (target application) run.
You can use as many instances of the Receive block in the model as needed. For
example, by using two instances of the block, you can define different sample
times at which CAN messages are retrieved. Or you can use multiple instances
to structure your model more efficiently. You can define up to 200 receive
objects for standard and extended identifiers for each CAN channel.
4-37
4 CAN I/O Support
The main purpose of the two blocks is to be used in conjunction with CAN Send
and Receive driver blocks, but they can be used as well for other types of data
manipulation. Their functionality is entirely independent of any CAN driver
blocks or CAN library.
4-38
Constructing and Extracting CAN Data Frames
The dialog box contains the Bit Patterns parameter, which lets you define the
bit patterns in a flexible way. The data type entered in the control must be a
MATLAB cell array vector. The number of elements in the cell array define the
number of input ports shown by this block instance. The cell array elements
must be of type double array and define the position of each bit of the incoming
value (data typed input port) in the outgoing double value (data frame).
From a data type perspective (input ports), the block behaves like a Simulink
Sink block, and therefore the data types of the input ports are inherited from
the driving blocks.
The sample time of the block is also inherited from the driving blocks.
Therefore no explicit sample time must be provided in the block’s dialog box.
The functionality of the block is best explained by means of an example.
4-39
4 CAN I/O Support
Assume that a node on the CAN network needs to receive a CAN message with
identifier 156 having the following data frame content. The data frame must be
6 bytes long.
The bit pattern cell array, which bit-packs the data frame according to the
above specification, can look as follows:
{ [0:7] , [15:-1:8] , [16:23] , [25] , [-1,-1,26:31] , [32:47] }
And the Simulink model simulating the needed behavior would be as shown.
4-40
Constructing and Extracting CAN Data Frames
4-41
4 CAN I/O Support
to 1 as the default. Therefore a uint8 constant with value 255 must be brought
in externally. The constant 255 must get to bit position 16 to 23 (byte 2) of the
outgoing data frame.
Because bit 0 of data frame byte 3 (bit 24) must be 0, and 0 is the default bit
value if not referenced by a bit pattern array element, no explicit action is
taken here.
The fourth input is the flag of type Boolean, which has an example value of 1.
This value must become bit 1 of byte 3 (bit 25) of the data frame. Therefore the
single bit (element 1 of double array [25]) must get bit 25 of the data frame.
The fifth input is the control of type int8, which has an example value of 121.
But only bits 2 to 7 must be mapped into the outgoing data frame or, in other
words, bits 0 and 1 must be thrown away. Because indexing of incoming values
always starts with the first bit (bit 0), a special indexing value (-1) must be used
to skip bit 0 and 1 of the incoming int8 value. Bits 2 to 7 are directly mapped
to bits 2 to 7 of byte 3 (bits 26 to 31) of the outgoing data frame. This leads to
the following bit pattern: [-1,-1,26:31].
The sixth input is the value of type int16, which has an example value of
-12270. This value must become byte 4 and 5 (bits 32 to 47) of the outgoing data
frame. Therefore the first bit (element 1 of double array [32:47]) must get bit
32 of the data frame, the second bit 33, and so on. It is easiest to define this
mapping by the MATLAB colon operator (:).
The output of the block then consists of a double value representing the packed
data types within the first six bytes. The last two bytes are zero. This means
that even in the case where less than eight bytes are significant, the CAN data
frame is always represented by a double value (eight bytes). The value of the
constructed floating-point double does not have any particular meaning but
you still see it with a numerical display.
4-42
Constructing and Extracting CAN Data Frames
The data frame is then propagated to the CAN Send driver block and is sent as
part of a CAN message having identifier 156. In the Send block’s dialog box, the
data frame size is defined as 6 bytes. This ensures that only the first six bytes
of the incoming double value are transmitted as part of the CAN message.
4-43
4 CAN I/O Support
The sample time of the block is inherited from the driving block. Therefore no
explicit sample time need be provided in the block’s dialog box.
Note that if you unpack the data frame into a signed type (int8, int 16, or int
32), the block performs sign extension as necessary. For example, if the bit
pattern is [0:4], and the data type is int8, you are extracting 5 bits into an 8
bit wide signed type. In this case, bits 5, 6, and 7 are the same as bit 4, resulting
in the proper sign extension. This functionality enables you to pack and unpack
4-44
Constructing and Extracting CAN Data Frames
negative numbers without losing accuracy. In the preceding example, you can
pack and unpack numbers in the range [-16 : 15] (a fictitious int5 type).
The functionality of the block is easiest explained by means of an example. The
same example as used above demonstrates the functionality of the bit-packing
block. But in this case, the data frame is sent by an external CAN node and is
received by the target application running on an xPC Target system. Therefore
the bit-unpacking block is used to extract the various data fields from the
entire data frame. Because the bit pattern definitions of the packing and
unpacking block are symmetric, the bit pattern definition could look exactly the
same. There is one simple optimization possible: You do not need to extract
byte 2 (reserved area), because its content is known. The bit pattern edit field
can therefore look as follows:
{ [0:7] , [15:-1:8] , [25] , [-1,-1,26:31] , [32:47] }
4-45
4 CAN I/O Support
4-46
Detecting Time-Outs When Receiving CAN Messages
4-47
4 CAN I/O Support
The dialog box of the CAN Timeout Detection block has one edit field.
Timeout — Specify the time-out value, in seconds. The output of the block is:
4-48
Model Execution Driven by CAN Messages (Interrupt Capability of CAN Receive Blocks)
1 Replace the timer interrupt line in the kernel setup with the board’s
hardware interrupt line.
Both steps are slightly different for each of the three supported CAN boards.
Therefore the two steps are explained for each board type below.
CAN-AC2 (ISA)
The CAN-AC2 is an ISA board, and the hardware interrupt line is set by means
of hardware jumpers on the board. Refer to the Softing user manual for the
board on how to set a certain interrupt line. Select an interrupt line that is not
used by any other hardware device in the xPC Target system (for example by
the Ethernet card).
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop, and then click Options.
3 Ensure that in the Target selection section, the RTW system target file
field is set to xpctarget.tlc.
4-49
4 CAN I/O Support
5 In the Real-time interrupt source field, select the interrupt line number
that you have set using the jumpers on the board.
7 Open the dialog box of the CAN Receive block in the model that defines the
CAN message (identifier) to be used to fire the interrupt. Select the
Generate interrupts check box. Selecting this box declares all CAN
messages defined in this Receive block instance through their identifiers as
messages that fire an interrupt. In other words, it is not possible to define a
single CAN message within the set of defined identifiers to be the only one
to fire an interrupt. In most cases only the reception of one specific message
is used to drive the application execution. Therefore use at least two
instances of the Receive block. One to receive the CAN message that drives
the execution (Generate Interrupts selected) and the other for all other
normal CAN messages to be received (Generate Interrupts cleared).
CAN-AC2-PCI
The CAN-AC2 is a PCI board, and the hardware interrupt line is automatically
assigned by the PCI BIOS during the initialization of the target system. Use
the xPC Target function getxpcpci (see help getxpcpci) at the MATLAB
command prompt to query the target system for installed PCI devices and the
assigned resources. Write down the interrupt line number assigned to the
CAN-AC2-PCI board.
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop, and then click Options.
3 Ensure that in the Target selection section, the RTW system target file
field is set to xpctarget.tlc.
4-50
Model Execution Driven by CAN Messages (Interrupt Capability of CAN Receive Blocks)
5 In the Real-time interrupt source field, select the interrupt line number
that you retrieved with the getxpcpci command.
7 Open the dialog box of the CAN Receive block in the model that defines the
CAN message (identifier) to be used to fire the interrupt. Select the
Generate interrupts check box. Selecting this box declares all CAN
messages defined in this Receive block instance through their identifiers as
messages that fire an interrupt. In other words, it is not possible to define a
single CAN message within the set of defined identifiers to be the only one
to fire an interrupt. In most cases only the reception of one specific message
is used to drive the application execution. Therefore use at least two
instances of the Receive block. One to receive the CAN message that drives
the execution (Generate Interrupts selected) and the other for all other
normal CAN messages to be received (Generate Interrupts cleared).
CAN-AC2-104 (PC/104)
The CAN-AC2-104 is an ISA board (PC/104), and the hardware interrupt line
is set by means of a software setting within the CAN Setup driver block. Note
a free interrupt line that is not used by any other hardware device in the xPC
target system (for example by the Ethernet card).
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop, and then click Options.
3 Ensure that in the Target selection section, the RTW system target file
field is set to xpctarget.tlc.
5 In the Real-time interrupt source field, select the free interrupt line
number that you chose.
4-51
4 CAN I/O Support
7 In the model open the dialog box of the CAN Setup block for the
CAN-AC2-104 board. Select the chosen interrupt line in the Interrupt Line
pop-up menu and close the dialog box. Open the dialog box of the CAN
Receive block in the model that defines the CAN message (identifier) to be
used to fire the interrupt. Select the Generate interrupts check box.
Selecting this box declares all CAN messages defined in this Receive block
instance through their identifiers as messages that fire an interrupt. In
other words, it is not possible to define a single CAN message within the set
of defined identifiers to be the only one to fire an interrupt. In most cases
only the reception of one specific message is used to drive the application
execution. Therefore use at least two instances of the Receive block. One to
receive the CAN message that drives the execution (Generate Interrupts
selected) and the other for all other normal CAN messages to be received
(Generate Interrupts cleared).
After you complete these two steps, you are ready to build the model. After the
downloading has succeeded and the target application execution has been
started, the execution is now driven by the selected CAN messages. The
execution time information displayed on the target screen is now directly
dependent on the reception of the corresponding message. If no message is
received the time does not advance. You should ensure that the corresponding
CAN message on the other CAN node is only generated if the xPC target
application is running, otherwise unexpected interrupt messages might be
displayed on the target screen.
4-52
Defining Initialization and Termination CAN Messages
4-53
4 CAN I/O Support
Example
Consider an A/D converter module with a CANOpen interface. After the node
is powered up, the module is in preoperational mode, which is common for
CANOpen nodes. At least two initialization messages must be sent to the node
to make the module fully operational.
The first message puts the node from preoperational into operational mode.
The second message programs the module so that each time the converted A/D
value differs by more than 10 mV from the former conversion, a CAN message
is automatically sent, with the converted value as the data frame.
After the target application starts and the node is properly initialized, the node
automatically sends a CAN message, which the xPC target application receives
and then processes.
Before the target application execution is actually stopped, the module (node)
must be returned to preoperational mode. You do this by sending out one
corresponding termination message.
The initialization and termination message struct for this example could look
as follows:
% put node into operational mode
init(1).port=1;
init(1).type='Standard';
init(1).identifier=1536+11;
init(1).data=[hex2dec('22'),hex2dec('23'),hex2dec('64'),hex2dec(
'00'),hex2dec('01')];
init(1).pause=0.02;
4-54
CAN-AC2 and CANopen Devices
4-55
4 CAN I/O Support
• Synchronous
• Asynchronous
In the synchronous mode, the client transmits a remote frame to the server to
invoke an A/D-conversion of a specified channel. It then waits (poll) until the
converted value is received by an ordinary CAN data-message which will
contain the values. Synchronous mode leads to large latency times up to 20ms
(Tsmin=10ms). During this time period, the xPC Target gets stuck and this is
inacceptable.
In addition, the synchronous mode does not fit into the dynamic object model
implementation of the xPC Target CAN-drivers because remote frames have to
be transmitted.
In the asynchronous mode, the AIC711 sends PDOs automatically in a regular
manner to the client. A change in an analog input value invokes automatically
an A/D-conversion. After conversion, a PDO-message is constructed and sent
automatically to the client. This mode fits well into the object model of the
drivers. Therefore the CANopen devices should always be used in
asynchronous mode if used with xPC Target.
4-56
CAN-AC2 and CANopen Devices
////////////////////////////////////////////////////////////////
// Identifier and constant section
////////////////////////////////////////////////////////////////
#define AIC711_node_111
#define AIC711_sdo_base1536
#define MAS_boot 0
4-57
4 CAN I/O Support
////////////////////////////////////////////////////////////////
// Initialization section
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Termination section
////////////////////////////////////////////////////////////////
As soon as this file is placed into your project directory and the xPC Target
application is rebuilt, the messages defined above will be sent during
initialization and termination phase of the Setup block.
4-58
CAN-AC2 and CANopen Devices
The Receive block will read continuously the object to which the AIC711 sends
the PDOs (i.e. the converted A/D-values).
Because the output of this block contains the 8 bytes of the received CAN-data
as a double value, a conversion block (AIC711conversion) is necessary to split
the 8 bytes (double) into 4 doubles (output signals) that represent the A/D value
in volts for each of the four analog input channels. The conversion is made
according to the data representation of object 6401. You use the CAN
bit-unpacking block from the CAN Utilities library. For example, in the CAN
bit-unpacking block, set the Data types parameter to four vectors of int16 data
types:
{'it16' 'int16' 'int16' 'int16'}
You then need to multiply the output by the voltage range, which you should
already know. Note that you may need to convert the output to type double
first.
4-59
4 CAN I/O Support
The third channel is then stored with an outport block, which can be visualized
by the xPC Target scope functionality.
Because CAN-messages with id 0 (boot) and 1536+node_id (SDO) have to be
sent and CAN-messages with id 640+node_id (PDO) have to be received over
CAN-port 1, the dialog box of the Setup block must look as follows:
The Receive block receives the data (PDO) over CAN-message 640+node-i and
must look as follows:
4-60
CAN-AC2 and CANopen Devices
If more than one CANopen device is connected to the network, the dialog boxes
of the Setup and Receive blocks and the CANAC2_setup.c file have to be
extended accordingly. If you need for-loops in the CANAC2_setup.c, use the
variable CANAC2_counter.
If an analog output device (or digital output device) is connected to the
network, you must drag an additional Send block into the model to send the
PDOs to the newly connected CANopen server.
4-61
4 CAN I/O Support
4-62
5
CAN I/O Support for FIFO
Introduction (p. 5-2) This chapter describes the alternative First In First Out
(FIFO) CAN drivers provided with xPC Target.
CAN FIFO Driver Blocks for the The driver blocks described here support the
CAN-AC2-PCI with Philips SJA1000 CAN-AC2-PCI using FIFO mode.
CAN Controller (p. 5-6)
CAN FIFO Driver Blocks for the The driver blocks described here support the
CAN-AC2-104 with Philips SJA1000 CAN-AC2-104 (PC/104) using FIFO mode.
CAN Controller (p. 5-22)
Acceptance Filters (p. 5-38) The CAN controller’s acceptance filters can be used to
ensure that certain received messages referenced by their
identifiers get written into the receive FIFO.
Examples (p. 5-40) Examples involving FIFO CAN drivers.
5 CAN I/O Support for FIFO
Introduction
This chapter describes the alternative First In First Out (FIFO) CAN drivers
provided with xPC Target. The standard CAN drivers for the CAN boards from
Softing GmbH (http://www.softing.com) program the CAN board firmware
to run in Dynamic Object Buffer (DOB) mode. This mode is best suited for
real-time environments where it is mandatory that the driver latency time is
time deterministic. Actually, running the firmware in Dynamic Object Buffer
mode is always the best choice except for the undesired side effect of high driver
latency times.
• Sending a CAN message — When sending a CAN message, the latency time
is the time interval between the time accessing the board to provide all the
information for the CAN message to be sent and the time the board returns
the acknowledgment that the information has been received by the
firmware.
• Receiving a CAN message — When receiving a CAN message, the latency
time is the time interval between the time accessing the board to ask for
current data (object data) of a certain CAN identifier and the time the board
returns the actual data and other information about the CAN message.
With such an application, base sample times below 800 υs are impossible even
if the dynamics of the corresponding Simulink model are simple and would only
need 20 υs of computation time.
5-2
Introduction
Advantages of Dynamic Object Buffer mode — However, even if the CAN I/O
latency time in Dynamic Object Buffer mode is high, the benefit of this mode is
that the latency time stays constant almost independent of the traffic volume
on the CAN network. This means that the Dynamic Object Buffer mode is best
suited for xPC Target applications that only deal with a small subset of all CAN
messages going over the CAN network.
5-3
5 CAN I/O Support for FIFO
can easily exceed the latency encountered with the Dynamic Object Buffer
mode for the same application. There is another restriction specific to the FIFO
mode concept. Using more than one Read Receive FIFO block in a Simulink
model is not recommended, because a new event (message) read by one block
instance cannot be read again by another block instance (the event is no longer
in the FIFO buffer). Therefore the entire CAN receive part has to be
concentrated in one Read Receive FIFO block in your model. For the write
transmit FIFO side, this restriction does not apply. Here you can use as many
instances as you want.
The Setup block for the CAN FIFO mode controls the CAN acceptance filters of
the CAN controller. The acceptance filter defines a range of CAN messages not
to be forwarded to the receive FIFO. Filtering out unwanted CAN messages
can drastically reduce the read receive FIFO latency time because the
unwanted messages do not reach the receive FIFO. Unfortunately, the
acceptance filter process uses binary evaluation, which does not allow filtering
messages below and above a certain decimal range. Therefore the use of the
acceptance filter only resolves the problem for a small subset of CAN network
applications. See “Acceptance Filters” on page 5-38 for more information on
this.
Look again at the example of 12 messages to be received and eight messages to
be transmitted. If those 20 messages with their specific identifiers are the only
messages going over the CAN network (100% usage ratio) the total latency
time is
12*17 υs + 8*4 υs = 236 υs
This is a considerable smaller value than the 800 υs that results when you use
Dynamic Object Buffer mode drivers.
For the next case, assume that there are 12 additional messages going
regularly over the network that do not need to be processed by the target
application. Additionally, assume that those messages cannot be filtered by the
CAN controller acceptance filter. Then the total latency time increases to
12*17 υs +20*4 υs = 284 υs
There is no impact on the final result. That is the tradeoff. Therefore the FIFO
mode drivers are best suited for either CAN network monitoring applications
or low-latency CAN applications where the ratio between the number of
messages to be processed and the number of total messages going over the
network is high.
5-4
Introduction
FIFO mode drivers are especially suited for monitoring type applications,
because FIFO mode can return additional information such as the bus state or
the reception of error frames. Dynamic Object Buffer mode drivers do not allow
querying such information.
This documentation only covers the differences between the Dynamic Object
Buffer mode drivers (standard drivers), and the FIFO mode drivers introduced
here. It assumes that you are familiar with the Dynamic Object Buffer mode
drivers and have successfully run one of the loop-back tests provided with xPC
Target.
If you use FIFO mode drivers in your model, you must replace all Dynamic
Object Buffer mode blocks (Setup, Send, Receive) with FIFO mode driver
blocks. The CAN-AC2-xxx boards from Softing do not let you run the two CAN
ports in different modes. Therefore the mode has to be same for both ports, but
you can use more than one CAN board and run the boards in different modes
just by selecting the correct I/O driver blocks.
As mentioned in the standard CAN chapter, you should not use the CAN-AC2
(ISA) for new projects. Instead use the CAN-AC2-PCI. Therefore, FIFO mode
drivers are only provided for the CAN-AC2-PCI and the CAN-AC2-104 boards.
5-5
5 CAN I/O Support for FIFO
The third block group, CAN-AC2-PCI SJA 1000, contains the FIFO mode
subgroup.
5-6
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
The highlighted group contains all driver blocks available for FIFO Mode CAN.
5-7
5 CAN I/O Support for FIFO
Board — Defines the board being accessed by this driver block instance. If
multiple boards are present in the target PC, you can use the board number
(1…3) to differentiate the boards. The physical board referenced by the board
number depends on the PCI Slot parameter. If just one board is present in the
target system, select board number 1.
CAN 1 - physical bus — Defines the physical CAN bus type of CAN port 1. In
the board’s standard hardware configuration, only high-speed CAN is
5-8
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
For more information about these values, see the Softing user manual for this
board.
CAN 1 - acceptance — Defines the acceptance filters for the CAN 1 port.
Because the receive FIFO is filled with any CAN messages going over the bus,
the use of the CAN controller acceptance filters becomes important to filter out
unwanted messages already at the controller level. This acceptance filter
information is provided by a row vector with four elements in which the first
two are used to define the acceptance mask and acceptance code for standard
identifiers and the latter two for extended identifiers. The default value
defined by the Setup block does not filter out any messages. For information on
how to define the acceptance information to filter certain messages, see
“Acceptance Filters” on page 5-38.
CAN 2 - physical bus — Defines the physical CAN bus type of CAN port 2. In
the board’s standard hardware configuration, only high-speed CAN is
supported. By extending the board with lows-peed CAN piggyback modules,
you can also select low-speed CAN as the physical bus. Do not set this value
should to low-speed if no module is present for the corresponding CAN port. If
the module is present (see the Softing user manual on how to install the
modules), you can select between high-speed and low-speed CAN here.
CAN 2- baud rate — Defines the most common baud rates for CAN port 2. If
special timing is necessary (baud rate), select User defined.
5-9
5 CAN I/O Support for FIFO
CAN 2 - user defined baud rate — If you select User defined from the CAN
2 baud rate list, enter the four values for the timing information. The vector
elements have the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
CAN 2 - acceptance — Defines the acceptance filters for the CAN 2 port.
Because the receive FIFO is filled with any CAN messages going over the bus,
the use of the CAN controller acceptance filters becomes important to filter out
unwanted messages already at the controller level. This acceptance filter
information is provided by a row vector with four elements in which the first
two are used to define the acceptance mask and acceptance code for standard
identifiers and the latter two for extended identifiers. The default value
defined by the Setup block does not filter out any messages. For information on
how to define the acceptance information to filter certain messages, see
“Acceptance Filters” on page 5-38.
Enable error frame detection — If the CAN controller should detect error
frames and forward these to the Receive FIFO, select this box. Selecting this
box makes sense for monitoring applications where you want to be informed
about all events going over the bus. For low-latency time applications, selecting
this box might increase the FIFO Read driver block latency time because the
receive FIFO gets filled with additional events.
Initialization (struct) and Termination (struct) — Define the CAN messages
sent during initialization and termination of the Setup block. For more
information, see the standard CAN driver documentation in “Defining
Initialization and Termination CAN Messages” on page 4-53.
PCI Slot (-1: autosearch) — Defines the PCI slot in which the referenced board
(board number) resides. If only one CAN board is present in the target system,
the value for this control should be -1 for autosearch. This value ensures that
the xPC Target kernel automatically finds the board regardless of the PCI slot
it is plugged into. If two or more boards of this type are physically present in
the target PC, enter the bus number and the PCI slot number of the board
associated with this driver block. Use the format [BusNumber, SlotNumber].
Use the xPC Target function getxpcpci to query the target system for installed
5-10
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
PCI boards and the PCI slots they are plugged into. For more information see
help getxpcpci.
The board allows you to terminate each of the two CAN ports separately by
means of DIP switches at the rear panel. Refer to the Softing user manual on
how to set the DIP switches. Both CAN ports must be terminated properly if
you use the loop-back model provided to test the board and drivers.
Port — The value can be either 1 (port 1) or 2 (port 2) and defines the port the
CAN message is sent from.
Identifier — Identifier of the CAN message to be sent. If it is a standard CAN
message the valid range is 0 to 2047. If the CAN message is extended, the range
is 0 to 229-1.
Identifier type — The value can be either 0 (standard identifier range) or 1
(extended identifier range) and defines the identifier type of the outgoing CAN
message.
Data frame size — The value can be in the range of 0 to 8 and defines the data
frame size in bytes of the outgoing CAN message.
Data — This is the data for the data frame itself and is defined as a double
value (8 bytes). The CAN packing block is used to construct the data as a double
value.
5-11
5 CAN I/O Support for FIFO
Because all this information can be dynamically changed in FIFO mode during
application execution, the information is provided at the block input instead of
you setting them through block parameters. To be able to transmit more than
one CAN message per block instance, a matrix signal is used as a container for
all information.
The dimension of the matrix signal entering the block has to be n*5, where n is
the number of CAN messages to be sent by this block instance. Therefore each
row of the matrix signal defines one CAN message and each row combines the
five elements of information defined above (in this order).
For more on how to construct the correct matrix signal for the FIFO write
block, see “Examples” on page 5-40.
For certain applications it might be necessary to make the writing of a CAN
message into the transmit FIFO dependent on the model dynamics. For this
case, the matrix signal can also be of dimension n*6 instead of n*5. In this case,
the sixth column defines whether the corresponding CAN message is written
into the transmit FIFO (1) or not (0).
Board — Define the board used to send the CAN messages defined by this
block instance. For more information about the meaning of the board number,
see the Setup driver block described above. If just one board is present in the
target system, you should select 1.
Show status output port — Select this box to enable the status output port. If
the box is cleared, the block does not have an output port. If enabled, a port is
5-12
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
shown. The signal leaving the block is a vector of type double in which the
number of elements depends on the signal dimension of the block input port.
There is one element for each CAN message written into the transmit FIFO
and the value is identical to the return argument of function
CANPC_send_data(…), described in the Softing user manual. Refer to that
manual for more information.
Sample time — Defines the sample time at which the FIFO Write block is
executed during a model (target application) run.
You can use as many instances of the FIFO Write block in the model as needed.
For example, by using two instances of the block, you can send CAN messages
at different sample times. Or you can use multiple instances to structure your
model more efficiently.
Port — The value can be either 1 (port 1) or 2 (port 2) and reports the port at
which the CAN message was received.
5-13
5 CAN I/O Support for FIFO
Data frame size — If a data frame has been received, the length of the data in
bytes is reported by this element. Possible values are 0 to 8.
Timestamp — Time at which the event was received. The resolution of the
timestamp counter is 1 υs.
Data — Data of the data frame itself returned as a double value (8 bytes). The
CAN Unpacking block is used to extract the data from the double value.
5-14
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
Board — Defines the board used to send the CAN messages defined by this
block instance. For more information about the meaning of the board number,
see the Setup driver block described above. If one board is present in the target
system, select board number 1.
FIFO read depth — Defines the number of receive FIFO read attempts. Each
time the block is executed it reads this fixed number of events (CAN messages),
which lead to a deterministic time behavior regardless of the number of events
currently stored in the receive FIFO. The Read depth (m) also defines the size
of the matrix signal (m*6) leaving the first output port. If no event is currently
stored in the receive FIFO, the FIFO is read anyway, but the event type is
reported as 0 (no new event).
Show status output port — Select this box to enable the Status output port.
If the box is cleared (disabled), the block has one output port for the events. If
enabled, a second port is shown. The signal leaving that port is a vector of type
double with two elements:
[Number of lost messages (events), Bus state]
5-15
5 CAN I/O Support for FIFO
The first element returns the current value of the lost messages counter. The
receive FIFO can store up to 255 events. If the receive FIFO is not regularly
accessed for reading events, the FIFO is filled and the lost messages counter
starts to count up. This is an indicator that events (messages) will be
unavoidably lost. The second element returns the current bus state. Possible
values are
0 Error active
1 Error passive
2 Bus off
Sample time — Defines the sample time at which the FIFO Read block is
executed during a model (target application) run.
It is strongly recommended that you use only one instance of this block per
physical CAN board in your model. Otherwise you might get the unwanted
behavior that one instance would read events that must be processed by blocks
connected to the other, second instance.
5-16
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
CAN port — Defines the filter criterion for the CAN port. From the list, select
Any, 1, or 2.
Message type command — Defines the filter criterion for the event types. This
entry can consist of a concatenation of space-delimited keywords that are
SDF Standard data frame
SRF Standard remote frame
EDF Extended data frame
ERF Extended remote frame
EF Error frame
NE No new event
CBS Change of bus state
Message type selection mode — Defines how the event type (message type),
from the Message type command parameter, is treated. If you select Include,
the event type criterion is the sum of the concatenated keywords. If you select
Exclude, the event type criterion is equal to all event types minus the sum of
the concatenated keywords.
Identifier(s) — Defines the filter criterion for the CAN message identifiers. A
set of identifiers can be provided as a row vector.
5-17
5 CAN I/O Support for FIFO
Identifier selection mode — Defines how the identifier criterion, from the
Identifier(s) parameter, is treated. If you select Include, the identifier
criterion is the sum of all specified identifiers. If you select Exclude, the
identifier criterion is equal to all identifiers minus the specified identifiers.
You can use as many instances of this block in your model as needed. Usually,
you connect several instances in parallel to the output of the FIFO Read driver
block to filter out particular messages or events. For more information on how
to do this, see “Examples” on page 5-40.
Board — Defines the board accessed to read the current transmit FIFO level.
For more information about the meaning of the board number, see the Setup
driver block described above. If just one board is present in the target system,
select board number 1.
5-18
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
Sample time — Defines the sample time at which the FIFO Read XMT Level
driver block is executed during a model (target application) run.
Board — Defines the board accessed to reset the transmit FIFO. For more
information about the meaning of the board number, see the Setup driver block
described above. If just one board is present in the target system, select board
number 1.
Sample time — Defines the sample time at which the FIFO Reset XMT driver
block is executed during a model (target application) run.
5-19
5 CAN I/O Support for FIFO
Board — Defines the board accessed to read the current receive FIFO level.
For more information about the meaning of the board number, see the Setup
driver block described above. If just one board is present in the target system,
select board number 1.
Sample time — Defines the sample time at which the FIFO Read RCV Level
driver block is executed during a model (target application) run.
5-20
CAN FIFO Driver Blocks for the CAN-AC2-PCI with Philips SJA1000 CAN Controller
Board — Defines the board accessed to reset the receive FIFO. For more
information about the meaning of the board number, see the Setup driver block
described above. If just one board is present in the target system, select board
number 1.
Sample time — Defines the sample time at which the FIFO Reset RCV driver
block is executed during a model (target application) run.
5-21
5 CAN I/O Support for FIFO
The fourth block group, CAN-AC2-104 SJA 1000, contains the FIFO Mode
subgroup.
5-22
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
The highlighted group contains all the driver blocks available for FIFO mode
CAN.
5-23
5 CAN I/O Support for FIFO
Board — Defines the board accessed by this driver block instance. If multiple
boards are present in the target PC, you can use the board number (1…3) to
differentiate the boards. The physical board referenced by the board number
depends on the PCI Slot parameter. If just one board is present in the target
system, select board number 1.
5-24
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
CAN 1 - baud rate — Defines the most common baud rates for CAN port 1. If
special timing is necessary (baud rate), you can select User defined.
CAN 1 - user defined baud rate — If you selected User defined from the CAN
1 - baud rate list, enter four values for the timing information. The vector
elements have the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
CAN 1 - acceptance — Defines the acceptance filters for CAN port 1. Because
the receive FIFO is filled with any CAN messages going over the bus, the use
of the CAN controller acceptance filters becomes important to filter out
unwanted messages already at the controller level. This acceptance filter
information is provided by a row vector with four elements in which the first
two are used to define the acceptance mask and acceptance code for standard
identifiers and the latter two for extended identifiers. The default value
defined by the Setup block does not filter out any messages. For information on
how to define the acceptance information to filter certain messages, see
“Acceptance Filters” on page 5-38.
CAN 2 - baud rate — Defines the most common baud rates for CAN port 2. If
special timing is necessary (baud rate), you can select User defined.
CAN 2- user defined baud rate — If you selected User defined from the CAN
1 - baud rate list, enter four values for the timing information. The vector
elements have the following meanings:
[ Prescaler, Synchronization-Jump-Width, Time-Segment-1,
Time-Segment-2 ]
For more information about these values, see the Softing user manual for this
board.
CAN 2 acceptance — Defines the acceptance filters for CAN port 2. Because
the receive FIFO is filled with any CAN messages going over the bus, the use
of the CAN controller acceptance filters becomes important to filter out
unwanted messages already at the controller level. This acceptance filter
information is provided by a row vector with four elements in which the first
two are used to define the acceptance mask and acceptance code for standard
identifiers and the latter two for extended identifiers. The default value
5-25
5 CAN I/O Support for FIFO
defined by the Setup block does not filter out any messages. For information on
how to define the acceptance information to filter certain messages, see
“Acceptance Filters” on page 5-38.
Enable error frame detection — Defines whether the CAN controller should
detect error frames and forward these to the receive FIFO. Selecting this box
makes sense for monitoring applications where you want to be informed about
all events going over the bus. For low-latency time applications, selecting this
box might increase the FIFO Read driver block latency, because the receive
FIFO is filled with additional events.
Initialization command structure and Termination — Defines CAN
messages sent during initialization and termination of the Setup block. For
more information, see Chapter 4, “CAN I/O Support.”
I/O base address — Defines the I/O base address of the board to be accessed
by this block instance. The I/O base address is given by the DIP switch setting
on the board itself. The I/O address range is 3 bytes and is mainly used to
identify the memory base address the board should use. See the Softing user
manual for this board on how you can set the I/O base address. The I/O base
address entered in this control must correspond with the DIP switch setting on
the board. If more than one board is present in the target system, you must
enter a different I/O base address for each board. In this case, the I/O base
address itself defines which board is referenced by which board number.
Memory base address — Defines the memory base address of the board to be
accessed by this block instance. The memory base address is a software setting
only (no corresponding DIP switch is found on the board). The memory address
range is 4 KB. If more than one board is present in the target system, you must
enter a different memory base address for each board and you must ensure that
the defined address ranges do not overlap. Because the xPC Target kernel only
reserves a subset of the address range between 64 KB and 1 MB for
memory-mapped devices, the address ranges must lie within the following
range:
C0000-DC000
The board allows you to terminate each of the two CAN ports separately by
means of DIP switches at the back panel of the board. Refer to the Softing user
manual on how to set the DIP switches. Both CAN ports must be properly
terminated before you can use the loop-back model provided to test the board
and drivers.
5-26
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
Port — The value can be either 1 (port 1) or 2 (port 2) and defines at which port
the CAN message is sent from.
Identifier — Identifier of the CAN message to be sent. If it is a standard CAN
message, the valid range is 0 to 2047. If extended, the range is 0 to 229-1.
Identifier type — The value can be either 0 (standard identifier range) or 1
(extended identifier range) and defines the identifier type of the outgoing CAN
message.
Data frame size — The value can be in the range of 0 to 8 and defines the data
frame size in bytes of the outgoing CAN message
Data — Data for the data frame itself, defined as a double value (8 bytes). The
CAN Packing block is used to construct the data as a double value.
Because all this information can be dynamically changed in FIFO mode during
application execution, the information is provided at the block input instead of
using the block parameters. To transmit more than one CAN message per block
instance, use a matrix signal as a container for all information.
The dimension of the matrix signal entering the block must be n*5, where n is
the number of CAN messages to be sent by this block instance. Therefore, each
row of the matrix signal defines one CAN message and each row combines the
five elements of information defined above (in this order).
5-27
5 CAN I/O Support for FIFO
For more information on how to construct the correct matrix signal for the
FIFO write block, see “Examples” on page 5-40.
For certain applications it might be necessary to make the writing of a CAN
message into the transmit FIFO dependent on the model dynamics. For this,
the matrix signal can also be of dimension n*6 instead of n*5. In this case, the
sixth column defines whether the corresponding CAN message is written into
the transmit FIFO (value 1) or not (value 0).
Board — Defines the board used to send the CAN messages defined by this
block instance. For more information about the meaning of the board number,
see the Setup driver block described above. If just one board is present in the
target system, select board number 1.
Show status output port — Selecting this check box lets you enable the Status
output port. If the box is cleared (disabled), the block does not have an output
port. If enabled, a port is shown. The signal leaving the block is a vector of type
double in which the number of elements depends on the signal dimension of the
block input port. There is one element for each CAN message written into the
transmit FIFO and the value is identical to the return argument of function
CANPC_send_data(…), described in the Softing user manual. Refer to that
manual for more information.
Sample time — Defines the sample time at which the FIFO Write block is
executed during a model (target application) run.
5-28
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
You can use as many instances of the FIFO Write block in the model as needed.
For example, by using two instances of the block with different sample times,
you can send CAN messages out at different rates. Or you can use multiple
instances to structure your model more efficiently.
Port — The value is either 1 (port 1) or 2 (port 2) and reports the port at which
the CAN message was received.
Identifier — Identifier of the CAN message being received. If it is a standard
CAN message, the range is 0 to 2047. If the CAN message is extended, the
range is 0 to 229-1.
5-29
5 CAN I/O Support for FIFO
Event type — Defines the type of event read from the receive FIFO. The
following values are defined from the Softing user manual:
16 No new event
17 Standard data frame received
18 Standard remote frame received
19 Transmission of a standard data frame is confirmed
20 -
21 Change of bus state
22 -
23 -
24 Transmission of a standard remote frame is confirmed
25 Extended data frame received
26 Transmission of an extended data frame is confirmed
27 Transmission of an extended remote frame is confirmed
28 Extended remote frame received
29 -
30 -
31 Error frame detected
Data frame size — If a data frame has been received, the length of the data in
bytes is reported by this element. Possible values are 0 to 8.
Timestamp — Reports the time at which the event was received. The
resolution of the timestamp counter is 1 µ s.
Data — Data of the data frame itself. It is returned as a double value (8 bytes).
The CAN Unpacking block is used to extract the data from the double value.
5-30
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
Board — Defines the board to use to send the CAN messages defined by this
block instance. For more information about the meaning of the board number,
see the Setup driver block described above. If just one board is present in the
target system, select board number 1.
FIFO read depth — Defines the number of receive FIFO read attempts. Each
time the block is executed, it reads this fixed number of events (CAN
messages), which leads to a deterministic time behavior independent of the
number of events currently stored in the receive FIFO. The read depth (m) also
defines the size of the matrix signal (m*6) leaving the first output port. If no
event is currently stored in the receive FIFO, the FIFO is read anyway but the
event type is reported as 0 (no new event).
Show status output port — Lets you enable the status output port. If the box
is cleared (disabled), the block has one output port for events. If enabled, a
second port is shown. The signal leaving that port is a vector of type double
with two elements:
[Number of lost messages (events), Bus state]
The first element returns the current value of the lost messages counter. The
receive FIFO can store up to 255 events. If the receive FIFO is not regularly
accessed for reading events, the FIFO is filled and the lost messages counter
starts to increment. This is an indicator that events (messages) will be
5-31
5 CAN I/O Support for FIFO
unavoidably lost. The second element returns the current bus state. Possible
values are
3 Error active
4 Error passive
5 Bus off
Sample time — Defines the sample time at which the FIFO Read block is
executed during a model (target application) run.
Only use one instance of this block per physical CAN board in your model.
Otherwise you may get unwanted behavior when one instance reads events
while the events are being processed by blocks connected to the other, second
instance.
5-32
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
The dialog box of the FIFO Read Filter block lets you define the following
settings:
CAN port — Defines the filter criterion for the CAN port. Possible choices are
Any, 1, or 2.
Message type command — Defines the filter criterion for the event types. This
entry can consist of a concatenation of space-delimited keywords:
SDF Standard data frame
SRF Standard remote frame
EDF Extended data frame
ERF Extended remote frame
EF Error frame
NE No new event
CBS Change of bus state
Message type selection mode — Defines how the event type (message type)
listed in Message type command is treated. If you select Include, the event
type criterion is the sum of the concatenated keywords. If you select Exclude,
the event type criterion is equal to all event types minus the sum of the
concatenated keywords.
5-33
5 CAN I/O Support for FIFO
Identifier(s) — Defines the filter criterion for the CAN message identifiers. A
set of identifiers can be provided as a row vector.
Identifier selection mode — Defines how the identifier criterion entered in
the Identifier(s) parameter is treated. If you select Include, the identifier
criterion is the sum of all specified identifiers. If you select Exclude, the
identifier criterion is equal to all identifiers minus the specified identifiers.
You can use as many instances of this block in your model as needed. Usually,
you connect several instances in parallel to the output of the FIFO Read driver
block to filter out particular messages or events. For more information on how
to do this, see “Examples” on page 5-40.
5-34
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
Board — Defines the board to access to read the current transmit FIFO level.
For more information about the meaning of the board number, see the Setup
driver block described above. If just one board is present in the target system,
select board number 1.
Sample time — Defines the sample time at which the FIFO Read XMT Level
driver block is executed during a model (target application) run.
Board — Defines the board to access to reset the transmit FIFO. For more
information about the meaning of the board number, see the Setup driver block
described above. If just one board is present in the target system, select board
number 1.
Sample time — Defines the sample time at which the FIFO Reset XMT driver
block is executed during a model (target application) run.
5-35
5 CAN I/O Support for FIFO
Board — Defines the board to access to read the current receive FIFO level.
For more information about the meaning of the board number, see the Setup
driver block described above. If just one board is present in the target system,
select board number 1.
Sample time — Defines the sample time at which the FIFO Read RCV Level
driver block is executed during a model (target application) run.
5-36
CAN FIFO Driver Blocks for the CAN-AC2-104 with Philips SJA1000 CAN Controller
The block has a single input port of type double. If a scalar value of 1 is passed,
the transmit FIFO is reset; if 0 is passed no action takes place.
Board — Defines the board to access to reset the receive FIFO. For more
information about the meaning of the board number, see the Setup driver block
described above. If just one board is present in the target system, select board
number 1.
Sample time — Defines the sample time at which the FIFO Reset RCV driver
block is executed during a model (target application) run.
5-37
5 CAN I/O Support for FIFO
Acceptance Filters
As mentioned earlier, you can use the CAN controller’s acceptance filters to
ensure that certain received messages referenced by their identifiers are
written into the receive FIFO. Therefore, fewer read attempts are necessary to
get at the messages that are of importance for the target application.
The behavior of the acceptance filter is described for standard and extended
identifier ranges individually (one for standard identifiers and one for
extended identifiers). Each acceptance filter is defined by a mask parameter
and a code parameter.
The mask parameter defines, for each bit of the identifier, whether the filtering
process cares about this bit or not. A 0 means “don’t care” and a 1 means “do
care.”
The code parameter then defines, for each bit of the identifier, that the filtering
process cares about (defined by the mask parameter), what the bit value has to
be (0 or 1).
For standard identifiers the mask parameter and code parameter must be
both, in the range 0 to 2047. For extended identifiers the mask parameter and
code parameter must be both, in the range 0 to 229-1.
The filtering process evaluates the following binary expression:
and( xor( mask, identifier ), code )
If all bits of the resulting value are 0, the message with this identifier is
accepted. If any bit is 1, the message is voided.
According to this description, acceptance filters work using binary evaluation,
while most applications differentiate messages (identifiers) in a decimal or
hexadecimal manner. As a consequence, it is possible to filter messages, whose
identifiers are above a certain decimal number. The opposite (identifiers below
a certain decimal number) cannot be achieved in a general way.
5-38
Acceptance Filters
Examples
The default values for the mask parameter and the code parameter in the FIFO
setup driver block are both 0. These parameter values ensure (the above
expression always evaluates to 0) that all incoming messages will reach the
receive FIFO (no filtering takes place). All parameter values are defined using
decimal numbers. You can use the MATLAB function hex2dec to define
hexadecimal numbers in the dialog box entry.
Assume a CAN application where messages with the following identifiers
(standard) are crossing the CAN network:
2-30, 48-122 (decimal)
5-39
5 CAN I/O Support for FIFO
Examples
This section includes the following topics:
• “Example 1” on page 5-40 — Loop-back test from CAN port 1 to CAN port 2
• “Example 2” on page 5-42 — Filtering out events
• “Example 3” on page 5-43 — Constructing CAN messages dynamically at
run-time
• “Example 4” on page 5-44 — Stopping the execution when a FIFO overflow
occurs
• “Example 5” on page 5-44 — Stopping the execution when a FIFO overflow
occurs
• “Example 6” on page 5-45 — Using CAN acceptance filters
Example 1
Start with a simple model using the FIFO Setup block, FIFO Write block, FIFO
Read block, and FIFO Read Filter block. The entire CAN network consists of a
single physical connection between CAN port 1 and port 2 (loop-back
configuration). Both CAN ports must be terminated properly.
The objective of the application is the following:
• Send a message with extended identifier 5100 and change data every
millisecond on port 1.
• Send a message with standard identifier 112 and change data every even
millisecond on port 1.
• Send a message with standard identifier 114 and change data every odd
millisecond on port 1.
• Read three events every millisecond from the receive FIFO on port 2.
• Display the incoming data of the three messages separately.
• Do not use acceptance filtering (all messages are accepted).
The data transmitted with the CAN messages are double values in all the
following examples. This has been chosen for simplicity. You should refer to the
bit-packing and bit-unpacking chapter of the standard CAN driver
documentation on how to construct the data.
The first implementation uses the following scheme.
5-40
Examples
The matrix signal entering the FIFO Write block consists of all three messages
including the Control element (sixth element); therefore the matrix size is [3,6].
The sample time of the FIFO Write block is defined as 1 millisecond. For the
standard identifiers that must be sent out every other millisecond, the Control
element is alternated accordingly. You do this by using a Unit delay block with
corresponding feedback as the Control element value.
The FIFO Read block has a read depth of 3 and also a base sample of 1
millisecond. Three FIFO filter blocks are connected to the output of the FIFO
read block (in parallel) to extract the information of the incoming CAN
messages. You can display the model by typing, in the MATLAB Command
Window, either xpccanpcififo1 or xpccan104fifo1.
The model uses several xPC Target scope blocks to display different types of
data on the target screen:
• Scope 1 (numerical) displays the status vector leaving the FIFO Write block.
• Scope 2 (numerical) displays the status vector [lost-message-counter, bus
state] leaving the FIFO Read block.
• Scope 3 (graphical) plots the data of all three CAN messages being received.
5-41
5 CAN I/O Support for FIFO
• Scopes 4-6 (numerical) displays the other relevant message data of the three
incoming CAN messages individually (port, identifier, type, data length,
timestamp).
Example 2
When looking at the time behavior of the model, you can observe that at each
millisecond two CAN messages are sent out via the FIFO Write block, while the
FIFO Read block reads three events each millisecond from the receive FIFO.
This implies that one of the three events leaving the FIFO Read block is of type
No new event. You can show this by attaching another FIFO Filter block in
parallel that filters “No new events”, and then displaying the second output
port, which reports the number of matching events. You can display the model
by typing, in the MATLAB Command Window, either xpccanpcififo2 or
xpccan104fifo2.
Having observed this, you can reduce the read depth of the FIFO Read block
from 3 to 2. This would not change the overall behavior of the model. As a
5-42
Examples
positive side effect, the latency time of the FIFO Read block becomes smaller
and therefore the model’s cycle time as well.
Example 3
Now look at a second implementation on the FIFO Write side. Instead of
providing three messages in parallel, you can just write two messages and then
alternate the identifier and data of the second CAN message to be sent.
Because the messages are now sent every millisecond in any case, you need not
provide the Control element, thereby reducing the matrix entering the FIFO
Write block to a size of [2,5]. You can display the model by typing, in the
MATLAB Command Window, either xpccanpcififo3 or xpccan104fifo3.
This implementation behaves exactly like the first implementation, but shows
how CAN messages to be sent can be constructed dynamically at run-time.
5-43
5 CAN I/O Support for FIFO
Example 4
Look at the situation where the read depth parameter of the FIFO Read block
in the model above is set to 1 instead of 2 or 3. This leads to a receive FIFO
overflow when the execution time reaches 256 milliseconds. Here, for example,
the execution should be stopped if the overflow occurs. This can do this easily
by evaluating the lost message counter value leaving the status output port of
the FIFO Read block. You can display the model by typing, in the MATLAB
Command Window, either xpccanpcififo4 or xpccan104fifo4.
Example 5
Consider a different handling of the receive FIFO overflow: If the receive FIFO
level reaches the value of 200, the receive FIFO should be reset to delete all
currently stored events. The application execution has to continue normally.
For this, you need to add two new driver blocks to the model, which are used to
read the receive FIFO level and then reset it. You can display the model by
typing, in the MATLAB Command Window, either xpccanpcififo5 or
xpccan104fifo5.
5-44
Examples
Example 6
The next example shows the use of the CAN acceptance filters. First the Read
depth parameter of the FIFO Read block is set to a value of 2. Then the
identifier of the second standard message is changed from 114 to 188. The goal
is to filter any CAN messages with an identifier larger than 127. This means
that the receive FIFO never contain the CAN message with identifier 188. Also,
the FIFO Filter block, filtering CAN message with identifier 114, is changed to
filter the message with identifier 188. To achieve this, the Acceptance Filters
parameter of CAN port 2 in the FIFO Setup block must be set accordingly:
[2047-127, 0, 0, 0]
If you rebuild and reexecute the target application, you can see the following:
• Scope with ID 6 shows 0 for all elements of the vector leaving the
corresponding FIFO Filter block. The message with identifier 188 is never
received.
5-45
5 CAN I/O Support for FIFO
• Scope with ID 3 shows one of the data traces always being zero.
• Scope with ID 7 shows a value of 1, which reflects that the read depth could
be reduced to 1, because only one message per millisecond reaches the
receive FIFO now.
You can display the model by typing, in the MATLAB Command Window,
either xpccanpcififo6 or xpccan104fifo6.
5-46
6
xPC Target provides support for the UDP/IP communication protocol. This chapter includes the
following sections:
User Datagram Protocol (UDP) (p. 6-2) Send and receive messages from a target application
using UDP packets.
xPC Target UDP Blocks (p. 6-5) Description of the block parameter fields for the xPC
Target blocks that support UDP communication.
xPC Target UDP Examples (p. 6-13) Communicate between two xPC Target applications,
between a target application and Simulink models or
systems, or between two Simulink models.
6 UDP I/O Support
What Is UDP?
The User Datagram Protocol (UDP) is a transport protocol layered on top of
the Internet Protocol (IP) and is commonly known as UDP/IP. It is analogous
to TCP/IP. A convenient way to present the details of UDP/IP is by
comparison to TCP/IP as presented below:
6-2
User Datagram Protocol (UDP)
Further, time-outs can be established, because the sender will know (from
the first few packets) how long it takes on average for a packet to be sent
and its acknowledgment received. UDP, on the other hand, simply sends
the packets and does not keep track of them. Thus, if packets arrive out of
sequence, or are lost in transmission, the receiving end (or the sending end)
has no way of knowing.
TCP communication can be compared to a telephone conversation where a
connection is required at all times and two-way streaming data (the words
spoken by each party to the conversation) are exchanged. UDP, on the other
hand, can be compared to sending letters by mail (without a return address).
If the other party is not found, or the letter is lost in transit, it is simply
discarded. The analogy fails, however, when considering the speed of
communication. Both TCP and UDP communication roughly happen at the
same speed, because both use the underlying Internet Protocol (IP) layer.
6-3
6 UDP I/O Support
Why UDP?
UDP was chosen as the transport layer for xPC Target precisely because of
its lightweight nature. Since the primary objective of an application running
in the xPC Target framework is real-time, the lightweight nature of UDP
ensures that the real-time application will have a maximum chance of
succeeding in real-time execution. Also, the datagram nature of UDP is ideal
for sending samples of data from the Real-Time Workshop-generated
application. Because TCP is stream oriented, separators between sets of data
must be used for the data to be processed in samples. It is easier to build an
application to deal with unreliable data than it is to decode all of this
information in realtime. If the application is unable to process the data as
quickly as it arrives, the following packets can just be ignored and only the
most recent packet can be used.
Communication can involve a packet made up of any Simulink data type
(double, int8, int32, uint8, etc.), or a combination of these. xPC Target
provides blocks for combining various signals into one packet (packing), and
then transmitting it. xPC Target also provides blocks for splitting a packet
(unpacking) into its component signals that can then be used in a Simulink
model. The maximum size of a packet is limited to about 500 bytes.
6-4
xPC Target UDP Blocks
The blocks are located under the UDP heading in the library. The Send block
takes as input a vector of type uint8, which it sends. This is limited to a
length of about 500 bytes (i.e., a 1 by 500 vector). Similarly, the Receive block
outputs a vector of uint8. To convert arbitrary Simulink data types into this
vector of uint8, a Pack block is provided, while an Unpack block is provided
to convert a vector of uint8s back into arbitrary Simulink data types.
You can have up to 32 UDP blocks in any given model (Send and Receive
blocks combined in any order).
xPC Target includes a Byte Reversal block for communication with
big-endian architecture systems. You do not need this block if you are
communicating between 80x86-based PC systems running either xPC Target
or Microsoft Windows.
6-5
6 UDP I/O Support
All the blocks are set up to work both from within Simulink and from an
application running under xPC Target. However, you must be careful when
using a Simulink simulation and an xPC Target application to communicate,
or when using two Simulink models. This is because a Simulink model
executes in nonreal time and can be several times faster or slower than real
time. The sample time of the send and receive blocks and the sample time of
the Simulink model must be set so that the communication can proceed
properly.
6-6
xPC Target UDP Blocks
The IP address to receive from parameter can be left with the default value
of 0.0.0.0. This accepts all UDP packets from any other computer. If set to a
specific IP address, only packets arriving from that IP address are received.
The IP port to receive from parameter is the port that the block accepts data
from. The other end of the communication sends data to the port specified
here. The output port width is the width of the acceptable packets. You can
obtain this when designing the other side (send side) of the communication.
The sample time can be set to -1 for inheritable sample time, but it is
recommended that this be set to some specific (large) value to eliminate
chances of dropped packets. This is especially true when you are using a small
base sample time.
6-7
6 UDP I/O Support
6-8
xPC Target UDP Blocks
As seen in the figure above, the data types of each of the signals must be
specified as a cell array of strings in the correct order. Once this is done, the
block automatically converts itself to one with the correct number of input
ports. There is always one output port. The supported data types are double,
single, int8, uint8, int16, uint16, int32, uint32, and boolean. The byte
alignment field specifies how the data types are aligned. The possible values
are: 1, 2, 4, and 8. The byte alignment scheme is simple, and ensures that
each element in the list of signals starts on a boundary specified by the
alignment relative to the start of the vector. For example, say the Input port
data types are specified as
{'uint8','uint32','single','int16','double'}
and an alignment of 4 is used. Assume also that all the signals are scalars.
The first signal then starts at byte 0 (this is always true), the second at byte
4, the third at byte 8, the fourth at byte 12, and the fifth at byte 16. Note that
the sizes of the data types used in this example are 1, 4, 4, 2, and 8 bytes
respectively. This implies that there are “holes” of 3 bytes between the first
and second signal and 2 bytes between the fourth and fifth signal.
A byte alignment of 1 means the tightest possible packing. That is, there are
no holes for any combination of signals and data types.
6-9
6 UDP I/O Support
As shown in the figure above, the Output port datatypes field is the same as
the Input port data types field of the matching Pack block. The Pack block
is on the sending side and the Unpack block is on the receiving side in
different models. The Output port dimensions field contains a cell array,
with each element the dimension returned by the size function in MATLAB
of the corresponding signal. This should normally be the same as the
dimensions of the signals feeding into the corresponding Pack block.
6-10
xPC Target UDP Blocks
6-11
6 UDP I/O Support
Machine word length — Select one of the following machine word lengths to
which to convert the data:
• Byte
• Word
• Double Word
6-12
xPC Target UDP Examples
UDP Example
This section provides an example of how to set up two-way data exchange
between two xPC Target systems, between xPC Target and Simulink, or
between two Simulink models. When one or both of the systems is running
Simulink in nonrealtime, be sure to set the sample time properly.
Note To use UDP for your xPC Target system, be sure to create a TCP/IP
boot disk and boot the target PC with that boot disk.
• uint8 (3x3)
• uint16 (1x1)
• double (2x4)
udpsendreceiveB to udpsendreceiveA
• single (4x1)
• double (2x2)
• uint32 (2x2)
• int8 (5x3)
For the purposes of this example, all the inputs are generated using Simulink
Constant blocks that use the MATLAB random number function (rand). The
random numbers are generated by Real-Time Workshop using this function
6-13
6 UDP I/O Support
at the time of code generation. To generate the vector of uint8 (3x3), use the
MATLAB function
uint8(255 * rand(3,3))
since 255 is the maximum value for an unsigned 8-bit integer. The other
values are generated similarly.
With this setup, construct the send side of udpsendreceiveA.
Note that the width of the UDP packet to be sent is 75 bytes. The parameters
used in the Pack block are Input port datatypes
{'uint8','uint16','double'} and Byte Alignment 1.
For the Send block, set the IP Address to send to to 192.168.0.2. This is the
hypothetical address of the system that will run udpsendreceiveA. Set the IP
Port to send to to 25000 (picked arbitrarily). The sample time is set to 0.01.
6-14
xPC Target UDP Examples
For the Unpack block, Byte Alignment is set to 1 and the Output port
datatypes is set to {'uint8','int16','double'} from the Pack block in
udpsendreceiveA. The Output port dimensions is set to {[3 3],1,[2 4]}
from the dimensions of the inputs to the Pack block in udpsendreceiveA.
Note that in udpsendreceiveB, the second output port of the Receive block is
sent into a terminator. You can use this to determine when a packet has
arrived. The same is true for the outputs of the Unpack block, which in a real
model would be used in the model.
6-15
6 UDP I/O Support
6-16
xPC Target UDP Examples
IP port 25000
Byte alignment 2
6-17
6 UDP I/O Support
Byte alignment 2
IP port 25000
6-18
7
xPC Target interfaces the target PC to an ARINC 429 bus using the ARINC 429 blocks provided by
the xPC Target I/O block library. The xPC Target ARINC 429 blocks work with the Condor
Engineering CEI-X20 series boards (http://www.condoreng.com). This chapter includes the
following sections
Condor (p. 7-2) PCI board series that interfaces target PCs to ARINC 429
data buses
7 Aerospace I/O Support
Condor
The commercial and aircraft transport industry uses the ARINC 429 protocol.
The Aerospace ARINC-429 driver library allows xPC Target applications to
connect to an ARINC bus network to send and receive 32-bit words. This
chapter assumes that you are familiar with the ARINC 429 standard.
xPC Target supports the ARINC 429 protocol with the following Condor
boards. These board interface a target PC to an ARINC 429 data bus. These
boards support the PCI bus.
• CEI-520
• CEI-520A
xPC Target provides the following driver blocks to support these boards:
Use the following utility blocks to format the data sent to and received from the
CEI-x20 Send and Receive blocks:
7-2
Condor
Board Characteristics
Board name CEI-520, CEI-520A
Manufacturer Condor
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
Timer tick length — Specify the length of a timer tick in .25 microsecond
units. The default value is 4000, which results in a tick length of one
millisecond. Time tags (if selected from a Decode ARINC 429 Words from
Receive block) are provided in units of timer ticks. A timer tick specifies the
units in which the time the time tags is expressed. This concept is provided as
a convenience to users.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
7-3
7 Aerospace I/O Support
Note If you are using a corresponding Receive block, be sure to select the
same parity setting for this channel.
7-4
Condor
Sample time — Base sample time or a multiple of the base sample time.
Note The output port of a Receive block is a signal of type double, but the
data on this port is encoded in a nonstandard way. Normally, you should feed
this output port into an ARINC Decode block (which converts the data into
standard double output). You can also feed it into blocks such as MUX blocks
which do not interpret the data. However, before feeding this port into a block
such as an xPC Target Scope block which does interpret the data, you must
first pass it through an ARINC Decode block.
7-5
7 Aerospace I/O Support
words from the hardware receive buffer. The word count associated with the
output port would then be 0.
Baud rate — From the list, select
• 12.5 Kbits/sec
• 100 Kbits/sec
If you are using a corresponding Send block, be sure to select the same baud
rate setting for this channel.
Parity — From the list, select
• odd
• none
If you are using a corresponding Send block, be sure to select the same parity
setting for this channel.
Sample time — Base sample time or a multiple of the base sample time.
• Condor CEI-520A Send block — The ARINC Send block converts the data
into standard double output. This is the block to which you will most likely
send data from the ARINC Encode block.
• MUX block — The MUX block does not interpret the data. After the MUX
block, you can send it to an ARINC Send block.
7-6
Condor
Type Interpretation
7-7
7 Aerospace I/O Support
the scalar value is applied to the length of the data type vector. The block
works with the data types as follows
Type Effect
Raw The block ignores any resolution value. However, you must
still include an associated value in the resolution vector.
BNR The resolution value specifies, in the same units as the input
signal, the value of the least significant bit of the binary data
field. For example, if the associated resolution value is 10 and
the input signal contains the value 1000, the output ARINC
word will contain the binary number 100 in its data field.
SDI vector — Enter a vector or scalar value as the SDI vector. This must be a
vector of the same length as the data type vector. Otherwise, the scalar value
is applied to the length of the data type vector.
7-8
Condor
Type Effect
Raw The block ignores any resolution value. However, you must
still include an associated value in the resolution vector.
BNR, BCD, If the SDI element is in the range 0 to 3, the block sets the
Discretes SDI field of the corresponding output word to that value. If
an SDI element has a value of -1, the block performs no SDI
processing on the corresponding output word.
SSM vector — Enter a vector or scalar value as the SDI vector. This must be
a vector of the same length as the data type vector. Otherwise, the scalar
value is applied to the length of the data type vector.
If the SSM element is in the range 0 to 3, the block sets the SSM field of the
corresponding output word to that value. If an SSM element has a value of -1,
the block performs no SSM processing on the corresponding output word. Note
that the meaning of a given SSM value differs depending on the data type of
the ARINC word.
7-9
7 Aerospace I/O Support
Type Interpretation
The elements of the data type vector determine how the input ARINC value is
converted to a corresponding double output. The following describes how this
block performs the conversion. For the purposes of this description, n denotes
the length of the data type vector.
• The output width is one of the following, depending on your time tag
selection
- 2n + 1 — This is the output width if you select the Provide time tags
check box. The width consists of a count element, followed by n data
elements, followed by n time tag elements.
- n + 1 — This is the output width if you do not select the Provide time tags
check box. The width consists of a count element followed by n data
elements.
The count element indicates how many valid messages the block has decoded
during the current sample time. The count element has a nonzero value if a
7-10
Condor
at least one message on the data element is currently valid, and zero
otherwise. If the count element has a value greater than one, the block
asserts only the most recent valid message on the output port.
• The Decode block buffers its input internally. It updates its output port only
during sample times when it has successfully assembled at least one
complete message of length n.
Note that more than one complete message might be assembled during one
sample time. The Decode block successively overwrites these messages such
that only the most recent message is on the output port.
Type Effect
Raw The block ignores any resolution value. However, you must
still include an associated value in the resolution vector.
BNR, BCD The resolution value specifies, in output port units, the value
of the least significant bit of the data field. For example, if
the resolution is 10 and the input data contains the value
100, the output signal will contain the number 1000.
Discretes The block ignores any resolution value. However, you must
still include an associated value in the resolution vector.
Sync mask — Enter a value, in hexadecimal, to specify which bits (if any) of
the input words are the sync bits. (A sync bit lets you specify, using other
parameters, when a message should begin.) The Decode block will examine
these bits to look for the start of the next message. A message might be a string
of one or more words. For example, a sync mask value of 0x300 equals
1100000000 in binary. This value selects the SDI bits (bits 9 and 10) as the
sync bits. This functionality works in conjunction with the Sync value
parameter.
If the sync mask is 0x0, no sync logic is used. In this case, the next word always
begins a new message.
7-11
7 Aerospace I/O Support
Sync value(s) — This parameter specifies the sync logic for the block. Enter
one hex value to specify oneSync, two hex values separated by a space for
twoSync logic. For example, the sync value
0x100
Once the block locates the beginning of a message, it uses the next n input
words with the appropriate label to assemble the next output message. The
block does not use sync logic until it is time to begin the assembly of a new
message.
Provide time tags — Select this check box to enable an output port of width
2n + 1, with time tag data in the last n elements.
7-12
8
Access IO
WDG-CSM
The WDG-CSM is a watchdog timer used to detect computer failure. You can
program this watchdog to reboot the system when a programmable timeout
occurs. The timeout interval can range from 20 microseconds to 400 seconds.
xPC Target supports this board with one driver block:
• “WDG-CSM Watchdog Timer” on page 8-2
Board Characteristics
Board name WDG-CSM
Manufacturer Access IO
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
8-2
9
ADDI-DATA
APCI-1710
The APCI-1710 is a general-purpose counting board with four function
modules.
xPC Target supports this board with this driver block:
• “APCI-1710 Incremental Encoder” on page 9-2
Note, xPC Target only supports the 32-bit mode for this board. As a result, each
port only supports a single encoder.
Board Characteristics
Board name APCI-1710
Manufacturer ADDI-DATA
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
9-2
APCI-1710
• Virtual Absolute — Gets the counter value as an absolute value after the
reference point of the encoder has been reached for the first time. The first
output of the block outputs the absolute angle of the connected encoder in
radians. As long as the reference point has not been reached for the first
time, the second block output is zero. If the reference point is reached for the
first time, and only for the first time, the corresponding counter is reset to
zero and the second output goes to 1. From then on the output 1 outputs an
absolute angle even if the encoder is turned multiple times. The second
output can be used for controlling or switching different Simulink
submodels.
• Reset and Index Output Up-Dating — Gets the counter value in the range
of 0..2*pi or –pi..+pi where the counter is reset every time the reference point
is reached. The first output of the block outputs the angle of the connected
encoder in radian. As long as the reference point has not been reached for the
first time, the second block output is zero. Every time the reference point is
reached, the counter is reset to zero and, depending on the direction of the
encoder at this event, the output value is either incremented or decremented
by the value 1. In other words the second output outputs the actual number
of turns n because the reference point has been reached for the first time. If
the second output is multiplied by 2*pi and added to the value of the first
output, you get an absolute multiturn angle, even if the counter is reset
periodically.
Mode — From the list, choose single, double, or quadruple. This parameter
specifies the phase detection mode, that is, how many phase changes of the
specified module are detected (see the APC1-1710 manual).
9-3
9 ADDI-DATA
Hysteresis — From the list choose either off or on. The Hysteresis parameter
specifies whether a counter should skip a tick if the direction changes (see the
APC1-1700 manual).
Resolution — Specifies the resolution of the connected incremental encoder for
one revolution.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
9-4
PA-1700
PA-1700
The PA1700 is a counter board with three 24-bit counters for connecting three
incremental encoders.
xPC Target supports this board with this driver block:
• “PA-1700 Incremental Encoder” on page 9-5
Board Characteristics
Board name PA1700
Manufacturer ADDI-DATA
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
9-5
9 ADDI-DATA
Hysteresis — From the list choose either off or on. The Hysteresis parameter
specifies whether a counter should skip a tick if the direction changes (see the
PA1700 manual).
Resolution — Specifies the resolution of the connected incremental encoder for
one revolution.
Sample time — Model base sample time or a multiple of the base sample time.
Base Address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
The following jumpers must be set according to the parameters entered above:
For information on how to connect the encoders to the board, see the PA1700
manual.
If you want to use the 5 V power supply from the board (PIN20), you must
insert Fuse 1 on the board. Refer to the PA1700 manual.
9-6
10
Adlink
This chapter describes the Adlink boards supported by xPC Target (http://www.adlinktech.com).
Adlink PCI-8133 (p. 10-2) Three-phase encoder counter and PWM output board
Adlink PCI-6208A (p. 10-5) Digital to analog converter board with four bits of digital
input and four bits of digital output lines.
10 Adlink
Adlink PCI-8133
The Adlink PCI-8133 is a three-phase encoder counter and PWM output board.
This board has three 16-bit quadruple AB phase encoder counters, 12-bit PWM
resolution, and eight general-purpose digital input and output lines.
xPC Target supports the three-phase PWM generation section of the board
with this driver block:
• “PCI-8133 3-Phase PWM” on page 10-2
Board Characteristics
Board name PCI-8133
Manufacturer Adlink
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support No
Of Note
• There is one input port for each phase (channel). You can select and order
each phase (channel) individually.
• Hardware outputs are open collector lines that can draw a maximum current
of 20 mA.
• To enable PWM generation, ensure that the OENA pin (pin 34 of connector
CN1) is connected to pin VCC (pin 19 of connector CN1).
10-2
Adlink PCI-8133
• Although the duty cycle inputs are of type double, the duty cycle resolution
is finite. The value of the Factor n determining square wave period
parameter defines the duty cycle resolution. For example, if the value of
Factor n determining square wave period is 1000 for an output period of
200 microseconds, the duty cycle can be adapted with a resolution of 1000
steps (from 0...1), in relation to the value of Factor n determining square
wave period. The duty cycle resolution lowers by a smaller output period (or
higher output frequency).
Channel vector — Defines the channel (phase) that is active. Enter a vector of
numbers between 1 and 3 to This parameter also specifies the input port of the
block is connected to the channel. Channel value 1 represents phase U, value
2 represents phase V, and value 3 represents phase W. The maximum length
of the vector is 3.
Reset vector — Enter a scalar or a vector that is the same length and channel
order as the Channel vector value. Enter 1 or 0. A value of 1 resets the output.
A value of 0 retains the last value of the duty cycle when the target application
stops. You can specify a different reset vector value for each channel.
Initial duty cycle vector — Enter a scalar or a vector that is the same length
and channel order as the Channel vector value. Enter 1 or 0. A value of 1 sets
the reset duty cycle for the corresponding channel if the Reset vector for that
channel is also 1.
Sample time — Base sample time or a multiple of the base sample time.
10-3
10 Adlink
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
10-4
Adlink PCI-6208A
Adlink PCI-6208A
The Adlink PCI-6208A is a digital to analog converter board. This board has
four bits of digital input and four bits of digital output lines.
xPC Target supports this board with the following driver blocks:
Board Characteristics
Board name PCI-6208A
Manufacturer Adlink
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
ma Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4.
10-5
10 Adlink
If you set the range to 0 to 20 ma, the current should oscillate from 0 to 20 ma
at omega radians per second. The current will only reach 20 ma if the load
resistance is less than or equal to 500 ohms. If the load resistance is 1000 ohms,
the maximum current that 10 volts can drive is only 10 ma. The top half of the
sine wave will be clipped off.
Note the following:
• The scaling in this block is correct for the current output ports, not the
voltage ones.
• This block limits output to positive values only. This is in response to the
board hardware manual caution that states driving a negative voltage from
the D/A converter to the voltage to current output board might cause damage
to the current output.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running. For example, if Channel
vector is [1 2] and the Reset vector is [1], the action taken will be the same
as if Reset vector was set to [1 1]. Both channels will be reset to their initial
values when model execution is stopped.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
10-6
Adlink PCI-6208A
the time the model is downloaded and the time it is started. When model
execution is stopped, the corresponding position in Reset vector is checked.
Depending on that value, the channel is either reset to the initial value or
remains at the last value attained while the model was running. For example,
assume that Channel vector is [ 1 2 ], Reset vector is [1 0], and Initial
value vector is [2.3 5.6]. On initial download, channel 1 is set to 2.3 ma and
channel 2 to 5.6 ma. When the model is stopped, channel 1 resets to 2.3 ma and
channel 2 remains at the last value attained.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
Channel vector — Enter a vector of numbers to specify the digital input port
ports.
For example, to use the first and second digital input channels enter
[1, 2]
10-7
10 Adlink
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4. Each input can be listed at most
once in this vector.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 8.
10-8
Adlink PCI-6208A
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running. For example, if Channel
vector is [1 2] and the Reset vector is [1], the action taken will be the same
as if Reset vector was set to [1 1]. Both channels will be reset to their initial
values when model execution is stopped.
Initial value vector — The initial value vector contains the initial voltage
values for the digital output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that value is
the initial value for all channels. The channels are set to the initial values
between the time the model is downloaded and the time it is started. When
model execution is stopped, the corresponding position in Reset vector is
checked. Depending on that value, the channel is either reset to the initial
value or remains at the last value attained while the model was running. For
example, assume that Channel vector is [ 1 2 ], Reset vector is [1 0], and
Initial value vector is [0 1]. On initial download, channel 1 is set to off and
channel 2 to on. When the model is stopped, channel 1 resets to off and channel
2 remains at the last value attained.
If the Initial value vector value is greater than 0.5, the corresponding digital
output port is turned on, otherwise it is turned off.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
10-9
10 Adlink
10-10
11
Advantech
PCL-1800 (p. 11-3) 16 single or eight differential analog channels, two analog
output D/A channels, and 16 digital input lines and 16
digital output lines
PCL-711B (p. 11-8) Eight single-ended analog input channels, one analog
output channel, and 16 digital input lines and 16 digital
output lines
PCL-726 (p. 11-12) Six independent analog output D/A channels, and 16
digital input lines and 16 digital output lines
PCL-727 (p. 11-16) 12 independent analog output D/A channels, 16 digital
input lines and 16 digital output lines
PCL-728 (p. 11-20) Two independent analog output D/A channels
PCL-812 (p. 11-22) 16 single ended analog input channels, two analog output
D/A channels, and 16 digital input lines and 16 digital
output lines
PCL-812PG (p. 11-27) 16 single or eight differential analog channels, two analog
output D/A channels, and 16 digital input lines and 16
digital output lines
PCL-818 (p. 11-32) 16 single or eight differential analog channels, two analog
output D/A channels, and 16 digital input lines and 16
digital output lines
PCL-818H (p. 11-38) 16 single or eight differential analog channels, one analog
output D/A channel, and 16 digital input lines and 16
digital output lines
11 Advantech
PCL-818HD (p. 11-43) 16 single or eight differential analog channels, one analog
output D/A channel, and 16 digital input lines and 16
digital output lines
PCL-818HG (p. 11-48) 16 single or eight differential analog input (A/D)
channels, one analog output (D/A) channel, and 16 digital
input lines and 16 digital output lines
PCL-818L (p. 11-53) 16 single or eight differential analog input (A/D)
channels, one analog output (D/A) channel, and 16 digital
input lines and 16 digital output lines
11-2
PCL-1800
PCL-1800
The PCL-1800 is an I/O board with 16 single or eight differential analog
channels (12-bit) with a maximum sample rate of 330 KHz, two analog output
D/A channels (12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name PCL-1800
Manufacturer Advantech
Bus Type ISA
Access Method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-3
11 Advantech
Number the channels beginning with 1 even if the board manufacturer starts
the numbering of the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
For example, if the first channel is -10 to +10 volts and the second channel is 0
to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Input coupling — From the list, select one from the following list of input
modes:
11-4
PCL-1800
Your choice must correspond to the MUX switch setting on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
0 to +10 10 0 to +5 5
11-5
11 Advantech
For example, if the first channel is -10 to +10 volts and the second channel is 0
to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
11-6
PCL-1800
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-7
11 Advantech
PCL-711B
The PCL-711B is an I/O board with eight single-ended analog input channels
(12-bit) with a maximum sample rate of 25 kHz, one analog output channel
(12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with four driver blocks:
Board Characteristics
Board name PCL-711B
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-8
PCL-711B
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
For example, if the first channel is -10 to +10 volts, and the second channel is
-2.5 to 2.5 volts, enter
[-10,-2.5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-9
11 Advantech
volts Double 1
11-10
PCL-711B
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-11
11 Advantech
PCL-726
The PCL-726 is an I/O board with, six independent analog output D/A channels
(12-bit), 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
• “PCL-726 Analog Output (D/A)” on page 11-12
• “PCL-726 Digital Input” on page 11-14
• “PCL-726 Digital Output” on page 11-15
Board Characteristics
Board name PCL-726
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-12
PCL-726
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
0 to +10 10
0 to +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-13
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-14
PCL-726
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-15
11 Advantech
PCL-727
The PCL-727 is an I/O board with 12 independent analog output D/A channels
(12-bit), 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
• “PCL-727 Analog Output (D/A)” on page 11-16
• “PCL-727 Digital Input” on page 11-18
• “PCL-727 Digital Output” on page 11-19
Board Characteristics
Board name PCL-727
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-16
PCL-727
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to +5 5
0 to 10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-17
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-18
PCL-727
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-19
11 Advantech
PCL-728
The PCL-728 is an I/O board with two independent analog output D/A channels
(12-bit).
xPC Target supports this board with this driver block:
• “PCL-728 Analog Output (D/A)” on page 11-20
Board Characteristics
Board name PCL-728
Manufacturer Advantech
Bus Type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-20
PCL-728
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
0 to +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-21
11 Advantech
PCL-812
The PCL-812 is an I/O board with 16 single-ended analog input channels
(12-bit) with a maximum sample rate of 30 KHz, two analog output D/A
channels (12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCL-812
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-22
PCL-812
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
For example, if the first channel is -10 to +10 volts, and the second channel is
-5 to 5 volts, enter
[-10,-5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-23
11 Advantech
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
0 to +5V 5
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
11-24
PCL-812
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-25
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-26
PCL-812PG
PCL-812PG
The PCL-812PG is an I/O board with 16 single or eight differential analog
channels (12-bit) with a maximum sample rate of 30 KHz, two analog output
D/A channels (12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCL-812PG
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-27
11 Advantech
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
0 to +5 5
0 to +2.5 2.5
0 to +1.25 1.25
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-28
PCL-812PG
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 V -5
0 to 10 V 10
0 to +5 V 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
11-29
11 Advantech
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-30
PCL-812PG
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-31
11 Advantech
PCL-818
The PCL-818 is an I/O board with 16 single or eight differential analog
channels (12-bit) with a maximum sample rate of 100 KHz, two analog output
D/A channels (12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCL-818
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-32
PCL-818
and 8. For example, to use the first and second analog output (A/D) channels,
enter
[1,2]
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
0 to +5 5
0 to +2.5 2.5
0 to +1.25 1.25
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Input coupling — From the list, select one from the following list of input
modes:
11-33
11 Advantech
Your choice must correspond to the MUX switch setting on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
11-34
PCL-818
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 V -5
0 to 10 V 10
0 to +5 V 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-35
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
11-36
PCL-818
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-37
11 Advantech
PCL-818H
The PCL-818H is an I/O board with 16 single or eight differential analog
channels (12-bit) with a maximum sample rate of 100 KHz, one analog output
D/A channel (12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCL-818H
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-38
PCL-818H
and 8. For example, to use the first and second analog output (A/D) channels,
enter
[1,2]
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
0 to +5 5
0 to +2.5 2.5
0 to +1.25 1.25
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Input coupling — From the list, select one from the following list of input
modes:
11-39
11 Advantech
This choice must correspond to the MUX switch setting on the board.
Sample time —Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
11-40
PCL-818H
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-41
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-42
PCL-818HD
PCL-818HD
The PCL-818HD is an I/O board with 16 single or eight differential analog
channels (12-bit) with a maximum sample rate of 100 KHz, one analog output
D/A channels (12-bit), and 16 digital input lines and 16 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCL-818HD
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-43
11 Advantech
and 8. For example, to use the first and second analog output (A/D) channels,
enter
[1,2]
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
0 to +5 5
0 to +2.5 2.5
0 to +1.25 1.25
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings must correspond to the DIP switch settings on the board.
Input coupling — From the list, select one from the following list of input
modes:
11-44
PCL-818HD
Your choice must correspond to the MUX switch setting on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
11-45
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-46
PCL-818HD
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-47
11 Advantech
PCL-818HG
The PCL-818 is an I/O board with 16 single or eight differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 100 KHz, one analog
output (D/A) channel (12-bit), and 16 digital input lines and 16 digital output
lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCL-818HG
Manufacturer Advantech
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
11-48
PCL-818HG
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
0 to +1 1
0 to +0.1 0.1
0 to +0.01 0.01
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
11-49
11 Advantech
The range settings must correspond to the DIP switch settings on the board.
Input coupling — From the list, select one from the following list of input
modes:
Your choice must correspond to the MUX switch setting on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
11-50
PCL-818HG
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-51
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-52
PCL-818L
PCL-818L
The PCL-818L is an I/O board with 16 single or eight differential analog input
(A/D) channels (12-bit) with a maximum sample rate or 40 KHz, one analog
output (D/A) channels (12-bit), 16 digital input lines, and 16 digital output
lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Manufacturer Advantech
volts Double 1
11-53
11 Advantech
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
For example, if the first channel is -10 to +10 volts, and the second channel is
-5 to 5 volts, enter
[-10,-5]
The range settings must correspond to the DIP switch settings on the board.
Input coupling — From the list, select one from the following list of input
modes:
11-54
PCL-818L
Your choice must correspond to the MUX switch setting on the board.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
11-55
11 Advantech
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-56
PCL-818L
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
11-57
11 Advantech
11-58
12
Analogic
This chapter describes the Analogic I/O boards supported by xPC Target
(http://www.analogic.com).
AIM12 (p. 12-2) I/O board with 16 single or 8 differential analog input
(A/D) channels (12-bit)
AIM16 (p. 12-6) I/O board with 16 single or 8 differential analog input
(A/D) channels (16-bit)
12 Analogic
AIM12
This board comes in three configurations from the factory. The configurations
are the AIM12-1/104, the AIM16-1/104, and the AIM16-2/104. The
AIM16-1/104 and the AIM16-2/104 differ only in the time needed to acquire
each sample. The AIM12-1/104 acquires 4 fewer bits, but since the 12 bits are
placed in the high 12 bits of the result word, the internal scaling factors are
identical to those used with the AIM16. The output of the AIM12 changes in
larger steps. Gain settings for the AIM12 are also different than for the AIM16.
When acquiring samples from multiple channels, the board is driven in its
burst mode when the highest clock rate available for the board is used. The
AIM12-1/104 can acquire all 16 channels in 160 microseconds.
The AIM12 hardware can acquire from 1 to 16 (single ended) channels at each
sample time. These channels must be in a contiguous group, but can start with
any channel number and end with any channel number that is greater than or
equal to the start channel number. A single channel is acquired by setting both
first channel and last channel to the same value.
The choice of unipolar or bipolar conversion range is made by placing jumpers
in accordance with the hardware manual. The driver is able to read the
hardware configuration and adjusts the integer to float conversion as
necessary.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name AIM12
Manufacturer Analogic
Bus type PC/104
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
12-2
AIM12
volts Double 1
Last channel — This is the last channel to acquire. The number must be
greater than or equal to the first channel. In Single-ended (16 channels)
input mode, the number must be less than or equal to 16. In Differential (8
channels) input mode, the number must be less than or equal to 8.
Input coupling — From the list, select one from the following list of input
modes:
12-3
12 Analogic
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Channel group — Choose Lower 8 bits to connect to channels 1 through 8 or
Upper 8 bits to connect to channels 9 through 16.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as determined by the hardware jumpers on the board.
12-4
AIM12
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Channel group — Choose Lower 8 bits to connect to channels 1 through 8 or
Upper 8 bits to connect to channels 9 through 16.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as determined by the hardware jumpers on the board.
12-5
12 Analogic
AIM16
This board comes in three configurations from the factory. The configurations
are the AIM12-1/104, the AIM16-1/104 and the AIM16-2/104. The
AIM16-1/104 and the AIM16-2/104 differ only in the time needed to acquire
each sample. The AIM12-1/104 acquires 4 fewer bits, but since the 12 bits are
placed in the high 12 bits of the result word, the internal scaling factors are
identical to those used with the AIM16. The output of the AIM12 changes in
larger steps. Gain settings for the AIM12 are also different than for the AIM16.
When acquiring samples from multiple channels, the board is driven in its
burst mode when the highest clock rate available for the board is used. The
AIM16-1/104 can acquire all 16 channels in 160 microseconds while the
AIM16-2/104 completes the same acquisition in 80 microseconds.
The AIM16 hardware can acquire from 1 to 16 (single ended) channels at each
sample time. These channels must be in a contiguous group, but can start with
any channel number and end with any channel number that is greater than or
equal to the start channel number. A single channel is acquired by setting both
first channel and last channel to the same value.
The choice of unipolar or bipolar conversion range is made by placing jumpers
in accordance with the hardware manual. The driver is able to read the
hardware configuration and adjusts the integer to float conversion as
necessary.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name AIM16
Manufacturer Analogic
Bus type PC/104
Access method I/O mapped
12-6
AIM16
volts Double 1
Last channel — This is the last channel to acquire. The number must be
greater than or equal to the first channel. In Single-ended (16 channels)
input mode, the number must be less than or equal to 16. In Differential (8
channels) input mode, the number must be less than or equal to 8.
Input coupling — From the list, select one from the following list of input
modes:
12-7
12 Analogic
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Channel group — Choose Lower 8 bits to connect to channels 1 through 8 or
Upper 8 bits to connect to channels 9 through 16.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as determined by the hardware jumpers on the board.
12-8
AIM16
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Channel group — Choose Lower 8 bits to connect to channels 1 through 8 or
Upper 8 bits to connect to channels 9 through 16.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as determined by the hardware jumpers on the board.
12-9
12 Analogic
12-10
13
BittWare
This chapter describes the BittWare boards supported by xPC Target (http://www.bittware.com).
Audio-PMC+ (p. 13-2) Professional audio board with 8 channels of audio input
and output.
13 BittWare
Audio-PMC+
The Audio-PMC+ board is an audio board with 8 I/O channels.
xPC Target supports this board with these driver blocks:
Block parameters for the input and output blocks appear the same.
Board Characteristics
Board name Audio-PMC+
Manufacturer BittWare
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support No
Features
• Input and output are in the form of the Signal Processing Blockset frame
signal type when the frame is larger than a single sample.
• The analog input block outputs a double or 32 bit integer frame of data.
• The Audio-PMC+ board performs acquisition simultaneously for all the
selected channels in a model.
• The analog output block is dynamically typed. The integer or double data
type is taken from the connection instead of a block parameter.
13-2
Audio-PMC+
1 With the Audio-PMC+ off the carrier board, look for 6 pairs of pins along one
edge. For proper operation with xPC Target, none of the pairs should be
jumpered.
2 If there are any jumpers present, remove and then reinstall the jumpers
with only one pin connected. Leave the other side of the jumper hanging.
Leaving the jumpers like this will provide you with the jumpers if you want
to use the board in ROM bootable mode at some future time.
Output Format — Specify the format that the data takes. The choices are
The unscaled integer format is usable with blocks that can accept fixed point
data. This format contains the data in the lower 24 bits of a 32 bit integer
with sign extension in the upper 8 bits.
This parameter is only settable for the analog input block. The analog output
block determines the data type from the connection and sets itself
appropriately.
Frame Size, Sample Rate, and Sampletime — These three parameters are
not independent but are related by:
13-3
13 BittWare
For example, if you set Frame Size to 32 and Sample Rate to 40000, specify
Sampletime as -1. It is computed internally to 0.0008 seconds. This example
model will execute every 0.0008 seconds, which is every 32 samples at 40 KHz.
Conversely, you can also specify that you want to execute every 1.0 ms with a
Frame Size of 64 samples. Specify Sample Rate as -1. It is computed to be
64000 Hz.
The implementation of Sample Rate on the Audio-PMC+ might cause the rate
on your board to be inexact. Audio-PMC+ derives the sample rate using the
PWM0 output from the first 21065L SHARC DSP chip. The base clock that
effects this output is the 60 MHz CPU clock for sample rates between 100 KHz
and 20 KHz and a prescaled 30 MHz CPU clock (half the 60 MHz CPU clock)
for sample rates between 8 KHz and 20 KHz.
The sample rate is implemented internally by specifying the total number of
counts per sample interval. For example, the number of counts for a sample
rate of 44.1 KHz is calculated as
6 3
60 ×10 ⁄ 44.1 ×10 = 1360.544217
This value is rounded down to 1360. To calculate the actual clock sample rate,
divide 60 MHz by the number of counts
6
60 ×10 ⁄ 1360 = 44117.647
The result indicates that the sample rate is off by 0.04%. This calculation
assumes that the CPU clock is exactly 60 MHz.
Since you can build a model with just input or just output, the three rate
parameters are included in both block parameter dialogs. You must set them
to equal values if you have a model that has both. If they are not equal, you will
get an error when you try to build the model.
The practical limit on Sample Rate is
8000 ≤ SampleRate ≤ 100000
Below 8 KHz, the output digital filter does not seem to work, although the
converter continues to work there.
Frame Size values can be between 1 and 256. If the specified or computed
frame size exceeds 256, the driver will return an error during initialization.
13-4
Audio-PMC+
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Note The use of multiple boards, at the same time and in the same model, is
unsupported.
Frame Size, Sample Rate, and Sampletime — These three parameters are
not independent but are related by:
13-5
13 BittWare
Conversely, you can also specify that you want to execute every 1.0 ms with a
Frame Size of 64 samples. Specify Sample Rate as -1. It is computed to be
64000 Hz.
The implementation of Sample Rate on the Audio-PMC+ might cause the rate
on your board to be inexact. Audio-PMC+ derives the sample rate using the
PWM0 output from the first 21065L SHARC DSP chip. The base clock that
effects this output is the 60 MHz CPU clock for sample rates between 100 KHz
and 20 KHz and a prescaled 30 MHz CPU clock (half the 60 MHz CPU clock)
for sample rates between 8 KHz and 20 KHz.
The sample rate is implemented internally by specifying the total number of
counts per sample interval. For example, the number of counts for a sample
rate of 44.1 KHz is calculated as
6 3
60 ×10 ⁄ 44.1 ×10 = 1360.544217
This value is rounded down to 1360. To calculate the actual clock sample rate,
divide 60 MHz by the number of counts
6
60 ×10 ⁄ 1360 = 44117.647
The result indicates that the sample rate is off by 0.04%. This calculation
assumes that the CPU clock is exactly 60 MHz.
Since you can build a model with just input or just output, the three rate
parameters are included in both block parameter dialogs. You must set them
to equal values if you have a model that has both. If they are not equal, you will
get an error when you try to build the model.
The practical limit on Sample Rate is
8000 ≤ SampleRate ≤ 100000
Below 8 KHz, the output digital filter does not seem to work, although the
converter continues to work there.
Frame Size values can be between 1 and 256. If the specified or computed
frame size exceeds 256, the driver will return an error during initialization.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
13-6
Audio-PMC+
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Note The use of multiple boards, at the same time and in the same model, is
unsupported.
1 15 KHz
2 30 KHz
3 40 KHz
4 45 KHz
8 70 KHz
16 80 KHz
32 80 KHz
64 100KHz
128 100KHz
256 100KHz
If fewer than all 8 inputs and outputs are in use, then the maximum sample
rate increases.
13-7
13 BittWare
These above rates were obtained from testing at The MathWorks. As with all
hardware benchmarks, results might vary, depending on a number of
hardware conditions. For example, the following hardware elements, among
others, might effect your throughput:
Model Notes
Model Execution Timing — To run the model, the xPC Target model is
executed when each frame completes on the board. Set the simulation
parameters to use the interrupt from the Audio-PMC+ rather than the timer
interrupt when running the model. First, you need to determine the interrupt
vector number to which the board is set. This is determined by the BIOS in the
target machine during boot.
This command lists board information for all installed PCI devices that xPC
Target knows about.
2 Find the IRQ specified for this board. This is the interrupt source number
you need to specify in the xPC target code generation options field in step
6 of the following procedure.
13-8
Audio-PMC+
1 From the MATLAB Command Window, type the name of your Simulink
model.
6 Select the interrupt number to which the board is set (from step 2 in the
previous procedure).
7 Click the I/O board generating the interrupt list and select AudioPMC+
from the list.
Failure to set the interrupt vector as described, which results in your using the
xPC Target timer, will not stop the model from running. However, you will
occasionally see corrupt data since the Audio-PMC+ clock and the xPC Target
timer drift relative to each other and will sometimes overlap.
Example Models — Two example models are included with this version in the
xpcdemos directory. Correct operation of either of these requires that the
interrupt source be set correctly in the simulation parameters dialog.
xpc8audiochannels.mdl shows the use of all 8 input and 8 output channels at
the same time. A block from the Signal Processing Blockset is used to convert
from frame to sample based signals to drive the xPC Target scopes.
xpcaudiospectrum.mdl uses the xPC Target Spectrum Scope subsystem from
the xpcdspspectrum sample model with the Audio-PMC+ as the source. This
model only works correctly with Frame Size set to 1 because of the way that the
spectrum scope displays the results.
13-9
13 BittWare
13-10
14
BVM
This chapter describes the BVM I/O boards supported by xPC Target (http://www.bvmltd.co.uk).
PMCDIO64 (p. 14-2) A 64-bit digital I/O board with two ports. Each port can be
configured to be either 32 independent 1-bit channels or a
single 32-bit wide integer channel.
14 BVM
PMCDIO64
The PMCDIO64 is a 64-bit digital I/O board. The hardware provides 64 bits,
which the driver splits into two ports of 32 bits each. Each port can be
configured to be either input or output. In addition, each port can be configured
to be either 32 independent 1-bit channels or a single 32-bit wide integer
channel.
xPC Target supports this board with these driver blocks:
Board Characteristics
Manufacturer BVM
14-2
PMCDIO64
If the format is 32 One bit channels, then the channel vector specifies the
configuration of the block. Each output is a double with value of 0 or 1. The
value is 0 when the hardware input voltage is low.
If the format is Single 32 bit port, then the output from the block is a 32-bit
integer where all 32 bits on the hardware feed into the single output. The
channel vector is not used in this mode and is unavailable on the Block
Parameters dialog box. The least significant bit is the lowest numbered bit in
the hardware manual.
Channel vector — This is a vector of channels. This parameter is only used
when the format is 32 One bit channels. Channels are numbered from 1 to
32 even though the hardware manual labels them 0 to 31.
Port — Each half of the 64 bits is a separate port. Port 1 is the lower 32 bits
and Port 2 is the upper 32 bits. You can use one port for input and the other
port for output.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
14-3
14 BVM
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
If the format is 32 One bit channels, then the channel vector specifies the
configuration of the block. Each input is a double. The hardware output is set
to low voltage if the input is < 0.5 and high voltage if the input is > 0.5.
If the format is Single 32 bit port, then the input to the block is a 32-bit
integer where all 32 bits on the hardware are controlled by the single input.
The channel vector is not used in this mode and is unavailable on the Block
Parameters dialog box. The least significant bit is the lowest numbered bit in
the hardware manual.
Channel vector — This is a vector of channels and is only used when the
format is 32 One bit channels. Channels are numbered from 1 to 32 even
though the hardware manual labels them 0 to 31. Hardware I/O signal
numbers IO32 to IO63 are acquired by choosing Port 2 and channels 1 to 32.
Reset action vector — If you chose 32 One bit channels, enter a vector of 1’s
and 0’s that is the same length as the channel vector. A value of 1 indicates that
the channel is reset to the value in the initial value vector when the model is
stopped. A value of 0 indicates that the output remains at the last value written
14-4
PMCDIO64
when the model is stopped. If you enter a scalar value, that value is used for all
channels.
If you chose Single 32 bit port, enter a 1 or a 0 to determine what happens
when the model is stopped. If you enter 1, all 32 bits of the output are reset to
the value given by the initial value vector. If you enter 0, the output remains
at the last value written when the model is stopped.
Initial value vector — If you chose 32 One bit channels, this vector
determines both the initial value of the outputs at xPC boot time and the values
when model execution is stopped. A value of 1 for a given channel sets the
output for that channel to 1 while any other value sets the output to 0.
If you chose Single 32 bit port, enter the scaler value to write to the output
port. The value can be a hexadecimal or a decimal. If it is a hexadecimal, then
use C syntax. For example, 0xaaaaaaaa in hexadecimal would be the
equivalent of 2863311530 in decimal.
Port — Each half of the 64 bits is a separate port. Port 1 is the lower 32 bits
and Port 2 is the upper 32 bits. You can use one port for input and the other
port for output. In a given model, each port can only be set to one direction.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
14-5
14 BVM
14-6
15
Contec
This chapter describes the Contec I/O boards supported by xPC Target (http://www.contec.com).
Contec AD12-16(PCI) (p. 15-3) I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (12 bit), 4 digital input lines, and 4
digital output lines.
Contec AD12-16(PCI)E (p. 15-8) I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (12 bit), one analog output channel
(12 bit), 4 digital input lines, 4 digital output lines, and
an i8254-compatible counter.
Contec AD12-16U(PCI)E (p. 15-11) I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (12 bit), one analog output channel
(12 bit), 4 digital input lines, 4 digital output lines, and
an i8254-compatible counter.
Contec ADI12-16(PCI) (p. 15-14) I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (12 bit), 4 digital input lines, and 4
digital output lines.
Contec AD12-64(PCI) (p. 15-16) I/O board with 64 single-ended or 32 differential analog
input (A/D) channels (12 bit), 4 digital input lines, and 4
digital output lines.
Contec AD16-16(PCI)E (p. 15-21) I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (16 bit), one analog output channel
(16 bit), 4 digital input lines, 4 digital output lines, and
an i8254-compatible counter.
Contec DA12-4(PCI) (p. 15-24) I/O board with 4 analog output (D/A) channels (12 bit).
Contec DA12-16(PCI) (p. 15-26) I/O board with 16 analog output (D/A) channels (12 bit).
15 Contec
Contec PIO-32/32T(PCI) (p. 15-28) I/O board with 32 digital input lines and 32 digital output
lines.
Contec CNT24-4D(PCI) (p. 15-31) 24-bit differential up/down counter board with four
channels.
15-2
Contec AD12-16(PCI)
Contec AD12-16(PCI)
The Contec AD12-16(PCI) is an I/O board with 16 single-ended or 8 differential
analog input (A/D) channels (12 bit), 4 digital input lines, and 4 digital output
lines.
xPC Target supports this board with these driver blocks:
xPC Target does not support the Counter/Timer functionality of the board.
Board Characteristics
Board name AD12-16(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-3
15 Contec
The channel numbers can occur in any order. Number the them beginning with
1 even if the board manufacturer numbers them beginning with 0.
The maximum allowable channel number for this board is 8 (double-ended) or
16 (single-ended). If the highest channel number you specify is n, the hardware
converts all the channels between 1 and n, whether or not they occur in your
channel vector. It is most efficient to specify a contiguous range of channels.
(Permuting the order of such a range has no impact on efficiency however.)
Range vector — This board allows the range of each channel to be selected
independently. Enter a scalar, in which case the same range will be used for all
channels, or a vector the same length as the channel vector. The range vector
entries must be range codes selected from the following table:.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to 5 5
15-4
Contec AD12-16(PCI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-5
15 Contec
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-6
Contec AD12-16(PCI)
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
15-7
15 Contec
Contec AD12-16(PCI)E
The Contec AD12-16(PCI)E is an I/O board with 16 single-ended or 8
differential analog input (A/D) channels (12 bit), one analog output channel (12
bit), 4 digital input lines, 4 digital output lines, and an i8254-compatible
counter.
xPC Target supports this board with these driver blocks:
xPC Target does not support the digital I/O or Counter/Timer functionality of
the board.
Board Characteristics
Board name AD12-16(PCI)E
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-8
Contec AD12-16(PCI)E
The channel numbers can occur in any order. Number them beginning with 1
even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for this board is 8 (double-ended) or 16
(single-ended).
Gain vector — To specify the gain, enter 1, 2, 4, or 8 for each of the channels
in the channel vector. The gain vector must be the same length as the channel
vector. If you enter a scalar, the value is applied to all channels.
The gain is applied to the signal prior to sampling the voltage. After the signal
voltage is sampled, the result is divided by the gain to obtain the block output
signal value. To avoid clipping, make sure that the amplified gain falls within
the range you selected.
Range — From the list, select Bipolar -10V to +10V or Unipolar 0V to +10V.
This range applies to all channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-9
15 Contec
volts Double 1
15-10
Contec AD12-16U(PCI)E
Contec AD12-16U(PCI)E
The Contec AD12-16U(PCI)E is an I/O board with 16 single-ended or 8
differential analog input (A/D) channels (12 bit), one analog output channel (12
bit), 4 digital input lines, 4 digital output lines, and an i8254-compatible
counter.
xPC Target supports this board with these driver blocks:
xPC Target does not support the digital I/O or Counter/Timer functionality of
the board.
Board Characteristics
Board name AD12-16U(PCI)E
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-11
15 Contec
The channel numbers can occur in any order. Number them beginning with 1
even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for this board is 8 (double-ended) or 16
(single-ended).
Range — From the list, select Bipolar -2.5V to +2.5V, Bipolar -5V to +5V,
Unipolar 0V to +5V, or Unipolar 0V to +10V. This range applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
15-12
Contec AD12-16U(PCI)E
Reset — This check box controls the behavior of the output channel at model
termination. If the check box is selected, the output channel is reset to the
value specified as the initial value. If the check box is not selected, the output
channel remains at the most recent value attained while the model was
running.
Initial value — Enter the initial voltage value for the output channel. The
output channel is set to this value between the time the model is downloaded
and the time the model is started. Also, if the reset check box is selected, the
output channel is reset to the initial value when the model is stopped.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-13
15 Contec
Contec ADI12-16(PCI)
The Contec ADI12-16(PCI) is an I/O board with 16 single-ended or 8
differential analog input (A/D) channels (12 bit), 4 digital input lines, and 4
digital output lines.
Board Characteristics
Board name ADI12-16(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
The channel numbers can occur in any order. Number them beginning with 1
even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for this board is 8 (double-ended) or 16
(single-ended).
Gain vector — To specify the gain, enter 1, 2, 4, or 8 for each of the channels
in the channel vector. The gain vector must be the same length as the channel
vector. If you enter a scalar, the value is applied to all channels.
15-14
Contec ADI12-16(PCI)
The gain is applied to the signal prior to sampling the voltage. After the signal
voltage is sampled, the result is divided by the gain to obtain the block output
signal value. To avoid clipping, make sure that the amplified gain falls within
the range you selected.
Range — From the list, select Bipolar -10V to +10V, Unipolar 0V to +10V,
or Unipolar 4mA to 20mA. Choose a range that is consistent with the jumper
settings on the board. This range applies to all channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-15
15 Contec
Contec AD12-64(PCI)
The Contec AD12-64(PCI) is an I/O board with 64 single-ended or 32
differential analog input (A/D) channels (12 bit), 4 digital input lines, and 4
digital output lines.
xPC Target supports this board with these driver blocks:
xPC Target does not support the Counter/Timer functionality of this board.
Board Characteristics
Board name AD12-64(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-16
Contec AD12-64(PCI)
The channel numbers can occur in any order. Number the them beginning with
1 even if the board manufacturer numbers them beginning with 0.
The maximum allowable channel number for this board is 32 (double-ended) or
64 (single-ended). If the highest channel number you specify is n, the hardware
will convert all the channels between 1 and n, whether or not they occur in your
channel vector. It is most efficient to specify a contiguous range of channels.
(Permuting the order of such a range has no impact on efficiency however.)
Range vector — This board allows the range of each channel to be selected
independently. If you enter a scalar, the same range is used for all channels. If
you enter a vector, it must be the same length as the channel vector. The range
vector entries must be range codes selected from the following table:.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to 5 5
15-17
15 Contec
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-18
Contec AD12-64(PCI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values (0 or 1) for the output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that value is
the initial value for all channels. The channels are set to the initial values
between the time the model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-19
15 Contec
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
15-20
Contec AD16-16(PCI)E
Contec AD16-16(PCI)E
The Contec AD16-16(PCI)E is an I/O board with 16 single-ended or 8
differential analog input (A/D) channels (16 bit), one analog output channel (16
bit), 4 digital input lines, 4 digital output lines, and an i8254-compatible
counter.
xPC Target supports this board with these driver blocks:
xPC Target does not support the digital I/O or Counter/Timer functionality of
the board.
Board Characteristics
Board name AD16-16(PCI)E
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-21
15 Contec
The channel numbers can occur in any order. Number them beginning with 1
even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for this board is 8 (double-ended) or 16
(single-ended).
Range — From the list, select Bipolar -10V to +10V, Bipolar -5V to +5V,
Unipolar 0V to +5V, or Unipolar 0V to +10V. This range applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
15-22
Contec AD16-16(PCI)E
Reset — This check box controls the behavior of the output channel at model
termination. If the check box is selected, the output channel is reset to the
value specified as the initial value. If the check box is not selected, the output
channel remains at the most recent value attained while the model was
running.
Initial value — Enter the initial voltage value for the output channel. The
output channel is set to this value between the time the model is downloaded
and the time the model is started. Also, if the reset check box is selected, the
output channel is reset to the initial value when the model is stopped.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-23
15 Contec
Contec DA12-4(PCI)
The Contec DA12-4(PCI) is an I/O board with 4 analog output (D/A) channels
(12 bit).
xPC Target supports this board with this driver block:
• “DA12-4(PCI) Analog Output (D/A)” on page 15-24
xPC Target does not support the timer, external trigger, or interrupt
functionality of this board.
Board Characteristics
Board name DA12-4(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-24
Contec DA12-4(PCI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-25
15 Contec
Contec DA12-16(PCI)
The Contec DA12-16(PCI) is an I/O board with 16 analog output (D/A) channels
(12 bit).
xPC Target supports this board with this driver block:
• “DA12-16(PCI) Analog Output (D/A)” on page 15-26
xPC Target does not support the timer, external trigger, or interrupt
functionality of this board.
Board Characteristics
Board name DA12-16(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
15-26
Contec DA12-16(PCI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-27
15 Contec
Contec PIO-32/32T(PCI)
The Contec PIO-32/32T(PCI) is an I/O board with 32 digital input channels and
32 output channels.
xPC Target supports this board with these driver blocks:
xPC Target does not support the timer, external trigger, or interrupt
functionality of this board.
Board Characteristics
Board name PIO-32/32T(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
15-28
Contec PIO-32/32T(PCI)
Channel vector — If you selected serial I/O format, enter a vector of numbers
to specify the input channels for serial I/O format. For example, to use the first
and third digital input channels enter
[1, 3]
The channel numbers can occur in any order, but the numbers must lie in the
range 1 to 32.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-29
15 Contec
Channel vector — For serial I/O format, enter a vector of numbers to specify
the output channels. For example to use the first and third digital output
channels enter
[1, 3]
The channel numbers can occur in any order, but the numbers must lie in the
range 1 to 32.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values (0 or 1) for the output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that value is
the initial value for all channels. The channels are set to the initial values
between the time the model is downloaded and the time it is started. If you
selected parallel I/O format, the values can be in the form [hex2dec('ffffffff')].
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-30
Contec CNT24-4D(PCI)
Contec CNT24-4D(PCI)
The Contec CNT24-4D(PCI) is a 24-bit differential up/down counter board with
four channels. This board typically connects to incremental encoders.
Incremental encoders convert physical motion into electrical pulses than can
be used to determine velocity, direction, and distance.
xPC Target supports this board with one driver block:
• “CNT24-4D(PCI) Incremental Encoder” on page 15-31
xPC Target does not support the timer or interrupt functionality of this board.
Board Characteristics
Board name CNT24-4D(PCI)
Manufacturer Contec
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
15-31
15 Contec
Enable channel — Select this check box to enable the currently selected
channel. Click OK after you select this check box to add an output port for the
channel on the driver instance of your model. This check box also enables you
to set a number of operation parameters for the block, ranging from Input type
to Initial count. Whatever operation parameters are in place when you click
OK are preserved for the channel until the next time you change them.
The following are some additional behavior notes for this check box:
• If you do not select this check box for a channel, an output port for that
channel is not added to the block. You also cannot change the operation
parameters for the channel.
• If you select this check box and save the operation parameters for that
channel, then later deselect this check box, the block preserves the operation
parameters for the channel. The output port is removed from the block.
Input type — From the list, choose either Line receiver or TTL-level input.
This parameter specifies the input type for the current channel.
Mode — From the list, select the counter operation mode for the current
channel. There are a number of modes, based on 1-phase or 2-phase pulse
inputs. See the Contec CNT24-4D(PCI) user’s guide documentation for
descriptions of these modes.
Note that of this list of modes, the Multiply by 4 modes are synonyms for
quadrature encoding.
Direction — From the list, select either Clockwise rotation counts down or
Clockwise rotation counts up as the counter direction of the current
channel.
Phase Z logic — From the list, select either Active high or Active low for the
current channel. This parameter specifies the state of the phase Z input
(reference position signal). If the phase Z mode parameter has a value of
Disable phase Z input, Phase Z logic has no effect.
Phase Z mode — From the list, select either Disable phase Z input, Enable
next phase Z input only once, or Enable every phase Z input. This
parameter specifies the operation mode of the phase Z input for the current
channel.
15-32
Contec CNT24-4D(PCI)
Digital filter — From the list, select the characteristics of the digital input
filter you want to apply to the current channel’s input signal. There are a
number of sampling cycles to choose from, ranging from 0.1 microseconds (1
MHz) to 1056.1 microseconds (94 Hz).
Initial count — Enter a number from 0 to 16777215 (FFFFFF hex, the largest
24-bit number). This parameter specifies the initial value of the counter for the
current channel.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
15-33
15 Contec
15-34
16
Data Translation
16-2
DT2821
DT2821
The DT2821 is an I/O board with 16 single-ended or 8 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 50 kHz, 2 analog output
(D/A) channels (12-bit), and 16 digital I/O lines that can be configured in groups
of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2821
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-3
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Input coupling — From the list, select one from the following list of input
modes:
This choice must correspond to the input mode setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-4
DT2821
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-5
16 Data Translation
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-6
DT2821
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-7
16 Data Translation
DT2821-F-8DI
The DT2821-F-8DI is an I/O board with 8 differential analog input (A/D)
channels (12-bit) with a maximum sample rate of 150 kHz, 2 analog output
(D/A) channels (12-bit), and 16 digital I/O lines that can be configured in groups
of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2821-F-8DI
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-8
DT2821-F-8DI
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-9
16 Data Translation
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-10
DT2821-F-8DI
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-11
16 Data Translation
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-12
DT2821-G-8DI
DT2821-G-8DI
The DT2821-G-8DI is an I/O board with 8 differential analog input (A/D)
channels (12-bit) with a maximum sample rate of 250 kHz, 2 analog output
(D/A) channels (12-bit), and 16 digital I/O lines that can be configured in groups
of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2821-G-8DI
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-13
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), +-5V (-5
volts to +5 volts), or 0-10V (0 volts to +10 volts). This specifies the effective
range which is the same for all channels and must correspond with the input
range setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-14
DT2821-G-8DI
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range — Enter a range code for each of the channels in the Channel vector.
The range vector must be the same length as the Channel vector. This board
allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-15
16 Data Translation
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-16
DT2821-G-8DI
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-17
16 Data Translation
DT2821-F-16SE
The DT2821-F-16SE is an I/O board with 16 single-ended analog input (A/D)
channels (12-bit) with a maximum sample rate of 150 kHz, 2 analog output
(D/A) channels (12-bit), and 16 digital I/O lines that can be configured in groups
of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2821-F-16SE
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-18
DT2821-F-16SE
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-19
16 Data Translation
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-20
DT2821-F-16SE
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-21
16 Data Translation
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-22
DT2821-G-16SE
DT2821-G-16SE
The DT2821-G-16SE is an I/O board with 16 single-ended analog input (A/D)
channels (12-bit) with a maximum sample rate of 250 kHz, 2 analog output
(D/A) channels (12-bit), and 16 digital I/O lines that can be configured in groups
of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2821-G-16SE
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-23
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), +-5V (-5
volts to +5 volts), or 0-10V (0 volts to +10 volts). This specifies the effective
range which is the same for all channels and must correspond with the input
range setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-24
DT2821-G-16SE
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-25
16 Data Translation
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-26
DT2821-G-16SE
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-27
16 Data Translation
DT2823
The DT2823 is an I/O board 4 differential analog input (A/D) channels (16-bit)
with a maximum sample rate of 100 kHz, 2 analog output (D/A) channels
(16-bit), and 16 digital I/O lines that can be configured in groups of 8 for either
input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2823
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-28
DT2823
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
16-29
16 Data Translation
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-30
DT2823
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-31
16 Data Translation
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-32
DT2824-PGH
DT2824-PGH
The DT2824-PGH is an I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (12-bit) with a maximum sample rate of 50 kHz, 2 analog
output (D/A) channels (12-bit), and 16 digital I/O lines that can be configured
in groups of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2824-PGH
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-33
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Input coupling — From the list, select one from the following list of input
modes:
This choice must correspond to the input mode setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-34
DT2824-PGH
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-35
16 Data Translation
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-36
DT2824-PGL
DT2824-PGL
The DT2824-PGL is an I/O board with 16 single-ended or 8 differential analog
input (A/D) channels (12-bit) with a maximum sample rate of 50 kHz, 2 analog
output (D/A) channels (12-bit), and 16 digital I/O lines that can be configured
in groups of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2824-PGL
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-37
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 10, 100, or 500 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Input coupling — From the list, select one from the following list of input
modes:
This choice must correspond to the input mode setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-38
DT2824-PGL
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-39
16 Data Translation
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-40
DT2825
DT2825
The DT2825 is an I/O board with 16 single-ended or 8 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 45 kHz, 2 analog output
(D/A) channels (12-bit), and 16 digital I/O lines that can be configured in groups
of 8 for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2825
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-41
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 10, 100, or 500 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Input coupling — From the list, choose one of the input modes:
This choice must correspond to the input mode setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-42
DT2825
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-43
16 Data Translation
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-44
DT2825
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-45
16 Data Translation
DT2827
The DT2827 is an I/O board with 4 differential analog input (A/D) channels
(16-bit) with a maximum sample rate of 100kHz, 2 analog output (D/A)
channels (12-bit), and 16 digital I/O lines that can be configured in groups of 8
for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2827
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-46
DT2827
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
16-47
16 Data Translation
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-48
DT2827
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-49
16 Data Translation
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-50
DT2828
DT2828
The DT2828 is an I/O board with 4 single-ended analog input (A/D) channels
(12-bit) with a maximum sample rate of 100 kHz, 2 analog output (D/A)
channels (12-bit), and 16 digital I/O lines that can be configured in groups of 8
for either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name DT2828
Manufacturer Data Translation
Bus Type ISA
Access Method I/O mapped
Multiple block instance support A/D:No, D/A:No, Digital I/O:Yes
Multiple board support Yes
volts Double 1
16-51
16 Data Translation
Number the channels beginning with 1 even if the board manufacturer starts
to number the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the Channel
vector to specify the gain for that channel. The gain vector must be the same
length as the Channel vector. (If your enter a scalar, it is automatically
expanded to channel vector). This driver allows the gain of each channel to be
different. The gain is applied prior to sampling the voltage.
For example, if you have an input signal from -1 to +1 volts, and a gain of 8, the
signal is amplified -8 to +8 volts. Select a range equal or larger than the
amplified voltage. For example, select a range of +-10V. After the signal voltage
is sampled, this block divides by the gain to output the original signal value.
Range — From the list, choose either +-10V (-10 volts to +10 volts), or 0-10V (0
volts to +10 volts). This specifies the effective range which is the same for all
channels and must correspond with the input range setting on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the bass address setting on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
16-52
DT2828
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the Channel
vector. The range vector must be the same length as the Channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +10 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the Output Range Selection settings
on the board for DAC0, and DAC1 (channel 1 and 2 respectively).
16-53
16 Data Translation
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
16-54
DT2828
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
16-55
16 Data Translation
16-56
17
Diamond
Quartz-MM 10 (p. 17-52) 8 digital input line, 8 digital output lines, and 10
counter/timers.
Ruby-MM (p. 17-63) PC104 I/O board with 4 or 8 single analog output (D/A)
channels, unipolar and bipolar operation, +/- 10V, +/- 5V,
0-10V, 0-5V fixed ranges, +/- 2.5V, 0-2.5V user-adjustable
ranges, 24 digital input and output lines.
Ruby-MM-416 (p. 17-68) 4 16-bit analog output (D/A) channels, and 24 digital I/O
lines that can be configured in groups of 8 for either input
or output.
Ruby-MM-1612 (p. 17-73) 16 12-bit analog output (D/A) channels, and 24 digital I/O
lines which can be configured in groups of 8 for either
input or output.
17-2
Diamond-MM
Diamond-MM
The Diamond-MM is a DAS16 compatible I/O board with 16 single or 8
differential analog input (A/D) channels (12-bit) with a maximum sample rate
or 100 kHz, 2 analog output (D/A) channels (12-bit), 8 digital input lines, and 8
digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Diamond-MM
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
17-3
17 Diamond
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
-1 to +1 -1 0 to +1 1
-0.5 to +0.5 -5
The gain jumpers on the board have to be in the correct positions for the chosen
range.The bipolar jumper on the board has to be in the bipolar position, if a
bipolar range is used or in the unipolar position, when a unipolar range is used.
Coupling — From the list, select one from the following list of input modes:
• 16 single-ended channels
• 8 differential channels
This choice must correspond to the jumper setting in block J6 on the board.
17-4
Diamond-MM
Show error status output (E) — Select this check box to add a port labeled E
to the block and to display (the contents of) that special port. This output will
always have a value of 0 unless a problem is detected while attempting an A/D
conversion. In the unlikely event that an error occurs, the port has a nonzero
value. This nonzero value takes the form of a real number whose binary
representation of 1’s and 0’s (true and false) indicates which channels have
errors.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
17-5
17 Diamond
The following table is a list of the ranges for this driver and the corresponding
range codes. The D/A specific jumpers on the board have to be in the correct
positions for the ranges entered.
0 to +10 10
0 to +5 5
For example, if the first channel is 0 to + 10 volts and the second channel is 0
to +5 volts, enter
[10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the input channels. Enter a scalar or a vector that is the same length
as the channel vector. If you specify a scalar value, that value is the initial
value for all channels. The channels are set to the initial values between the
time the model is downloaded and the time it is started. If you provide an
out-of-range value for a channel, that value is adjusted to lie within the correct
range, as defined in the parameter Range.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-6
Diamond-MM
MM Digital Input
Scaling Input to Output
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
MM Digital Output
Scaling Input to Output
17-7
17 Diamond
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the input channels. Enter a scalar or a vector that is the same length
as the channel vector. If you specify a scalar value, that value is the initial
value for all channels. The channels are set to the initial values between the
time the model is downloaded and the time it is started. If you provide an
out-of-range value for a channel, that value is adjusted to lie within the correct
range, as defined in the parameter Range.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-8
Diamond-MM-16-AT
Diamond-MM-16-AT
The Diamond MM-AT is a PC104 I/O board with 16 single-ended or 8
differential analog input (A/D) channels (16-bit), 4 optional analog output (D/A)
channels (12-bit), 8 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Diamond-MM-16-AT
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
17-9
17 Diamond
volts Double 1
This choice must correspond to the jumper setting in block J4 on the board.
Show error status output (E) — Select this check box to add a port labeled E
to the block and to display (the contents of) that special port. This output will
always have a value of 0 unless a problem is detected while attempting an A/D
conversion. In the unlikely event that an error occurs, the port has a nonzero
value. This nonzero value takes the form of a real number whose binary
representation of 1’s and 0’s (true and false) indicates which channels have
errors.
Sample time — Enter the base sample time or a multiple of the base sample
time.
17-10
Diamond-MM-16-AT
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range — From the list, select 0 to 5V or -5V to 5V as the input voltage range
of the board. The input range applies to all channels.
This choice must correspond to the jumper setting in block J5 on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
17-11
17 Diamond
Initial value vector — The initial value vector contains the initial voltage
values for the input channels. Enter a scalar or a vector that is the same length
as the channel vector. If you specify a scalar value, that value is the initial
value for all channels. The channels are set to the initial values between the
time the model is downloaded and the time it is started. If you provide an
out-of-range value for a channel, that value is adjusted to lie within the correct
range, as defined in the parameter Range.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 300 (hexadecimal), enter
0x300
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
17-12
Diamond-MM-16-AT
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 300 (hexadecimal), enter
0x300
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
17-13
17 Diamond
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started. If you provide an
out-of-range value for a channel, that value is adjusted to lie within the correct
range, as defined in the parameter Range.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 300 (hexadecimal), enter
0x300
17-14
Diamond-MM-32-AT
Diamond-MM-32-AT
The Diamond-MM-32-AT is a PC104 I/O board with 32 single or 16 differential
analog input (A/D) channels (16-bit) with a maximum sample rate of 200 kHz,
4 analog output (D/A) channels (12-bit), 24 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Diamond-MM-32-AT
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support A/D:No
D/A:Yes
DIO:Yes
Multiple board support Yes
17-15
17 Diamond
Volts Double 1
Note that the selected channel configuration must match the configuration set
by the jumpers in block J5. This driver does not support mode C.
First channel number — Enter the number of the first channel in a set of
contiguous channels. Depending on the value of the Channel Configuration
parameter, the first channel number must lie within the range 1 through 32, 1
through 16, or 1 through 24.
Number of channels — Enter the number of input channels you want to use.
The maximum number of channels varies between 1 and 32 and depends on
Channel configuration and the First channel number.
Range — From the list, choose a voltage range. The input range applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
17-16
Diamond-MM-32-AT
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
You control the frame size with the parameter values Number of channels
and Number of scans per frame:
frameSize = (Number of channels) x (Number of scans per frame)
3 In the Target selection section, from the RTW system target file list,
browse to and select xpctarget.tlc.
4 In the xPC Target options node, from the I/O board generating the
interrupt list, select the value Diamond-MM-32. This specifies that the
Diamond-MM-32-AT board generates the interrupt.
17-17
17 Diamond
5 In the same node, from the Real-time interrupt source list, select the IRQ
number you have jumpered on the board.
6 In the same node, for the PCI slot/ISA base address parameter, enter the
same ISA address as for the Diamond-MM-32-AT Frame block Base
address parameter.
Volts Double 1
Note that the selected channel configuration must match the configuration set
by the jumpers in block J5. This driver does not support mode C.
Output Signal Type — From the list, select either Vector or Frame:
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
17-18
Diamond-MM-32-AT
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
Range — From the list, select a voltage range. The input range applies to all
channels.
First channel number — Enter the number of the first channel in a set of
contiguous channels. Depending on the value of the Channel Configuration
parameter, the first channel number must lie within the range 1 through 32, 1
through 16, or 1 through 24.
Number the channels starting from 1 even if Diamond Systems numbers them
starting from 0.
Number of channels — Enter the number of input channels you want to use.
The maximum number of channels varies between 1 and 32 and depends on
Channel configuration and the First channel number. Note that hardware
limitations require that either the Number of channels or Number of scans
per frame value be even. If your application requires that both quantities be
odd, add 1 to one of them and ignore the resulting additional data.
Number of scans per frame — Enter the number of scans per frame. For a
value of N, each output port of the block will have a signal width of N and
contain N samples of the corresponding channel. Note that hardware
limitations require that either the Number of channels or Number of scans
per frame value be even. If your application requires that both quantities be
odd, add 1 to one of them and ignore the resulting additional data.
Interval between conversions within a scan — From the list, select the
interval, in microseconds, between conversions within a scan.
Interval between scans — Enter the interval, in seconds, between successive
scans.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-19
17 Diamond
Volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range — From the list, choose a range code. This driver does not allow a
different range for each of the four channels. This selection must correspond to
the range and bipolar/unipolar jumper settings on the board.
The following table is a list of the ranges for this driver and the corresponding
range codes. The D/A specific jumpers on the board must be in the correct
positions for the ranges entered.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
For example, if the first and second channel range is 0 to + 10 volts, enter
[10, 10]
17-20
Diamond-MM-32-AT
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-21
17 Diamond
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C. The I/O board has an 8255 chip with
three ports. The Port parameter defines which port of the 8255 chip is used for
this driver block. Each port has a maximum of eight digital lines that you can
configure as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-22
Diamond-MM-32-AT
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has an 8255 chip
with three ports. The Port parameter defines which port of the 8255 chip is
used for this driver block. Each port has a maximum or eight digital lines that
can be configured as inputs or outputs depending on which driver block is
chosen. In each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
17-23
17 Diamond
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-24
Garnet-MM
Garnet-MM
The Garnet-MM is an I/O board with 24 or 48 high current digital I/O lines that
can be configured in groups of eight for either digital input or digital output.
There are two versions of this board, 24 (GMM-24) or 48 (GMM-48) digital I/O
lines. The 48 line version has two 82C55 chips. Each chip has three 8-bit I/O
ports for a total of 48 lines. The 24 line version has one 82C55 chip with three
8-bit I/O ports for a total of 24 lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Garnet-MM
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support DIO: Yes
Multiple board support Yes
17-25
17 Diamond
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Chip — From the list choose 1 or 2. Note, only select 1 for the 24 line version
of the Garnet-MM board. Selecting 2 for the 24 line board has no effect. You can
select either 1 or 2 for the 48 line version of the board.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-26
Garnet-MM
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. Note, only select 1 for the 24 line version
of the Garnet-MM board. Selecting 2 for the 24 line board has no effect. You can
select either 1 or 2 for the 48 line version of the board.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-27
17 Diamond
Onyx-MM
The Onyx-MM is an I/O board with 48 digital I/O lines that can be configured
in groups of eight for either input or output. xPC Target does not support the
Counter/Timer functionality of this board.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Onyx-MM
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support DIO: Yes
Multiple board support Yes
17-28
Onyx-MM
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Chip — From the list choose 1 or 2.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-29
17 Diamond
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-30
Onyx-MM-DIO
Onyx-MM-DIO
The Onyx-MM is an I/O board with 48 digital I/O lines that can be configured
in groups of eight for either digital input or digital output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Onyx-MM-DIO
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support DIO: Yes
Multiple board support Yes
17-31
17 Diamond
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Chip — From the list choose 1 or 2.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-32
Onyx-MM-DIO
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-33
17 Diamond
Prometheus
The Diamond Prometheus is an Intel 486-based embedded PC/104 CPU board
with 4 serial ports, 2 USB ports, 1 parallel port, keyboard and mouse ports,
floppy and IDE driver connectors, a 100BaseT Ethernet connector, and
provision for solid state flashdisk modules.
xPC Target supports Model PR-Z32-EA of Prometheus. In addition to the above
functionality, Model PR-Z32-EA also contains a data acquisition subsystem.
This subsystem supports 16 single-ended or 8 differential 16-bit A/D, 4 12-bit
analog outputs, 24 programmable digital I/O channels, and a 16-bit
counter/timer.
xPC Target supports the Prometheus model PR-Z32-EA with four driver
blocks:
Board Characteristics
Board name Prometheus
Manufacturer Diamond Systems
Bus type ISA
Access method I/O mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes
Multiple board support No
17-34
Prometheus
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Number of channels — Enter the number of input channels you want to use.
The maximum number of channels varies between 1 and 16 and depends on the
values of First channel and Input coupling. For example, if the value of First
channel is 1 and Input coupling is Single-ended, the maximum value for
Number of channels is 16.
Range (J13 setting) — From the list, choose a voltage range. The input range
applies to all channels. This range must agree with jumper settings in block
J13 on the board.
Input coupling (J13 setting) — From the list, select one from the following list
of input modes:
This choice must correspond to the jumper setting in block J13 on the board.
17-35
17 Diamond
Show error status output port — Select this check box to display real-time
error information. This check box displays an output port labeled E. As long as
no error is detected on any of the channels currently in use, this signal has a
value of 0. Values of 1, 2, 4, 8, and so forth respectively indicate problems on
channels 1, 2, 3, 4, and so forth. To use one signal to indicate errors on multiple
channels, the driver combines these values. For example, the E value 1 + 2 = 3
encodes the concurrent errors on channels 1 and 2, the value 2 + 4 = 6 encodes
the concurrent errors on channels 2 and 3, and so on.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the base address setting on the board. For example, if the
base address is 280 (hexadecimal), enter
0x280
volts Double 1
17-36
Prometheus
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
If you provide an out-of-range value for a channel, that value is adjusted to lie
within the correct range, as defined in the parameter Range.
Show error status output port — Select this check box to display real-time
error information. This check box displays an output port labeled E. As long as
no error is detected on any of the channels currently in use, this signal has a
value of 0. Values of 1, 2, 4, 8, and so forth respectively indicate problems on
channels 1, 2, 3, 4, and so forth. To use one signal to indicate errors on multiple
channels, the driver combines these values. For example, the E value 1 + 2 = 3
encodes the concurrent errors on channels 1 and 2, the value 2 + 4 = 6 encodes
the concurrent errors on channels 2 and 3, and so on.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry correspond to the DIP switch settings on the board. For example, if the
base address is 280 (hexadecimal), enter
0x280
17-37
17 Diamond
17-38
Prometheus
17-39
17 Diamond
Quartz-MM 5
The Quartz-MM 5 has 8 digital input lines, 8 digital output lines, and 10
counter/timers.
xPC Target supports this board with these driver blocks:
• “Quartz-MM 5 Digital Input” on page 17-41
• “Quartz-MM 5 Digital Output” on page 17-42
• “Quartz-MM5 Counter PWM” on page 17-43
• “Quartz-MM5 Counter PWM & ARM” on page 17-44
• “Quartz-MM5 Counter FM” on page 17-46
• “Quartz-MM5 Counter FM & ARM” on page 17-47
• “Quartz-MM5 PWM Capture” on page 17-49
• “Quartz-MM5 FM Capture” on page 17-50
• “Quartz-MMxx” on page 17-51
Board Characteristics
Board name Quartz-MM 5
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support
Multiple board support Yes
17-40
Quartz-MM 5
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-41
17 Diamond
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-42
Quartz-MM 5
TTL Double 0 to 1
Note Your control over the output frequency is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
17-43
17 Diamond
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-44
Quartz-MM 5
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
17-45
17 Diamond
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Quartz-MM5 Counter FM
The Quartz-MM5 has one AM9513A chip with 5 counters.
The Quartz-MM5 FM driver programs the AM9513A for FM (Frequency
Modulation) signal generation (a square wave with fixed duty cycle and
variable frequency). For the corresponding counter channel, the PWM signal is
output at the pin named OUT.
TTL Double 0 to 1
17-46
Quartz-MM 5
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
17-47
17 Diamond
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the Output duty cycle defined in the setting above define the
duration of the TTL high part.
17-48
Quartz-MM 5
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
TTL Double 0 to 1
17-49
17 Diamond
Quartz-MM5 FM Capture
This block programs the AMD9513A for capturing FM signals.
There is one output for relative frequency compared to the base frequency. To
get the actual frequency, multiply the base frequency by the relative frequency.
The FM signal has to enter the pin named GATE of the corresponding counter
channel. The CLK pin has to be left unconnected.
TTL Double 0 to 1
17-50
Quartz-MM 5
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Quartz-MMxx
You can use this block to program the AMD9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and FM Capture blocks use this block
in their underlying subsystems. The API for this block is not currently
documented.
17-51
17 Diamond
Quartz-MM 10
The Quartz-MM 10 has eight digital input line, eight digital output lines, and
10 counter/timers.
xPC Target supports this board with these driver blocks:
• “Quartz-MM 10 Digital Input” on page 17-53
• “Quartz-MM 10 Digital Output” on page 17-54
• “Quartz-MM 10 Counter PWM” on page 17-54
• “Quartz-MM 10 Counter PWM & ARM” on page 17-56
• “Quartz-MM 10 Counter FM” on page 17-57
• “Quartz-MM 10 Counter FM & ARM” on page 17-59
• “Quartz-MM 10 PWM Capture” on page 17-60
• “Quartz-MM 10 FM Capture” on page 17-61
• “Quartz-MMxx” on page 17-62
Board Characteristics
Board name Quartz-MM 10
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
17-52
Quartz-MM 10
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-53
17 Diamond
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-54
Quartz-MM 10
TTL Double 0 to 1
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and
becomes armed when the application begins running. This parameter sets the
TTL level when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(duty cycle)
17-55
17 Diamond
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-56
Quartz-MM 10
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(duty cycle)
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Quartz-MM 10 Counter FM
The Quartz-MM10 has two AM9513A chips with five counters.
The Quartz-MM10 FM driver programs the AM9513A for FM (frequency
modulation) signal generation (a square wave with fixed duty cycle and
variable frequency). For the corresponding counter channel, the FM signal is
output at the pin named OUT.
17-57
17 Diamond
TTL Double 0 to 1
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and
becomes armed when the application begins running. This parameter sets the
TTL level when the counter is disarmed.
17-58
Quartz-MM 10
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(duty cycle)
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-59
17 Diamond
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the Output duty cycle defined in the setting above defines the
duration of the TTL high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(duty cycle).
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
17-60
Quartz-MM 10
The PWM signal must enter the pins of both corresponding counter channels
(parallel wiring) named GATE. Both CLK pins must be left unconnected.
TTL Double 0 to 1
Quartz-MM 10 FM Capture
This block programs the AM9513A for capturing FM signals.
There is one output for relative frequency compared to the base frequency. To
get the actual frequency, multiply the base frequency by the relative frequency.
The FM signal must enter the pin of the corresponding counter channel named
GATE. The CLK pin must be left unconnected.
17-61
17 Diamond
TTL Double 0 to 1
Quartz-MMxx
You can use this block to program the AM9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and FM Capture blocks use this block
in their underlying subsystems. The API for this block is not currently
documented.
17-62
Ruby-MM
Ruby-MM
The Diamond Ruby-MM is a PC104 I/O board with 4 or 8 single analog output
(D/A) channels (12-bit), unipolar and bipolar operation, +/- 10V, +/- 5V, 0-10V,
0-5V fixed ranges, +/- 2.5V, 0-2.5V user-adjustable ranges, 24 digital input and
output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Diamond Ruby-MM
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O Mapped
Multiple block instance support D/A:No, DIO:Yes
Multiple board support Yes
Volts Double 1
17-63
17 Diamond
The board comes in two different hardware versions. If the 4-channel version
of the hardware is used and the channels 5-8 are listed, the those outputs will
not show an error, but the data will be ignored.
Range — The output range of the board is selected with jumpers on the board.
Each group of 4 channels can be jumpered for any of the available ranges. The
range you select in the Block Parameters must correspond to the range
specified by the jumper settings or you will obtain incorrect results.
Reset vector – The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector – The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as selected with the hardware jumpers on the board.
17-64
Ruby-MM
Number the lines beginning with 1 even though the board manufacturer starts
numbering lines with 0.
Port — From the Port list, choose either A, B, or C. The Port parameter defines
which port is used for this driver block. Each port has a maximum of 8 digital
inputs. In each case, one block is needed for each port.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as selected with the hardware jumpers on the board.
17-65
17 Diamond
Number the lines beginning with 1 even though the board manufacturer starts
numbering lines with 0.
Port — From the Port list, choose either A, B, or C. The Port parameter defines
which port is used for this driver block. Each port has a maximum of 8 digital
outputs. In each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
17-66
Ruby-MM
Base address — Enter the base address of the board in hexadecimal (such as
0x300) as selected with the hardware jumpers on the board.
17-67
17 Diamond
Ruby-MM-416
The Ruby-MM-416 is an I/O board with four 16-bit analog output (D/A) chan-
nels, and 24 digital I/O lines that can be configured in groups of eight for
either input or output.
xPC Target supports this board with these driver blocks:
• “Ruby-MM-416 Analog Output (D/A)” on page 17-68
• “Ruby-MM-416 Digital Input” on page 17-70
• “Ruby-MM-416 Digital Output” on page 17-71
Board Characteristics
Board name Ruby-MM-416
Manufacturer Diamond Systems Corporation
Bus type ISA (PCI/104)
Access method I/O Mapped
Multiple block instance support D/A:No
DIO:Yes
Multiple board support Yes
Volts Double 1
17-68
Ruby-MM-416
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — The range vector must be a scalar or a vector the same length
as the channel vector. The vector entries must use range codes from the
following table
-5 to +5 -5
0 to 10 10
The range codes you enter must be consistent with the jumper settings on the
board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector – The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started. If you provide a
value that is out of the channel’s range, the value is reset to the lower or upper
range value.
Sample time — Base sample time or a multiple of the base sample time.
17-69
17 Diamond
Base address — Enter the base address of the board. This entry must
correspond to the base address setting on the board (header J6). For example,
if the base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Sample time — Enter a base sample time or a multiple of the base sample
time.
17-70
Ruby-MM-416
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Sample time — Enter a base sample time or a multiple of the base sample
time.
17-71
17 Diamond
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-72
Ruby-MM-1612
Ruby-MM-1612
The Ruby-MM-1612 is an I/O board with 16 (12-bit) analog output (D/A)
channels, and 24 digital I/O lines that can be configured in groups of eight for
either input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name Ruby-MM-1612
Manufacturer Diamond Systems Corporation
Bus type ISA (PC/104)
Access method I/O Mapped
Multiple block instance support D/A:No
DIO:Yes
Multiple board support Yes
Volts Double 1
17-73
17 Diamond
The number of elements defines the number of D/A channels used. For
example, to use the first and second analog output (D/A) channels, enter
[1,2]
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range for bank 1, Range for bank 2 — Bank 1 consists of channels 1 to 8 and
bank 2 consists of channels 9 to 16. The output range may be specified on a
per-bank basis. These ranges must correspond to the jumper settings in header
R4 on the board. See the board manual for details.
Note that if you select a range of either -5V to +5V or 0 to +5V for one bank,
then it is not possible to select a range of either -10V to +10V or 0 to +10V for
the other bank. This is because jumper 5 in header J4 (On-Board Reference
Full-Scale Voltage Selection) affects all channels, not just those of a single
bank. See the board manual for details. The following lists the allowed output
voltage range combinations for the two channel banks. B1 is the first bank of
channels, B2 is the second bank of channels.
B1 B2 Configuration
+5 V +5 V C22
+2.5 +5 V C32
0-5 V +5 V C52
0-2.5 V +5 V C62
+5 V +2.5 V C23
17-74
Ruby-MM-1612
B1 B2 Configuration
+5 V 0-5 V C25
+5 V 0-2.5 V C26
This driver supports the Adjustable Reference Voltage. You can use this
feature with either output range -2.5V to +2.5V or 0 to +2.5V. If for example
you adjust potentiometer R4 to 2.3 V (instead of the default setting of 2.5), then
an input signal of 1.2 results in an output voltage of (1.2 / 2.5) * 2.3 V = 1.1 V.
See the board manual for details.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started. If you provide a
value that is out of the channel’s range, the value is reset to the lower or upper
range value.
Sample time — Base sample time of a multiple of the base sample time.
17-75
17 Diamond
Base address — Enter the base address of the board. This entry must
correspond to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Sample time — Enter a base sample time or a multiple of the base sample
time.
17-76
Ruby-MM-1612
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A, B, or C.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
17-77
17 Diamond
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started. If you provide a
value that is out of the channel’s range, the value is reset to the lower or upper
range value.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
17-78
18
General Standards
The following xPC Target driver blocks control the D/A functionality of the
PMC-ADADIO board:
The use of these drivers differ slightly from other boards. Of particular note are
the Boolean enable ports (labelled E) that most of the A/D and D/A blocks have
for input and/or output. These enable ports perform the following:
• Control block action. If the value of the input enable port is true, the block
executes. If the value is false, the block does not execute. Most blocks also
have output enable ports. The output enable port has the same value as the
input enable port. This allows the control block action value to be passed to
successive blocks.
• Ensure that A/D and/or D/A blocks execute in the correct order. For example,
the A/D Start block starts the analog to digital conversion of the channels
selected by the A/D Read block. This block must finish its operation before
the A/D Read block can execute. If the A/D Read block executes first, the A/D
Read block waits indefinitely for the A/D conversion to complete.
An input enable port can have an Enable Signal block connected to the port.
The Enable Signal block generates an input enable signal for the A/D and D/A
blocks. If you do not connect an Enable Signal block to the A/D or D/A block,
the input enable port has a constant value of 1, or ‘true.’
18-2
Overview of PMC-ADADIO Functionality
A typical A/D block configuration for analog input operation connects the AD
Start block and AD Read block. Because the A/D Start block can take several
microseconds to perform the analog to digital conversion of the channels
selected by the A/D Read block, you can perform other operations in the
meantime. For example, you can insert a typical D/A block configuration
between the AD Start and Read blocks. A typical configuration for analog
output operation connects the DA Write and DA Update blocks.
This section describes how to use the PMC-Adadio blocks to create a model that
interleaves the analog input and analog output operations. It has the following
topics:
A/D Blocks
A typical A/D block configuration for analog input operation connects the AD
Start block and AD Read block. The AD Start block converts the data of the
channels selected by the AD Read block.
18-3
18 General Standards
5 Drag and drop an AD Start block from the General Standards window to the
new model.
By default, this block should have the Enable input port and Enable
output port check boxes selected.
6 Drag and drop an AD Read block from the General Standards window to the
new model.
By default, this block has the Enable input port and Enable output port
check boxes selected. Double-click the AD Read block and deselect the
Enable output port. Deselecting this check box prohibits the block from
passing the Boolean value from the input enable port to the output enable
port.
18-4
Overview of PMC-ADADIO Functionality
Note The Start block must execute before every call to the Read block. If the
Read block is executed without the Start block, the system hangs because it is
waiting for data to be available.
8 From the File menu, select Save As. Browse to a writable directory and
enter a unique model name. For example, AdadioADDA, then click Save.
Your next task is to add a Create Enable Signal block to this model. See
“Adding Enable Signal Blocks to A/D Blocks” on page 18-6.
You can use a Create Enable Signal block to generate an input enable signal
for A/D and D/A blocks. You can connect a signal generator to the input of the
Create Enable Signal block to control the output enable port. You can then
connect the output E port of the Create Enable Signal block to the input E port
of an A/D or D/A block.
18-5
18 General Standards
5 Drag and drop a Create Enable Signal block from the General Standards
window to the new model.
6 Double click the Create Enable Signal block and deselect the Show input
port for thresholding signal of type double.
The Create Enable block has an output enable port, E, that can provide an
input enable signal for any of the other PMC-ADADIO blocks. The Boolean
value of this output enable port is controlled by an input port, S, and
(optionally) an input port, L. When the S port is connected to the output of
an arbitrary block B, the Create Enable Signal block executes immediately
after block B executes. The L port is a level-sensitive thresholding port that
allows an attached signal to control the Boolean value at the output enable
port E.
18-6
Overview of PMC-ADADIO Functionality
10 Connect the output port of the Sine Wave block to the input port S of the
Create Enable Signal block.
Connecting the Sine Wave to the Create Enable Signal block triggers the
sequence chain of the ADADIO blocks.
11 In the new model, connect the S port of the Create Enable Signal block to the
Sine Wave block.
12 In the new model, connect the AD Start block E port to the Create Enable
Signal E port.
The output enable port, E, of the Create Enable Signal block provides the
first Boolean output to feed into the other ADADIO driver blocks.
Your next task is to set up the D/A blocks to provide the analog output for the
analog input blocks.
18-7
18 General Standards
D/A Blocks
A typical D/A block configuration for analog output operation connects the DA
Write block and DA Update block. The DA Update block converts the data that
the DA Write block puts out.
5 Drag and drop a DA Write block from the General Standards window to the
new model.
6 Drag and drop a DA Update block from the General Standards window to
the new model.
18-8
Overview of PMC-ADADIO Functionality
• No signal has been connected to the DA Write block’s input enable port, E, so
the port has a default value of ‘true’. Accordingly, the output enable port of
the DA Write block and input enable port of the DA Update block also have
a value of ‘true’.
• Connecting the output enable port of the DA Write block to the input enable
port of the DA Update block ensures that the DA Write block executes before
the DA Update block. The DA Write block loads the PMC-ADADIO registers
in preparation for the D/A conversion. The DA Update block waits until the
loading has completed before initiating the D/A conversion. As with the AD
Start and Read blocks, the DA Write and Update blocks do not need to be
directly connected to each other. You can interleave other blocks if you want.
You can interleave the analog output blocks between the AD Start and AD
Read blocks. Such a configuration allows the analog output block to perform
concurrently with the A/D conversion by the AD Start block. To connect to the
AD Start and AD Read blocks, the interleaving block(s) must have an input
enable port and an output enable port. See “Interleaving Analog Input and
Analog Output Blocks” on page 18-10.
18-9
18 General Standards
• An atomic subsystem that has a pass through input for the enable signal
from the AD Start to the AD Read blocks. This type of system enforces an
execution order where the inserted subsystem executes between the other
two blocks.
• A pair of blocks that already have an enable port, such as DA Write and DA
Update. Because the DA Write and DA Update blocks already have an
enable port, you do not have to include them in another subsystem to ensure
correct execution order. See the following enable line for the execution order:
This results in the time sequence: AD Start -> DA Write -> DA Update -> AD
Read. By the time AD Read executes, the hardware has either finished or is
much closer to finishing. Less time is wasted than if you use no interleaving.
Note that the data input to DA Write comes from another part of the model.
Typically, it will be the value calculated from the AD Read from the previous
time step.
The following procedure assumes that you have a model named AdadioADDA
that has AD Start and Read blocks, an Enable Create Signal block, and DA
Write and Update blocks:
18-10
Overview of PMC-ADADIO Functionality
Perform this step to insert the intermediate DA blocks between the AD Start
and Read blocks.
4 Connect the output E port of the AD Start block to the input E port of the
DA Write block.
5 Connect the output port of the Sine Wave block to the input 1 port of the DA
Write block.
6 Connect the output E port of the DA Write block to the input E port of the
DA Update block.
7 Connect the output E port of the DA Update block to the input E port of the
AD Read block.
9 Drag and drop the Scope (xPC) block into the AdadioADDA model.
10 Connect the output E port of the AD Read block to the Scope (xPC) block.
18-11
18 General Standards
You can build and run the model and download it to your target PC like any
other xPC Target model.
18-12
Overview of PMC-ADADIO Functionality
• Connect pin4 of the P5B connector (INPUT TRIGGER READY signal) of the
master board to pin 2 of the P5B connector (INPUT TRIGGER signal) of all
the slave boards. For example
Note The pulse of the master board INPUT TRIGGER READY output occurs
250 nanoseconds after the software trigger in the A/D Start block. This results
in a 250 nanosecond delay, relative to the master board, for the slave boards,
but should still be considered simultaneous in most situations.
18-13
18 General Standards
PMC-ADADIO
The PMC-ADADIO is a high performance multifunction board that has eight
16 bit analog to digital converters and four 16 bit digital to analog outputs. Up
to eight input channels are sampled simultaneously from a single acquisition
start. The board also has 8 bits of TTL level digital I/O. All 8 bits are either
inputs or outputs.
You can purchase the PMC-ADADIO board in either a memory mapped or an
I/O mapped configuration. The driver detects this configuration and adjusts for
it. In addition, you order the board for a specific factory configured voltage
range. Consult the board’s documentation to determine the voltage range of
your board.
xPC Target supports this board with these driver blocks:
Note that you cannot use the PMC-ADADIO Digital Input and Digital Output
driver blocks simultaneously on the same board. Trying to do so results in an
error.
18-14
PMC-ADADIO
Board Characteristics
Board name PMC-ADADIO
Manufacturer General Standards
Bus type PCI
Access method Memory mapped or I/O mapped
Multiple block instance support No
Multiple board support Yes
18-15
18 General Standards
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The values passed to the enable input port and enable output port of this block
are Boolean values.
18-16
PMC-ADADIO
Enable input port — Select this check box to display an input port that
controls writing data from the A/D ports on the hardware. If the enable input
signal is true, then the output of the A/D converter is read and output to the
block output port. If the enable input signal is false, then zero data is output to
the block output port. If this check box is not selected, then the enable input
signal is assumed to be true.
Enable output port — Select this check box to pass the Boolean value from the
input enable port to the output enable port. You can connect this port to the
input enable port on another block to control other blocks in the model and
specify execution ordering.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
18-17
18 General Standards
volts Double 1
The values passed to the enable input port and enable output port of this block
are Boolean values.
18-18
PMC-ADADIO
Range vector — From the list, select +-10V, +-5V or +-2.5V as the output
voltage range of the board. You must select the range that corresponds to the
factory configured output range. Consult the board’s documentation to
determine the voltage range of your board. xPC Target uses this parameter to
convert the data from floating point numbers to integers.
Autocalibration — The PMC-ADADIO can check its own calibration
(autocalibration) against an internal voltage reference. Choose this check box
to execute the autocalibration cycle when the model is downloaded to the xPC
Target target PC. The calibration cycle takes several seconds to run. The
output ports show a square wave during the cycle. Refer to the PMC-ADADIO
documentation for further information on autocalibration.
Enable input port — Select this check box to display an input enable port that
controls writing data to the D/A ports on the hardware. If the enable input
signal is true, then the block input data is written to the D/A ports on the
hardware. If the enable input signal is false, then data is not written to the D/A
ports on the hardware and the output remains at the previous value. If this
check box is not selected, then the enable input signal is assumed to be true.
Enable output port — Select this check box to pass the Boolean value from the
input enable port to the output enable port. You can connect this port to the
input enable port on another block to control other blocks in the model and
specify execution ordering.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
18-19
18 General Standards
18-20
PMC-ADADIO
The values passed to the enable input port and enable output port of this block
are Boolean values.
18-21
18 General Standards
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The values passed to the enable input port and enable output port of this block
are Boolean values.
18-22
PMC-ADADIO
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0. Note that the 8 digital lines are either all input or
all output.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running. For example, if Channel
vector is [ 2 3 ] and the Reset vector is [1], the action taken will be the same
as if Reset vector was set to [1 1]. Both channels will be reset to their initial
values when model execution is stopped.
Initial value vector — The initial value vector contains the initial logical
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. These values can only contain 1’s and 0’s. If you
specify a scalar value, that value is the initial value for all channels. The
channels are set to the initial values between the time the model is downloaded
and the time it is started. When model execution is stopped, the corresponding
position in Reset vector is checked. Depending on that value, the channel is
either reset to the initial value or remains at the last value attained while the
model was running. For example, assume that Channel vector is [2 5 8],
Reset vector is [1 0 1], and Initial value vector is [1 1 0]. On initial
download, channel 2 is set to high, channel 5 to high, and channel 8 to low.
When the model is stopped, channel 2 resets to high, channel 5 remains at the
last value attained, and channel 8 resets to low.
Enable input port — Select this check box to display an input enable port that
controls writing data to the digital output ports on the hardware. If the enable
input signal is true, then the block input data is written to the digital output
ports on the hardware. If the enable input signal is false, then data is not
written to the digital output ports on the hardware and the output remains at
the previous value. If this check box is not selected, then the enable input
signal is assumed to be true.
Enable output port — Select this check box to pass the Boolean value from the
input enable port to the output enable port. You can connect this port to the
input enable port on another block to control other blocks in the model and
specify execution ordering.
18-23
18 General Standards
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
18-24
PMC-16AO-12
PMC-16AO-12
The PMC-16AO12 board is a high speed board that has twelve 16-bit analog
outputs. In this section, PMC-16AO12 refers to the board, PMC-16AO-12 refers
to the xPC Target block.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PMC-16AO12
Manufacturer General Standards
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
18-25
18 General Standards
18-26
PMC-16AO-12
reads these adjustment factors when the board is initialized. Refer to the
PMC-16AO-12 documentation for further information on autocalibration.
Ground sense — Choose this check box to enable the hardware provided
compensation for ground potential differences. Refer to the PMC-16AO-12
documentation for further information on ground sense.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
18-27
18 General Standards
18-28
19
Humusoft
AD 512 (p. 19-2) I/O board with 8 single analog input (A/D) channels, 2
analog output (D/A) channels, 8 digital inputs, and 8
digital outputs.
19 Humusoft
AD 512
The AD 512 is an I/O board with 8 single analog input (A/D) channels (12-bit)
with a maximum sample rate of 100 kHz, 2 analog output (D/A) channels
(12-bit), 8 digital inputs, and 8 digital outputs.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name AD 512
Manufacturer Humusoft
Bus type ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
19-2
AD 512
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels entered in the
channel vector. The range vector must be the same length as the channel
vector. This driver allows a different range for each channel.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Sample time — Model base sample time or a multiple of the base sample time.
19-3
19 Humusoft
Base address — Enter the base address of the board. This entry must
correspond to the jumper settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
volts Double 1
Input Range (V) Range Code Input Range (V) Range Code
-5 to + 5 -5 0-5 5
For example, if the first channel is -10 to + 10 volts and the second channel is
0 to +5 volts, enter
[-10,5]
Sample time — Enter the base sample time or a multiple of the base sample
time.
19-4
AD 512
Base address — Enter the base address of the board. This entry must
correspond to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Channel vector — Enter a numbers between 1 and 8. This driver allows the
selection of individual digital line numbers in any order. The number of
elements defines the number of digital input lines used.
For example, to use the first, second and fifth digital input lines, enter
[1,2,5]
Number the lines beginning with 1, even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
19-5
19 Humusoft
Channel vector — Enter a numbers between 1 and 8. This driver allows the
selection of individual digital line numbers in any order. The number of
elements defines the number of digital output lines used.
For example, to use the first, second and fifth digital output lines, enter
[1,2,5]
Number the lines beginning with 1, even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
19-6
20
Keithley
DAS-1800HR (p. 20-2) I/O board with 16 single or 8 differential analog input
(A/D) channels, 4 digital input lines and 4 digital output
lines.
KCPI-1801HC (p. 20-7) I/O board with 64 single or 32 differential analog input
(A/D) channels, 2 analog output (D/A) channels, and 4
digital input and output lines.
KPCI-1802HC (p. 20-14) I/O board with 64 single or 32 differential analog input
(A/D) channels, 2 analog output (D/A) channels, and 4
digital input and output lines.
20 Keithley
DAS-1800HR
The DAS-1800HR is an I/O board with 16 single or 8 differential analog input
(A/D) channels (16-bit) with a maximum sample rate of 100 kHz, 4 digital input
lines and 4 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name DAS-1800HR
Manufacturer Keithley
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
20-2
DAS-1800HR
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Gain vector (1,2,4,8) — Enter 1, 2, 4, or 8 for each of the channels in the
channel vector to choose the gain code of that channel. The gain vector must be
the same length as the channel vector. This driver allows the gain of each
channel to be different.
Notice that by increasing the gain code the voltage range is decreased. The gain
divides the input voltage range.
For example, if the first channel has a gain code of 1 (10 volt range) and the
second and fifth channels have a gain code of 2 (5 volt range), enter
[1,2,2]
20-3
20 Keithley
The following table is a list of the ranges for this driver given the gain entered
and the range chosen.
1 -10 to +10 0 to 10
2 -5 to + 5 0 to +5
Input coupling — From the list, select one from the following list of input
modes:
• Differential (8 channels)
• Single-ended (16 channels)
• Single-ended common mode (16 channels)
20-4
DAS-1800HR
20-5
20 Keithley
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
20-6
KCPI-1801HC
KCPI-1801HC
The KCPI-1801 is an I/O board with 64 single or 32 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 333 kHz, 2 analog
output (D/A) channels (12-bit), and 4 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name KCPI-1801HC
Manufacturer Keithley Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D:No, D/A:Yes, Digital I/O:Yes
Multiple board support Yes
20-7
20 Keithley
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to 5 5
-1 to +1 -1 0 to 1 1
For example, if the first channel is -5 to + 5 volts and the second and fifth
channels are 0 to +1 volts, enter
[-5,1,1]
20-8
KCPI-1801HC
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,1]
The driver selects a second differential input 32 channels higher than the first
channel. In the example above, the driver would select the 37th channel as a
differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-9
20 Keithley
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-10
KCPI-1801HC
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-11
20 Keithley
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
20-12
KCPI-1801HC
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-13
20 Keithley
KPCI-1802HC
The KCPI-1802 is an I/O board with 64 single or 32 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 333 kHz, 2 analog
output (D/A) channels (12-bit), and 4 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name KPCI-1802HC
Manufacturer Keithley Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D:No, D/A:Yes, Digital I/O:Yes
Multiple board support Yes
20-14
KPCI-1802HC
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to 5 5
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
20-15
20 Keithley
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,1]
The driver selects a second differential input 32 channels higher than the first
channel. In the example above, the driver would select the 37th channel as a
differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-16
KPCI-1802HC
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-17
20 Keithley
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-18
KPCI-1802HC
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
20-19
20 Keithley
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
20-20
21
Measurement Computing
(Formerly
ComputerBoards)
CIO-DAS1602/16 (p. 21-55) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, 32
digital I/O lines, and 3 counters.
CIO-DDA06 (/12) (p. 21-61) I/O board with 6 analog output (D/A) channels, and 24
digital I/O lines.
CIO-DDA06/16 (p. 21-67) I/O board with 6 analog output (D/A) channels, and 24
digital I/O lines.
CIO-DIO24 (p. 21-73) I/O board with 24 digital I/O lines.
CIO-DIO24H (p. 21-77) I/O board with 24 digital I/O lines.
CIO-DIO48 (p. 21-80) I/O board with 48 digital I/O lines.
CIO-DIO48H (p. 21-84) I/O board with 48 digital I/O lines.
CIO-DIO96 (p. 21-88) I/O board with 96 digital I/O lines.
CIO-DIO192 (p. 21-92) I/O board with 192 digital I/O lines.
CIO-DO24DD (p. 21-96) I/O board with 24 open-collector digital output lines.
CIO-PDISO16 (p. 21-98) I/O board with 16 isolated digital input lines and 16 relay
driven digital output lines.
CIO-QUAD02 (p. 21-101) 24-bit counting board with 2 channels. This board
typically connects to incremental encoders.
CIO-QUAD04 (p. 21-109) 24-bit counting board with 4 channels. This board
typically connects to incremental encoders.
PC104-DAC06 (/12) (p. 21-117) I/O board with 6 analog output (D/A) channels.
PC104-DAS16JR/12 (p. 21-119) I/O board with 16 single or 8 differential analog input
channels, 4 digital input lines and 4 digital output lines.
PC104-DAS16JR/16 (p. 21-123) I/O board with 16 single or 8 differential analog input
(A/D) channels, 4 digital input lines and 4 digital output
lines.
PC104-DIO48 (p. 21-127) I/O board with 48 digital I/O lines.
PCI-CTR05 (p. 21-131) I/O board with 5 counter/timer channels.
21-2
PCI-DAS1200 (p. 21-141) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, and 24
digital input and output lines.
PCI-DAS1200/JR (p. 21-148) I/O board with 16 single or 8 differential analog input
(A/D) channels, and 24 digital I/O lines.
PCI-DAS1602/12 (p. 21-153) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, and 24
digital input and output lines and 3 counters.
PCI-DAS1602/16 (p. 21-160) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, and 24
digital input and output lines and 3 counters.
PCI-DDA02/12 (p. 21-167) I/O board with 2 analog output (D/A) channels, and 48
digital I/O lines.
PCI-DDA02/16 (p. 21-173) I/O board with 2 analog output (D/A) channels, and 48
digital I/O lines.
PCI-DDA04/12 (p. 21-179) I/O board with 4 analog output (D/A) channels, and 48
digital I/O lines
PCI-DDA04/16 (p. 21-185) I/O board with 4 analog output (D/A) channels, and 48
digital I/O lines.
PCI-DDA08/12 (p. 21-191) I/O board with 8 analog output (A/D) channels, and 48
digital I/O lines.
PCI-DDA08/16 (p. 21-197) I/O board with 8 analog output (A/D) channels, and 48
digital I/O lines.
PCI-DIO24 (p. 21-203) I/O board with 24 digital I/O lines.
PCI-DIO24H (p. 21-207) I/O board with 24 digital I/O lines.
PCI-DIO48H (p. 21-211) I/O board with 48 digital I/O lines.
PCI-DIO96H (p. 21-215) I/O board with 96 digital I/O lines.
PCI-DIO96 (p. 21-219) I/O board with 96 digital I/O lines.
PCI-PDISO8 (p. 21-223) I/O board with eight inputs and eight relay outputs.
PCI-PDISO16 (p. 21-226) I/O board with 16 inputs and 16 relay outputs.
21-3
21 Measurement Computing (Formerly ComputerBoards)
PCIM-DAS1602/16 (p. 21-229) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, and 24
digital input and output lines and 3 counters.
PCIM-DDA06/16 (p. 21-236) I/O board with 6 analog output (D/A) channels, and 24
digital I/O lines.
PCI-DUAL-AC5 (p. 21-242) I/O board with 48 digital I/O lines.
PCI-QUAD04 (p. 21-246) 24-bit counting board with 4 channels. This board
typically connects to incremental encoders.
PCI-DAS-TC (p. 21-254) I/O board with 16 differential analog thermocouple input
channels. The thermocouple signals are converted by a
high frequency synchronous V-F A/D converter.
21-4
CIO-CTR05
CIO-CTR05
The CIO-CTR05 is an I/O board with five counter/timer channels (16-bit).
It contains one AM9513A counter/timer chip. For additional information about
the various counter/timer modes of that chip see the AM9513A data sheet
which is part of the board documentation.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-CTR05
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-5
21 Measurement Computing (Formerly ComputerBoards)
TTL Double 0 to 1
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
21-6
CIO-CTR05
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-7
21 Measurement Computing (Formerly ComputerBoards)
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-8
CIO-CTR05
CIO-CTR05 Counter FM
The CIO-CTR05 has one AM9513A chip with five counters.
The CIO-CTR05 FM driver programs the AM9513A for FM (Frequency
Modulation) signal generation (a square wave with fixed duty cycle and
variable frequency). For the corresponding counter channel, the PWM signal is
output at the pin named OUT.
TTL Double 0 to 1
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
21-9
21 Measurement Computing (Formerly ComputerBoards)
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-10
CIO-CTR05
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the Output duty cycle defined in the setting above define the
duration of the TTL high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-11
21 Measurement Computing (Formerly ComputerBoards)
TTL Double 0 to 1
21-12
CIO-CTR05
TTL Double 0 to 1
CIO-CTRxx
You can use this block to program the AMD9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and Frequency Capture blocks use this
block in their underlying subsystems. The API for this block is not currently
documented.
21-13
21 Measurement Computing (Formerly ComputerBoards)
CIO-CTR10
The CIO-CTR10 is an I/O board with ten counter/timer channels (16-bit).
It contains one AM9513A counter/timer chip. For additional information about
the various counter/timer modes of that chip see the AM9513A data sheet
which is part of the board documentation.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-CTR05
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-14
CIO-CTR10
TTL Double 0 to 1
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
21-15
21 Measurement Computing (Formerly ComputerBoards)
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-16
CIO-CTR10
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-17
21 Measurement Computing (Formerly ComputerBoards)
CIO-CTR10 Counter FM
The CIO-CTR10 has two AM9513A chip with ten counters.
The CIO-CTR05 FM driver programs the AM9513A for FM (Frequency
Modulation) signal generation (a square wave with fixed duty cycle and
variable frequency). For the corresponding counter channel, the PWM signal is
output at the pin named OUT.
TTL Double 0 to 1
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
21-18
CIO-CTR10
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-19
21 Measurement Computing (Formerly ComputerBoards)
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the Output duty cycle defined in the setting above define the
duration of the TTL high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-20
CIO-CTR10
TTL Double 0 to 1
21-21
21 Measurement Computing (Formerly ComputerBoards)
TTL Double 0 to 1
CIO-CTRxx
You can use this block to program the AMD9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and Frequency Capture blocks use this
block in their underlying subsystems. The API for this block is not currently
documented.
21-22
CIO-DAC08 (/12)
CIO-DAC08 (/12)
The CIO-DAC08 (/12) is an I/O board with eight analog output (D/A) channels
(12-bit).
xPC Target supports this board with this driver block:
• “CIO-DAC08 Analog Output (D/A)” on page 21-23
Board Characteristics
Board name CIO-DAC08 (CIO-DAC08/12)
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
21-23
21 Measurement Computing (Formerly ComputerBoards)
Range vector — Range code for each of the channels in the channel vector. The
range vector must have the same length as the channel vector. This board
allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-24
CIO-DAC08/16
CIO-DAC08/16
The CIO-DAC08/16 is an I/O board with 8 analog output (D/A) channels
(16-bit).
xPC Target supports this board with this driver block:
• “CIO-DAC08/16 Analog Output (D/A)” on page 21-25
Board Characteristics
Board name CIO-DAC08/16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
21-25
21 Measurement Computing (Formerly ComputerBoards)
Range vector — Range code for each of the channels in the channel vector. The
range vector must be the same length as the channel vector. This driver allows
the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-26
CIO-DAC16 (/12)
CIO-DAC16 (/12)
The CIO-DAC016 is an I/O board with 16 analog output (D/A) channels (12-bit).
xPC Target supports this board with one driver block:
• “CIO-DAC16/16 Analog Output (D/A)” on page 21-30
Board Characteristics
Board name CIO-DAC16 (/12)
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
21-27
21 Measurement Computing (Formerly ComputerBoards)
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-28
CIO-DAC16 (/12)
The jumpers by the range DIP switches on the board all have to be in the XFER
position. The Wait-State jumper has to be in the off position.
21-29
21 Measurement Computing (Formerly ComputerBoards)
CIO-DAC16/16
The CIO-DAC16/16 is an I/O board with 16 analog output (D/A) channels
(16-bit).
xPC Target supports this board with this driver block:
• “CIO-DAC16/16 Analog Output (D/A)” on page 21-30
Board Characteristics
Board name CIO-DAC08/16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
21-30
CIO-DAC16/16
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Reset vector – The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector – The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address - Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-31
21 Measurement Computing (Formerly ComputerBoards)
The jumpers by the range DIP switches on the board all have to be in the XFER
position. The Wait-State jumper has to be in the off position.
21-32
CIO-DAS16/330
CIO-DAS16/330
The CIO-DAS16/330 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (12-bit) with a maximum sample rate of 330 kHz, 4 digital
input lines, and 4 digital output lines.
xPC Target supports this board with one driver block:
• “CIO-DAS16/330 Analog Input (A/D)” on page 21-34
Note xPC Target does not support the digital I/O on this board.
Board Characteristics
Board name CIO-DAS16/330
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
21-33
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
21-34
CIO-DAS16/JR (/12)
CIO-DAS16/JR (/12)
The CIO-DAS16/JR is an I/O board with 16 single or 8 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 130 kHz, 4 digital input
lines, 4 digital output lines, and 3 counter/timers (16-bit). An external signal
conditioning board can be added to the CIO-DAS16/JR board.
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the digital I/O or counters on this board.
Board Characteristics
Board name CIO-DAS16/JR
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
21-35
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
21-36
CIO-DAS16/JR (/12)
volts Double 1
• EXP16
• EXP32
• EXP-BRIDGE16
• EXP-RTD
• EXP-GP
21-37
21 Measurement Computing (Formerly ComputerBoards)
Note This feature should only be used if at least one EXP-board has to be
connected to the CIO-DAS16Jr. If all inputs are directly connected to the A/D
board use the CIO-DAS16Jr/12 (2.2.1) driver instead which allows much
higher sample rates.
EXP Gain — This parameter describes the gains for each EXP-channel used.
This vector corresponds over his indices with the EXP-gain vector and must
therefore have the same length. Because this I/O-driver can be used together
with all different EXP-boards there is no restriction about the gain value itself.
The EXP-board manual should be contacted to know what the gains of the
different EXP-boards are. The gains on the EXP-board depend on several DIP
switches on the specific EXP-board.
Example:EXP Channel Vector:[4,0,12]
EXP Gain Vector:[1,1000,200]
EXP-channel 4 has gain 1, channel 0 gain 1000 and channel 12 gain
200
If EXP Channel Vector is an empty vector EXP Gain Vector has to be an empty
vector as well.
A/D Board Channel — This field specifies to which A/D-channel of the
CIO-DAS16Jr the block of 16 EXP-channels are mapped. Because the input
coupling of the A/D board has to be single-ended channel 0 to 16 can be used.
The channel selection jumpers on the EXP-boards have to be set accordingly to
this software setting.
21-38
CIO-DAS16/JR (/12)
A/D Board Range — This field specifies the input voltage range for the
CIO-DAS16/JR which is the same for all 16 single-ended channels.
From the list, choose either +-10V (-10 volts to +10 volts), +-5V, +-2.5V,
+-1.25V, +-0.625V, 0-10V, 0-5V, 0-2.5V, or 0-1.25V.This driver does not allow
the selection of different range for each channel.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address - Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Note If this driver is used the input coupling switch on the CIO-DAS16Jr has
always to be in the 16 (single-ended) position.
21-39
21 Measurement Computing (Formerly ComputerBoards)
CIO-DAS16JR/16
The CIO-DAS16JR/16 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (16-bit) with a maximum sample rate of 100 kHz, 4 digital
input lines, 4 digital output lines and 3 counter/timers.
xPC Target supports this board with this driver block:
• “CIO-DAS16JR/16 Analog Input (A/D)” in Chapter 21
Note xPC Target does not support the digital I/O or the counters on this
board.
Board Characteristics
Board name CIO-DAS16JR/16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
21-40
CIO-DAS16JR/16
volts Double 1
21-41
21 Measurement Computing (Formerly ComputerBoards)
CIO-DAS1601/12
The CIO-DAS1601/12 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (12-bit) with a maximum sampling rate of 160 kHz, 2
analog output (D/A) channels (12-bit), 32 digital input and output lines, and 3
counters (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target supports only 24 digital I/O lines and does not support the
counters on this board.
Board Characteristics
Board name CIO-DAS1601/12
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support A/D: No, D/A: Yes, Digital I/O: Yes
Multiple board support Yes
21-42
CIO-DAS1601/12
volts Double 1
21-43
21 Measurement Computing (Formerly ComputerBoards)
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
21-44
CIO-DAS1601/12
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-45
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum of 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-46
CIO-DAS1601/12
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-47
21 Measurement Computing (Formerly ComputerBoards)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-48
CIO-DAS1602/12
CIO-DAS1602/12
The CIO-DAS1602/12 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (12-bit) with a maximum sampling rate of 100kHz, 2
analog output (D/A) channels (12-bit), 32 digital input and output lines, and 3
counters (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target supports only 24 digital I/O lines and does not support the
counters on this board.
Board Characteristics
Board Name CIO-DAS1602/12
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support A/D: No, D/A: Yes, Digital I/O: Yes
Multiple board support Yes
21-49
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
21-50
CIO-DAS1602/12
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be planted according to the ranges
used.
21-51
21 Measurement Computing (Formerly ComputerBoards)
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-52
CIO-DAS1602/12
For example, to use all of the digital inputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-53
21 Measurement Computing (Formerly ComputerBoards)
For example, to use all of the digital outputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-54
CIO-DAS1602/16
CIO-DAS1602/16
The CIO-DAS1602/16 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (16-bit) with a maximum sampling rate of 100kHz, 2
analog output (D/A) channels (16-bit), 32 digital I/O lines, and 3 counters
916-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target supports only 24 digital I/O lines and does not support the
counters on this board.
Board Characteristics
Board Name CIO-DAS1602/16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support A/D: No, D/A: Yes, Digital I/O: Yes
Multiple board support Yes
21-55
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
21-56
CIO-DAS1602/16
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be planted according to the ranges
used.
21-57
21 Measurement Computing (Formerly ComputerBoards)
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-58
CIO-DAS1602/16
For example, to use all of the digital inputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-59
21 Measurement Computing (Formerly ComputerBoards)
For example, to use all of the digital outputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip
with 3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-60
CIO-DDA06 (/12)
CIO-DDA06 (/12)
The CIO-DDA06 (/12) is an I/O board with 6 analog output (D/A) channels
(12-bit), and 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DDA06 (/12)
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-61
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
21-62
CIO-DDA06 (/12)
The range settings have to correspond to the DIP switch settings on the board.
The jumpers by the range DIP switches on the board all have to be in the XFER
position. The Wait-State jumper has to be in the off position.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-63
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-64
CIO-DDA06 (/12)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-65
21 Measurement Computing (Formerly ComputerBoards)
Base address - Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-66
CIO-DDA06/16
CIO-DDA06/16
The CIO-DDA06/16) is an I/O board with 6 analog output (D/A) channels
(16-bit), and 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DDA06/16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-67
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
21-68
CIO-DDA06/16
The range settings have to correspond to the DIP switch settings on the board.
The jumpers by the range DIP switches on the board all have to be in the XFER
position. The Wait-State jumper has to be in the off position.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-69
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-70
CIO-DDA06/16
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-71
21 Measurement Computing (Formerly ComputerBoards)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-72
CIO-DIO24
CIO-DIO24
The CIO-DIO24 is an I/O board with 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DIO24
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-73
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-74
CIO-DIO24
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-75
21 Measurement Computing (Formerly ComputerBoards)
21-76
CIO-DIO24H
CIO-DIO24H
The CIO-DIO24H is an I/O board with 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DIO24H
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-77
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-78
CIO-DIO24H
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-79
21 Measurement Computing (Formerly ComputerBoards)
CIO-DIO48
The CIO-DIO48 is an I/O board with 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DIO48
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-80
CIO-DIO48
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-81
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-82
CIO-DIO48
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-83
21 Measurement Computing (Formerly ComputerBoards)
CIO-DIO48H
The CIO-DIO48H is an I/O board with 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DIO48H
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-84
CIO-DIO48H
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-85
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
21-86
CIO-DIO48H
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter 0x300
21-87
21 Measurement Computing (Formerly ComputerBoards)
CIO-DIO96
The CIO-DIO96 is an I/O board with 96 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DIO96
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-88
CIO-DIO96
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1, 2, 3, or 4. The Chip parameter defines which of
the four 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-89
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1, 2, 3, or 4. The Chip parameter defines which of
the four 8255 chips is used.
21-90
CIO-DIO96
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-91
21 Measurement Computing (Formerly ComputerBoards)
CIO-DIO192
The CIO - DIO192 is an I/O board with 192 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name CIO-DIO192
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-92
CIO-DIO192
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1, 2, 3, 4, 5, 6, 7, or 8. The Chip parameter defines
which of the eight 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-93
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1, 2, 3, 4, 5, 6, 7, or 8. The Chip parameter defines
which of the eight 8255 chips is used.
21-94
CIO-DIO192
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-95
21 Measurement Computing (Formerly ComputerBoards)
CIO-DO24DD
The CIO-DO24DD is an I/O board with 24 open-collector digital output lines.
xPC Target supports this board with this driver block:
• “CIO-DO24DD Digital Output” on page 21-96
Board Characteristics
Board name CIO-DO24DD
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-96
CIO-DO24DD
For example, to use all of the digital outputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-97
21 Measurement Computing (Formerly ComputerBoards)
CIO-PDISO16
The CIO-PDISO16 is an I/O board with 16 isolated digital input lines and 16
relay driven digital output lines.
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the 16 relays on this board.
Board Characteristics
Board name CIO-PDISO16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-98
CIO-PDISO16
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-99
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-100
CIO-QUAD02
CIO-QUAD02
The CIO-QUAD02 is a 24-bit counting board with 2 channels. This board
typically connects to incremental encoders. Incremental encoders convert
physical motion into electrical pulses that can be used to determine velocity,
direction, and distance.
xPC Target supports this board with this driver block:
• “CIO-QUAD02 Incremental Encoder” on page 21-101
Board Characteristics
Board name CIO-QUAD02
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-101
21 Measurement Computing (Formerly ComputerBoards)
Note If you are using an earlier version of this driver block, see
“CIO-QUAD02 Incremental Encoder (Obsolete)” on page 21-106.
Counting Mode — From the list, select a counting mode (Normal, Range Limit,
Non-recycle, or Modulo-N). The output of the block depends on both the setting
of Index input resets counter and on the counting mode as described in the
following table.
21-102
CIO-QUAD02
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Normal Upon model start, the output count is Upon model start, the counter is
initialized to Count Limit or Reset initialized to 0. The counter then
Value. The output count increments or increments or decrements until it
decrements one full revolution from the either overflows or underflows. For a
Count Limit or Reset Value. The rotary encoder, the number of
output count is reset to this value each revolutions is the number of output
time the index is reached. counts divided by the number of
For example, if Index input resets counts per revolution. The resulting
counter is selected, and a rotary integer is the number of revolutions;
encoder has 1024 counts per the fractional part can be converted
revolution, and a Count Limit or to an angle.
Reset Value value of 5000, a full
clockwise revolution of the encoder
increments the counter to 6023, at
which the index is reached. The
counter then resets to 5000.
21-103
21 Measurement Computing (Formerly ComputerBoards)
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Range Limit Upon model start, the counter Upon model start, the counter is
increments or decrements until it initialized to 0. In the clockwise
reaches the count limit Count Limit direction, the counter increments
or Reset Value. If the clock motion is until it saturates at Count Limit or
clockwise, the counter stays at Count Reset Value. In the counterclockwise
Limit or Reset Value once it reaches direction, the counter decrements
that value. If the clock motion is until it saturates at 0.
counterclockwise, the counter
decrements one revolution then resets You can use this setting to set a
to Count Limit or Reset Value. repeatable 0 when there is a
mechanical stop. At model start, the
count is initialized to 0. The machine
then shifts to the negative direction
stop. At that point, the encoder
reports 0 at the stop and all other
positions will be positive and
repeatable.
Non-recycle Upon model start, the counter is The behavior of this option is
initialized to Count Limit or Reset undefined.
Value. With counterclockwise rotation,
the counter decrements and saturates
at 0. If the encoder reaches the index
before the counter saturates at 0, the
counter resets to Count Limit or
Reset Value. With clockwise rotation,
the counter increments until the
encoder reaches the index. When the
encoder reaches the index, the counter
resets to Count Limit or Reset Value.
You can use this setting to place 0 at
the first index inside a mechanical
limit.
21-104
CIO-QUAD02
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Modulo-N The behavior of this option is Upon model start, the counter is
undefined. initialized to 0. In the clockwise
direction, the counter increments to
Count Limit or Reset Value, then
resets to 0 and repeats. When the
counter decrements, it counts to 0,
then resets to the Count Limit or
Reset Value value and continues to
decrement. You can use this setting
to repeat intervals that do not match
the distance between indexes
(resulting, for example, from gear
ratios).
Count Limit or Reset Value — The preset register (PR) on the counter chip is
a 24-bit quantity. The counter uses this value as a limit for the Range Limit,
Non-recycle, and Modulo-N counting modes.
When Index input resets counter is selected, this value acts as both the initial
value at model start and the value that an index resets the count to.
You can enter negative limit values, but the counter treats them as large
positive values. For example, a limit of -1 results in the Modulo-N range from
0 to 2 24 – 1 , not from -1 to 0.
Count Range — From the list, choose 0...2^24-1 or -2^23...+2^23-1. The
counter uses a 24-bit accumulator which overflows from 2 24 – 1 to 0. This same
overflow can be interpreted as the transition from -1 to 0. Selecting the
unipolar range 0 to 2 24 – 1 puts the discontinuity in counts at 0. Selecting the
bipolar range of ( – 2 ) 23 to 2 23 – 1 puts the discontinuity far away from 0. The
bipolar range is achieved by sign extending the 24-bit count to 32 bits before
converting to double.
Count Speed — From the list, choose non-quadrature, 1X, 2X, or 4X:
21-105
21 Measurement Computing (Formerly ComputerBoards)
input might cause undefined results. You should disconnect the B and index
inputs.
• 1X — Counts up or down once per complete cycle of the quadrature signal.
• 2X — Counts up or down twice per complete cycle of the quadrature signal.
• 4X — Counts up or down four times per complete cycle of the quadrature
signal.
Filter prescale factor — Enter a base prescale factor for digital filtering. This
filter helps eliminate high frequency noise. Enter a value from 0 to ff in
hexadecimal (0 to 256 in decimal). For example, for a prescale factor value of
ff in hexadecimal, enter
0xff
Sample Time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
Base Address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-106
CIO-QUAD02
If you choose Only First, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. The encoder ignores all other times it reaches the index. Init remains
1 until a rollover is detected, and then set to -1. A rollover is when the counter
reaches its maximum value and begins to start counting at zero again. A
rollover can also occur when the counter reaches its minimum value and the
counter resets itself to the maximum value and resumes counting down. The
outputs are still accurate after rollover. The -1 flag is used to alert that a
rollover has occurred.
If you choose Continuous, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. Each time the encoder reaches the index, it resets to zero. Init
remains always at l because a rollover cannot occur.
Positive Rotation — From the list, choose either Clockwise or Counter
Clockwise. This parameter sets the direction for positive rotation. If you choose
Clockwise, when the encoder is turned clockwise it counts up, and when
turned counter clockwise it counts down. If you choose Counter Clockwise the
counting direction is reversed.
Mode — From the list, choose Single, Double, or Quadruple. This parameter
specifies the phase detection mode. That is, how many phase changes are
detected. For more information, see the board manual.
Resolution — This field specifies the divisions of the connected incremental
encoder for one revolution.
21-107
21 Measurement Computing (Formerly ComputerBoards)
Filter prescale factor — Enter a base prescale factor for digital filtering. This
filter helps eliminate high frequency noise. Enter a value from 0 to ff in
hexadecimal (0 to 256 in decimal). For example, for a prescale factor value of
ff in hexadecimal, enter
0xff
Sample Time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
Base Address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-108
CIO-QUAD04
CIO-QUAD04
The CIO-QUAD04 is a 24-bit counting board with 4 channels. This board
typically connects to incremental encoders. Incremental encoders convert
physical motion into electrical pulses that can be used to determine velocity,
direction, and distance.
xPC Target supports this board with this driver block:
• “CIO-QUAD04 Incremental Encoder” on page 21-110
1 If the index signal from an encoder is not being used, connect the index
inputs.
21-109
21 Measurement Computing (Formerly ComputerBoards)
Board Characteristics
Board name CIO-QUAD04
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
Note If you are using an earlier version of this driver block, see
“CIO-QUAD04 Incremental Encoder (Obsolete)” on page 21-114.
21-110
CIO-QUAD04
Index Polarity — From the list, select the index pulse slope that the board
should detect. Select Positive Index for a positive slope; select Negative
Index for a negative slope.
Counting Mode — From the list, select a counting mode (Normal, Range Limit,
Non-recycle, or Modulo-N). The output of the block depends on both the setting
of Index input resets counter and on the counting mode as described in the
following table.
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Normal Upon model start, the output count is Upon model start, the counter is
initialized to Count Limit or Reset initialized to 0. The counter then
Value. The output count increments or increments or decrements until it
decrements one full revolution from the either overflows or underflows. For a
Count Limit or Reset Value. The rotary encoder, the number of
output count is reset to this value each revolutions is the number of output
time the index is reached. counts divided by the number of
For example, if Index input resets counts per revolution. The resulting
counter is selected, and a rotary integer is the number of revolutions;
encoder has 1024 counts per the fractional part can be converted
revolution, and a Count Limit or to an angle.
Reset Value value of 5000, a full
clockwise revolution of the encoder
increments the counter to 6023, at
which the index is reached. The
counter then resets to 5000.
21-111
21 Measurement Computing (Formerly ComputerBoards)
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Range Limit Upon model start, the counter Upon model start, the counter is
increments or decrements until it initialized to 0. In the clockwise
reaches the count limit Count Limit direction, the counter increments
or Reset Value. If the clock motion is until it saturates at Count Limit or
clockwise, the counter stays at Count Reset Value. In the counterclockwise
Limit or Reset Value once it reaches direction, the counter decrements
that value. If the clock motion is until it saturates at 0.
counterclockwise, the counter
decrements one revolution then resets You can use this setting to set a
to Count Limit or Reset Value. repeatable 0 when there is a
mechanical stop. At model start, the
count is initialized to 0. The machine
then shifts to the negative direction
stop. At that point, the encoder
reports 0 at the stop and all other
positions will be positive and
repeatable.
Non-recycle Upon model start, the counter is The behavior of this option is
initialized to Count Limit or Reset undefined.
Value. With counterclockwise rotation,
the counter decrements and saturates
at 0. If the encoder reaches the index
before the counter saturates at 0, the
counter resets to Count Limit or
Reset Value. With clockwise rotation,
the counter increments until the
encoder reaches the index. When the
encoder reaches the index, the counter
resets to Count Limit or Reset Value.
You can use this setting to place 0 at
the first index inside a mechanical
limit.
21-112
CIO-QUAD04
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Modulo-N The behavior of this option is Upon model start, the counter is
undefined. initialized to 0. In the clockwise
direction, the counter increments to
Count Limit or Reset Value, then
resets to 0 and repeats. When the
counter decrements, it counts to 0,
then resets to the Count Limit or
Reset Value value and continues to
decrement. You can use this setting
to repeat intervals that do not match
the distance between indexes
(resulting, for example, from gear
ratios).
Count Limit or Reset Value — The preset register (PR) on the counter chip is
a 24-bit quantity. The counter uses this value as a limit for the Range Limit,
Non-recycle, and Modulo-N counting modes.
When Index input resets counter is selected, this value acts as both the initial
value at model start and the value that an index resets the count to.
You can enter negative limit values, but the counter treats them as large
positive values. For example, a limit of -1 results in the Modulo-N range from
0 to 2 24 – 1 , not from -1 to 0.
Count Range — From the list, choose 0...2^24-1 or -2^23...+2^23-1. The
counter uses a 24-bit accumulator which overflows from 2 24 – 1 to 0. This same
overflow can be interpreted as the transition from -1 to 0. Selecting the
unipolar range 0 to 2 24 – 1 puts the discontinuity in counts at 0. Selecting the
bipolar range of ( – 2 ) 23 to 2 23 – 1 puts the discontinuity far away from 0. The
bipolar range is achieved by sign extending the 24-bit count to 32 bits before
converting to double.
21-113
21 Measurement Computing (Formerly ComputerBoards)
Count Speed — From the list, choose non-quadrature, 1X, 2X, or 4X:
Sample time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-114
CIO-QUAD04
If you choose Only First, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. The encoder ignores all other times it reaches the index. Init remains
1 until a rollover is detected, and then set to -1. A rollover is when the counter
reaches its maximum value and begins to start counting at zero again. A
rollover can also occur when the counter reaches its minimum value and the
counter resets itself to the maximum value and resumes counting down. The
outputs are still accurate after rollover. The -1 flag is used to alert that a
rollover has occurred.
If you choose Continuous, The first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. Each time the encoder reaches the index, it resets to zero. Init
remains always at l because a rollover cannot occur.
Positive Rotation — From the list, choose either Clockwise or Counter
Clockwise. This parameter sets the direction for positive rotation. If you choose
Clockwise, when the encoder is turned clockwise it counts up, and when
turned counter clockwise it counts down. If you choose Counter Clockwise the
counting direction is reversed.
21-115
21 Measurement Computing (Formerly ComputerBoards)
Mode — From the list, choose Single, Double, or Quadruple. This parameter
specifies the phase detection mode. That is, how many phase changes are
detected. For more information, see the board manual.
Resolution — This field specifies the divisions of the connected incremental
encoder for one revolution.
Filter prescale factor — Enter a base prescale factor for digital filtering. This
filter helps eliminate high frequency noise. Enter a value from 0 to ff in
hexadecimal (0 to 256 in decimal). For example, for a prescale factor value of
ff in hexadecimal, enter
0xff
Sample time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
21-116
PC104-DAC06 (/12)
PC104-DAC06 (/12)
The PC104-DAC06 (12) is an I/O board with 6 analog output (D/A) channels
(12-bit).
xPC Target supports this board with this driver block:
• “PC104-DAC06 (/12) Analog Output (D/A)” on page 21-117
Board Characteristics
Board name PC104-DAC06 (/12)
Manufacturer Computer Boards
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
21-117
21 Measurement Computing (Formerly ComputerBoards)
Range vector — Range code for each of the channels in the channel vector. The
range vector must be the same length as the channel vector. This board allows
the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the jumper settings on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
The jumpers by the range DIP switches on the board all have to be in the XFER
position. The Wait-State jumper has to be in the off position.
21-118
PC104-DAS16JR/12
PC104-DAS16JR/12
The PC104-DAS16JR/12 is an I/O board with 16 single or 8 differential analog
input channels (12-bit) with a maximum sample rate of 150 kHz, 4 digital input
lines and 4 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PC104-DAS16JR/12
Manufacturer ComputerBoards
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
21-119
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Range — From the list, choose either +-10V (-10 volts to +10 volts), +-5V,
+-2.5V, +-1.25V, +-0.625V, 0-10V, 0-5V, 0-2.5V, or 0-1.25V.This driver does
not allow the selection of a different range for each channel.
Input coupling — From the list, select one from the following list of input
modes:
21-120
PC104-DAS16JR/12
21-121
21 Measurement Computing (Formerly ComputerBoards)
The switch and jumper settings, that are not mentioned here, have no influence
on the running of xPC Target.
21-122
PC104-DAS16JR/16
PC104-DAS16JR/16
The PC104-DAS16JR/16 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (16-bit) with a maximum sample rate of 100 kHz, 4 digital
input lines and 4 digital output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PC104-DAS16JR/16
Manufacturer ComputerBoards
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
21-123
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Range — From the list, choose either +-10V (-10 volts to +10 volts), +-5V,
+-2.5V, +-1.25V, +-0.625V, 0-10V, 0-5V, 0-2.5V, or 0-1.25V.This driver does
not allow the selection of different range for each channel.
Input coupling — From the list, select one from the following list of input
modes:
21-124
PC104-DAS16JR/16
21-125
21 Measurement Computing (Formerly ComputerBoards)
21-126
PC104-DIO48
PC104-DIO48
The PC104-DIO48 is an I/O board with 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
• “PC104-DIO48 Digital Input” on page 21-128
• “PC104-DIO48 Digital Output” on page 21-129
Board Characteristics
Board name PC104-DIO48
Manufacturer ComputerBoards
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
21-127
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-128
PC104-DIO48
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
21-129
21 Measurement Computing (Formerly ComputerBoards)
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
21-130
PCI-CTR05
PCI-CTR05
The PCI-CTR05 is an I/O board with 5 counter/timer channels (16-bit).
It contains one AM9513A counter/timer chip. For additional information about
the various counter/timer modes of that chip see the AM9513A data sheet
which is part of the board documentation.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-CTR05
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-131
21 Measurement Computing (Formerly ComputerBoards)
TTL Double 0 to 1
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
21-132
PCI-CTR05
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-133
21 Measurement Computing (Formerly ComputerBoards)
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
21-134
PCI-CTR05
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
PCI-CTR05 Counter FM
The PCI-CTR05 has one AM9513A chip with 5 counters.
The PCI-CTR05 FM driver programs the AM9513A for FM (Frequency
Modulation) signal generation (a square wave with fixed duty cycle and
variable frequency). For the corresponding counter channel, the PWM signal is
output at the pin named OUT.
TTL Double 0 to 1
21-135
21 Measurement Computing (Formerly ComputerBoards)
Output duty cycle — Enter a value between 0 and 1 to set the duty cycle of the
square wave. The Duty Cycle is held fixed during execution of the target
application.
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-136
PCI-CTR05
Output duty cycle — Enter a value between 0 and 1 to set the duty cycle of the
square wave. The Duty Cycle is held fixed during execution of the target
application.
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
21-137
21 Measurement Computing (Formerly ComputerBoards)
In either case, the Output duty cycle defined in the setting above define the
duration of the TTL high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-138
PCI-CTR05
TTL Double 0 to 1
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-139
21 Measurement Computing (Formerly ComputerBoards)
TTL Double 0 to 1
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
PCI-CTRxx
You can use this block to program the AMD9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and Frequency Capture blocks use this
block in their underlying subsystems. The API for this block is not currently
documented.
21-140
PCI-DAS1200
PCI-DAS1200
The PCI-DAS1200 is an I/O board with 16 single or 8 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 330 kHz, 2 analog
output (D/A) channels (12-bit), and 24 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DAS1200
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support A/D: No, D/A: Yes, Digital I/O: Yes
Multiple board support Yes
volts Double 1
21-141
21 Measurement Computing (Formerly ComputerBoards)
This driver does not allow the selection of individual channels or to mix
single-ended and differential inputs.
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Range — From the list, choose either +-10V (-10 volts to +10 volts), +-5V,
+-2.5V, +-1.25V, 0-10V, 0-5V, 0-2.5V, or 0-1.25V.This driver does not allow
the selection of different range for each channel.
Input coupling — From the list, select one from the following list of input
modes:
21-142
PCI-DAS1200
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
21-143
21 Measurement Computing (Formerly ComputerBoards)
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-144
PCI-DAS1200
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-145
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
21-146
PCI-DAS1200
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-147
21 Measurement Computing (Formerly ComputerBoards)
PCI-DAS1200/JR
The PCI-DAS1200/JR is an I/O board with 16 single or 8 differential analog
input (A/D) channels (12-bit) with a maximum sample rate of 330 kHz, and 24
digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DAS1200/JR
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support A/D: No, Digital I/O: Yes
Multiple board support Yes
volts Double 1
21-148
PCI-DAS1200/JR
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Range — From the list, choose either +-10V (-10 volts to +10 volts), +-5V,
+-2.5V, +-1.25V, 0-10V, 0-5V, 0-2.5V, or 0-1.25V.This driver does not allow
the selection of different range for each channel.
Input coupling — From the list, select one from the following list of input
modes:
21-149
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-150
PCI-DAS1200/JR
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
21-151
21 Measurement Computing (Formerly ComputerBoards)
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-152
PCI-DAS1602/12
PCI-DAS1602/12
The PCI-DAS1602/12 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (12-bit) with a maximum sampling rate of 200kHz, 2
analog output (D/A) channels (12-bit), and 24 digital input and output lines and
3 counters (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target supports only 24 digital I/O lines and does not support the
counters on this board.
Board Characteristics
Board Name PCI-DAS1602/12
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-153
21 Measurement Computing (Formerly ComputerBoards)
21-154
PCI-DAS1602/12
volts Double 1
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
21-155
21 Measurement Computing (Formerly ComputerBoards)
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-156
PCI-DAS1602/12
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-157
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
21-158
PCI-DAS1602/12
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-159
21 Measurement Computing (Formerly ComputerBoards)
PCI-DAS1602/16
The PCI-DAS1602/16 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (16-bit) with a maximum sampling rate of 200kHz, 2
analog output (D/A) channels (16-bit), and 24 digital input and output lines and
3 counters (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target supports only 24 digital I/O lines and does not support the
counters on this board.
Board Characteristics
Board Name PCI-DAS1602/16
Manufacturer ComputerBoards
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-160
PCI-DAS1602/16
volts Double 1
21-161
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
21-162
PCI-DAS1602/16
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be planted according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-163
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-164
PCI-DAS1602/16
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
21-165
21 Measurement Computing (Formerly ComputerBoards)
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-166
PCI-DDA02/12
PCI-DDA02/12
The PCI-DDA02/12) is an I/O board with 2 analog output (D/A) channels
(12-bit), and 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DDA02/12
Manufacturer Computer Boards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-167
21 Measurement Computing (Formerly ComputerBoards)
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 - +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
21-168
PCI-DDA02/12
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
21-169
21 Measurement Computing (Formerly ComputerBoards)
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-170
PCI-DDA02/12
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-171
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-172
PCI-DDA02/16
PCI-DDA02/16
The PCI-DDA02/16) is an I/O board with 2 analog output (D/A) channels
(12-bit), and 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DDA06/12
Manufacturer Computer Boards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-173
21 Measurement Computing (Formerly ComputerBoards)
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 - +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
21-174
PCI-DDA02/16
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
21-175
21 Measurement Computing (Formerly ComputerBoards)
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-176
PCI-DDA02/16
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-177
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-178
PCI-DDA04/12
PCI-DDA04/12
The PCI-DDA04/12) is an I/O board with 4 analog output (D/A) channels
(12-bit), and 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DDA04/12
Manufacturer Computer Boards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-179
21 Measurement Computing (Formerly ComputerBoards)
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 - +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
21-180
PCI-DDA04/12
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
21-181
21 Measurement Computing (Formerly ComputerBoards)
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-182
PCI-DDA04/12
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum of 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-183
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-184
PCI-DDA04/16
PCI-DDA04/16
The PCI-DDA04/16) is an I/O board with 4 analog output (D/A) channels
(16-bit), and 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DDA04/16
Manufacturer Computer Boards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-185
21 Measurement Computing (Formerly ComputerBoards)
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 - +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
21-186
PCI-DDA04/16
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
21-187
21 Measurement Computing (Formerly ComputerBoards)
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-188
PCI-DDA04/16
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum of 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-189
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-190
PCI-DDA08/12
PCI-DDA08/12
The PCI-DDA08/12) is an I/O board with 8 analog output (A/D) channels
(16-bit), and 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DDA08/12
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-191
21 Measurement Computing (Formerly ComputerBoards)
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 - +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
21-192
PCI-DDA08/12
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
21-193
21 Measurement Computing (Formerly ComputerBoards)
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-194
PCI-DDA08/12
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-195
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-196
PCI-DDA08/16
PCI-DDA08/16
The PCI-DDA08/16) is an I/O board with 8 analog output (A/D) channels
(12-bit), and 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DDA06/12
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-197
21 Measurement Computing (Formerly ComputerBoards)
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 - +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be placed according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
21-198
PCI-DDA08/16
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
21-199
21 Measurement Computing (Formerly ComputerBoards)
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-200
PCI-DDA08/16
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-201
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-202
PCI-DIO24
PCI-DIO24
The PCI-DIO24 is an I/O board with 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DIO24
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-203
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-204
PCI-DIO24
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-205
21 Measurement Computing (Formerly ComputerBoards)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-206
PCI-DIO24H
PCI-DIO24H
The PCI-DIO24H is an I/O board with 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DIO24H
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-207
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-208
PCI-DIO24H
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-209
21 Measurement Computing (Formerly ComputerBoards)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-210
PCI-DIO48H
PCI-DIO48H
The PCI-DIO48H is an I/O board with 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DIO48H
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-211
21 Measurement Computing (Formerly ComputerBoards)
input lines in any order. The number of elements defines the number of digital
lines used.
For example, to use all of the digital inputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-212
PCI-DIO48H
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
21-213
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-214
PCI-DIO96H
PCI-DIO96H
The PCI-DIO96H is an I/O board with 96 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DIO96H
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-215
21 Measurement Computing (Formerly ComputerBoards)
input lines in any order. The number of elements defines the number of digital
lines used.
For example, to use all of the digital inputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1, 2, 3, or 4. The Chip parameter defines which of
the four 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-216
PCI-DIO96H
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1, 2, 3, or 4. The Chip parameter defines which of
the four 8255 chips is used.
21-217
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-218
PCI-DIO96
PCI-DIO96
The PCI-DIO96 is an I/O board with 96 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DIO96
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-219
21 Measurement Computing (Formerly ComputerBoards)
input lines in any order. The number of elements defines the number of digital
lines used.
For example, to use all of the digital inputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The Port parameter defines which
port of the current 8255 chip is used for this driver block.
Chip — From the list choose 1, 2, 3, or 4. The Chip parameter defines which of
the four 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-220
PCI-DIO96
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The Port parameter defines which
port of the current 8255 chip is used for this driver block.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1, 2, 3, or 4. The Chip parameter defines which of
the four 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-221
21 Measurement Computing (Formerly ComputerBoards)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-222
PCI-PDISO8
PCI-PDISO8
The PCI-PDISO8 is an I/O board with eight inputs and eight relay outputs.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-PDISO8
Manufacturer ComputerBoards
Bus type PCI
Access method Memory mapped
Multiple block instance support Yes
Multiple board support Yes
The input is rectified before being applied to the opto isolator on the input.
With no additional input current limiting resistor, the opto turns on when
V in > 3 volts.
21-223
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Filter vector — This vector controls the 5 ms noise filter. It is the same length
as the channel vector. A value of 1 turns the filter on, and a value of 0 turns the
filter off. If you specify a scalar, this value is applied to all channels.
Port — From the list choose A because this board only has eight channels.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-224
PCI-PDISO8
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Port — From the list choose A because this board only has eight channels.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-225
21 Measurement Computing (Formerly ComputerBoards)
PCI-PDISO16
The PCI-PDISO16 is an I/O board with 16 inputs and 16 relay outputs.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-PDISO16
Manufacturer ComputerBoards
Bus type PCI
Access method Memory mapped
Multiple block instance support Yes
Multiple board support Yes
The input is rectified before being applied to the opto isolator on the input.
With no additional input current limiting resistor, the opto turns on when
V in > 3 volts.
21-226
PCI-PDISO16
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Filter vector — This vector controls the 5 ms noise filter. It is the same length
as the channel vector. A value of 1 turns the filter on, and a value of 0 turns the
filter off. If you specify a scalar, this value is applied to all channels.
Port — From the list choose either A or B. The Port parameter defines which
port is used for this driver block. Each port has a maximum of 8 digital inputs.
More than one block can be connected to the same port, but each channel can
only be referenced by one block at a time.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-227
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A or B. The Port parameter defines which
port is used for this driver block. Each port has a maximum of 8 digital outputs.
More than one output block can be used with the same port, but each output
channel can only be controlled by one block at a time.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-228
PCIM-DAS1602/16
PCIM-DAS1602/16
The PCIM-DAS1602/16 is an I/O board with 16 single or 8 differential analog
input (A/D) channels (16-bit) with a maximum sampling rate of 100kHz, 2
analog output (D/A) channels (16-bit), and 24 digital input and output lines and
3 counters (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target supports only 24 digital I/O lines and does not support the
counters on this board.
Board Characteristics
Board Name PCIM-DAS1602/16
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-229
21 Measurement Computing (Formerly ComputerBoards)
volts Double 1
21-230
PCIM-DAS1602/16
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
21-231
21 Measurement Computing (Formerly ComputerBoards)
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Also the Bipolar/ Unipolar jumpers have to be inserted according to the ranges
used.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-232
PCIM-DAS1602/16
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
21-233
21 Measurement Computing (Formerly ComputerBoards)
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-234
PCIM-DAS1602/16
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The port name defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-235
21 Measurement Computing (Formerly ComputerBoards)
PCIM-DDA06/16
The PCIM-DDA06/16) is an I/O board with 6 analog output (D/A) channels
(16-bit), and 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCIM-DDA06/16
Manufacturer Computer Boards
Bus type PCIM
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
21-236
PCIM-DDA06/16
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
The range settings have to correspond to the DIP switch settings on the board.
Note For xPC Target, set the Simultaneous Transfer jumper to the XFER
setting.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
21-237
21 Measurement Computing (Formerly ComputerBoards)
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-238
PCIM-DDA06/16
For example, to use all of the digital inputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-239
21 Measurement Computing (Formerly ComputerBoards)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum of 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
21-240
PCIM-DDA06/16
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-241
21 Measurement Computing (Formerly ComputerBoards)
PCI-DUAL-AC5
The PCI-DUAL-AC5 is an I/O board with 48 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-DUAL-AC5
Manufacturer ComputerBoards
Bus type compact PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
21-242
PCI-DUAL-AC5
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-243
21 Measurement Computing (Formerly ComputerBoards)
Use a separate driver block for each port. By selecting the digital output driver
block, the port is configured as output.
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has two 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
21-244
PCI-DUAL-AC5
Chip — From the list choose 1 or 2. The Chip parameter defines which of the
two 8255 chips is used.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-245
21 Measurement Computing (Formerly ComputerBoards)
PCI-QUAD04
The PCI-QUAD04 is a 24-bit counting board with 4 channels. This board
typically connects to incremental encoders. Incremental encoders convert
physical motion into electrical pulses that can be used to determine velocity,
direction, and distance.
xPC Target supports this board with this driver block:
• “PCI-QUAD04 Incremental Encoder” on page 21-247
1 If the index signal from an encoder is not being used, connect the index
inputs.
21-246
PCI-QUAD04
Board Characteristics
Board name PCI-QUAD04
Manufacturer ComputerBoards
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
Note If you are using an earlier version of this driver block, see the
description at the end of this section.
21-247
21 Measurement Computing (Formerly ComputerBoards)
Index Polarity — From the list, select the index pulse slope that the board
should detect. Select Positive Index for a positive slope; select Negative
Index for a negative slope.
Counting Mode — From the list, select a counting mode (Normal, Range Limit,
Non-recycle, or Modulo-N). The output of the block depends on both the setting
of Index input resets counter and on the counting mode as described in the
following table.
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Normal Upon model start, the output count is Upon model start, the counter is
initialized to Count Limit or Reset initialized to 0. The counter then
Value. The output count increments or increments or decrements until it
decreases one full revolution from the either overflows or underflows. For a
Count Limit or Reset Value. The rotary encoder, the number of
output count is reset to this value each revolutions is the number of output
time the index is reached. counts divided by the number of
For example, if Index input resets counts per revolution. The resulting
counter is selected, and a rotary integer is the number of revolutions;
encoder has 1024 counts per the fractional part can be converted
revolution, and a Count Limit or to an angle.
Reset Value value of 5000, a full
clockwise revolution of the encoder
increments the counter to 6023, at
which the index is reached. The
counter then resets to 5000.
21-248
PCI-QUAD04
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Range Limit Upon model start, the counter Upon model start, the counter is
increments or decrements until it initialized to 0. In the clockwise
reaches the count limit Count Limit direction, the counter increments
or Reset Value. If the clock motion is until it saturates at Count Limit or
clockwise, the counter stays at Count Reset Value. In the counterclockwise
Limit or Reset Value once it reaches direction, the counter decrements
that value. If the clock motion is until it saturates at 0.
counterclockwise, the counter
decrements one revolution then resets You can use this setting to set a
to Count Limit or Reset Value. repeatable 0 when there is a
mechanical stop. At model start, the
count is initialized to 0. The machine
then shifts to the negative direction
stop. At that point, the encoder
reports 0 at the stop and all other
positions will be positive and
repeatable.
Non-recycle Upon model start, the counter is The behavior of this option is
initialized to Count Limit or Reset undefined.
Value. With counterclockwise rotation,
the counter decrements and saturates
at 0. If the encoder reaches the index
before the counter saturates at 0, the
counter resets to Count Limit or
Reset Value. With clockwise rotation,
the counter increments until the
encoder reaches the index. When the
encoder reaches the index, the counter
resets to Count Limit or Reset Value.
You can use this setting to place 0 at
the first index inside a mechanical
limit.
21-249
21 Measurement Computing (Formerly ComputerBoards)
Counting Index input resets counter Selected Index input resets counter
Mode Deselected
Modulo-N The behavior of this option is Upon model start, the counter is
undefined. initialized to 0. In the clockwise
direction, the counter increments to
Count Limit or Reset Value, then
resets to 0 and repeats. When the
counter decrements, it counts to 0,
then resets to the Count Limit or
Reset Value value and continues to
decrement. You can use this setting
to repeat intervals that do not match
the distance between indexes
(resulting, for example, from gear
ratios).
Count Limit or Reset Value — The preset register (PR) on the counter chip is
a 24-bit quantity. The counter uses this value as a limit for the Range Limit,
Non-recycle, and Modulo-N counting modes.
When Index input resets counter is selected, this value acts as both the initial
value at model start and the value that an index resets the count to.
You can enter negative limit values, but the counter treats them as large
positive values. For example, a limit of -1 results in the Modulo-N range from
0 to 2 24 – 1 , not from -1 to 0.
Count Range — From the list, choose 0...2^24-1 or -2^23...+2^23-1. The
counter uses a 24-bit accumulator which overflows from 2 24 – 1 to 0. This same
overflow can be interpreted as the transition from -1 to 0. Selecting the
unipolar range 0 to 2 24 – 1 puts the discontinuity in counts at 0. Selecting the
bipolar range of ( – 2 ) 23 to 2 23 – 1 puts the discontinuity far away from 0. The
bipolar range is achieved by sign extending the 24-bit count to 32 bits before
converting to double.
21-250
PCI-QUAD04
Count Speed — From the list, choose non-quadrature, 1X, 2X, or 4X:
0xff
Sample time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-251
21 Measurement Computing (Formerly ComputerBoards)
remains 1 unless Counting reset by index is set to Only First, and the
counter detects a rollover. For more information, see “Driver Block
Parameters” on page 21-107.
Turns is the number of complete revolutions made by the encoder. Angle is the
amount the encoder turns since the last full revolution.
The distance is given by:
distance = 2 * pi * Turns + Angle
If you choose Only First, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. The encoder ignores all other times it reaches the index. Init remains
1 until a rollover is detected, and then set to -1. A rollover is when the counter
reaches its maximum value and begins to start counting at zero again. A
rollover can also occur when the counter reaches its minimum value and the
counter resets itself to the maximum value and resumes counting down. The
outputs are still accurate after rollover. The -1 flag is used to alert that a
rollover has occurred.
If you choose Continuous, The first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. Each time the encoder reaches the index, it resets to zero. Init
remains always at l because a rollover cannot occur.
21-252
PCI-QUAD04
0xff
Sample time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
21-253
21 Measurement Computing (Formerly ComputerBoards)
PCI-DAS-TC
The PCI-DAS-TC is an I/O board with 16 differential analog thermocouple
input channels. The thermocouple signals are converted by a high frequency
synchronous V-F A/D converter. The board is equipped with its own
micro-controller responsible for calibration, cold junction compensation,
moving average calculations, conversion, and conversion into physical
engineering units. The on-board micro-controller significantly off loads the
main CPU.
xPC Target supports this board with this driver block:
• “PCI-DAS-TC Thermocouple” on page 21-255
Board Characteristics
Board name PCI-DAS-TC
Manufacturer Computer Boards
Bus type PCI
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
21-254
PCI-DAS-TC
PCI-DAS-TC Thermocouple
Scaling Input to Output
21-255
21 Measurement Computing (Formerly ComputerBoards)
Read and output CJC temperature — If you want the block to read, convert,
and output the temperature of the cold junction (CJC) sensor on the board,
select this check box. If selected, the block shows an additional output port with
the value of the CJC temperature.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Because of this long calibration period during the initialization stage of the
target application, the download procedure can time-out and return an error
message. To avoid this error, increase the default timeout duration. See
“Increasing the Time-Out Value” on page 3-49.
21-256
22
National Instruments
AT-AO-6 (p. 22-4) I/O board with 6 analog output (D/A) channels, and 16
digital I/O lines.
AT-AO-10 (p. 22-6) I/O board with 10 analog output (D/A) channels, and 16
digital I/O lines.
PC-DIO-24 (p. 22-8) I/O board with 24 digital input and output lines.
PC-TIO-10 (p. 22-12) I/O board with 16 digital input and output lines, and 10
counter/timer channels.
PCI-6023E (p. 22-23) I/O board with 16 single or 8 differential analog input
(A/D) channels, 8 digital I/O lines, and 2 counter/timers.
PCI-6024E (p. 22-31) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, 8 digital
input and output lines, and 2 counter/timers.
PCI-6025E (p. 22-40) I/O board with 16 single or 8 differential analog inputs
(A/D) channels, 2 analog output channels, 32 digital input
and output lines, and 2 counter/timers.
PCI-6030E (Formerly I/O board with 16 single or 8 differential analog input
PCI-MIO-16XE-10) (p. 22-49) (A/D) channels, 2 analog output (D/A) channels, 8 digital
input and output lines, and 2 counter/timers.
PCI-6031E (p. 22-59) I/O board with 64 single or 32 differential analog input
(A/D) channels, 2 analog output (D/A) channels, 8 digital
input and output lines, and 2 counter/timers.
PCI-6040E (Formerly PCI-MIO-16E-4) I/O board with 16 single or 8 differential analog input
(p. 22-69) channels, 2 analog output channels, 8 digital input and
output lines, and 2 counter/timers.
22 National Instruments
PCI/PXI-6052E (p. 22-79) I/O board with 16 single or 8 differential analog input
channels, 2 analog output channels and 8 digital input
and output lines.
PCI-6070E (Formerly PCI-MIO-16E-1) I/O board with 16 single or 8 differential analog input
(p. 22-89) channels, 2 analog output channels, 8 digital input and
output lines, and 2 counter/timers.
PCI-6071E (p. 22-99) I/O board with 64 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, 8 digital
input and output lines, and 2 counter/timers.
PCI-6503 (p. 22-109) I/O board with 24 digital input and output lines.
PCI-6527 (p. 22-113) I/O board with 24 filtered digital input lines and 24
digital output lines. You can individually turn input
filtering on or off for each of the 24 input lines.
PCI-6601 (p. 22-117) General purpose counter/timer board. It has four 32-bit
counter channels.
PCI/PXI-6602 (p. 22-125) General purpose counter/timer board. It has eight 32-bit
counter channels.
PCI-6703 (p. 22-134) I/O board with 16 voltage outputs and 8 digital I/O lines.
PCI-6704 (p. 22-136) I/O board with 16 voltage outputs, 16 current outputs,
and 8 digital I/O lines.
PCI-6711 (p. 22-138) I/O board with 8 analog output (D/A) channels and 8
digital input and output lines.
PCI/PXI-6713 (p. 22-143) I/O board with 4 analog output (D/A) channels and 8
digital input and output lines.
PCI-DIO-96 (p. 22-148) I/O board with 96 digital input and output lines.
PXI-6040E (p. 22-152) I/O board with 16 single or 8 differential analog input
channels, 2 analog output channels, 8 digital input and
output lines, and 2 counter/timers.
PXI-6070E (p. 22-162) I/O board with 16 single or 8 differential analog input
channels, 2 analog output channels, 8 digital input and
output lines, and 2 counter/timers.
22-2
PXI-6071E (p. 22-171) I/O board with 64 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, 8 digital
input and output lines, and 2 counter/timers.
PXI-6508 (p. 22-181) I/O board with 96 digital input and output lines.
PXI-6527 (p. 22-185) I/O board with 24 filtered digital input lines and 24
digital output lines. You can individually turn input
filtering on or off for each of the 24 input lines.
PXI-6704 (p. 22-189) I/O board with 16 voltage outputs, 16 current outputs,
and 8 digital I/O lines.
22-3
22 National Instruments
AT-AO-6
The AT-AO-6 is an I/O board with 6 analog output (D/A) channels (12-bit), and
16 digital I/O lines.
xPC Target supports this board with this driver block:
Board Characteristics
Board name AT-AO-6
Manufacturer National Instruments
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
22-4
AT-AO-6
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 10 volts, enter
[-10,10]
The range settings have to correspond to the jumper settings on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
22-5
22 National Instruments
AT-AO-10
The AT-AO-10 is an I/O board with 10 analog output (D/A) channels (12-bit),
and 16 digital I/O lines.
xPC Target supports this board with this driver block:
Board Characteristics
Board name AT-AO-10
Manufacturer National Instruments
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
22-6
AT-AO-10
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 10volts, enter
[-10,10]
The range settings have to correspond to the jumper settings on the board.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
22-7
22 National Instruments
PC-DIO-24
The PC-DIO-24 is an I/O board with 24 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PC-DIO-24
Manufacturer National Instruments
Bus type ISA
Access method I/O-mapped
Multiple block instance support Yes
Multiple board support Yes
22-8
PC-DIO-24
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-9
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-10
PC-DIO-24
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-11
22 National Instruments
PC-TIO-10
The PC-TIO-10 is an I/O board with 16 digital input and output lines, and 10
counter/timer channels (16-bit).
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name PC-TIO10
Manufacturer National Instruments
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
22-12
PC-TIO-10
22-13
22 National Instruments
22-14
PC-TIO-10
TTL Double 0 to 1
Relative output frequency — Enter a value less than 1. The Relative output
frequency is multiplied by the Frequency base to set the fixed output
frequency of the PWM-signal.
For example, if the output frequency of a square wave has to be 17.5 kHz, then
choose F2=100kHz as the Frequency base and enter 0.175 as the Relative
output frequency. 100kHz x 0.175 = 17.5 kHz
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
22-15
22 National Instruments
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-16
PC-TIO-10
Relative output frequency — Enter a value less than 1. The Relative output
frequency is multiplied by the Frequency base to set the fixed output
frequency of the PWM-signal.
For example, if the output frequency of a square wave has to be 17.5 kHz, then
choose F2=100kHz as the Frequency base and enter 0.175 as the Relative
output frequency. 100kHz x 0.175 = 17.5 kHz
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
PC-TIO-10 Counter FM
The PC-TIO-10 has two AM9513A chips each with 5 counters for a total of 10
counters on the board.
22-17
22 National Instruments
TTL Double 0 to 1
Output duty Cycle — Enter a value between 0 and 1 to set the duty cycle of
the square wave. The Duty Cycle is held fixed during execution of the target
application.
Note Your control over the output duty cycle is not always precise. See “PWM
and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
22-18
PC-TIO-10
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-19
22 National Instruments
Output duty Cycle — Enter a value between 0 and 1 to set the duty cycle of
the square wave. The Duty Cycle is held fixed during execution of the target
application.
Note Your control over the output duty cycle is not always precise. See “PWM
and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the Output duty cycle defined in the setting above define the
duration of the TTL high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed. If a value 1 is asserted, the counter gets armed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-20
PC-TIO-10
TTL Double 0 to 1
22-21
22 National Instruments
PC-TIO10 FM Capture
This block programs the AMD9513A for capturing FM signals.
There is one output for relative frequency compared to the base frequency. To
get the actual frequency, multiply the base frequency by the relative frequency.
The FM signal has to enter the pin named GATE of the corresponding counter
channel. The CLK pin has to be left unconnected.
TTL Double 0 to 1
PC-TIO-10xx
You can use this block to program the AMD9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and FM Capture blocks use this block
in their underlying subsystems. The API for this block is not currently
documented.
22-22
PCI-6023E
PCI-6023E
The PCI-6023E is an I/O board with 16 single or 8 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 200 kHz, 8 digital I/O
lines, and 2 counter/timers (24-bit) with a maximum source clock rate of 20
MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-6023E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, Digital I/O: Yes;
Period/Pulsewidth Measurement: Yes;
Pulsetrain Generation: No.
Multiple board support Yes
22-23
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
22-24
PCI-6023E
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-25
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-26
PCI-6023E
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
22-27
22 National Instruments
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-28
PCI-6023E
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-29
22 National Instruments
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-30
PCI-6024E
PCI-6024E
The PCI-6024E is an I/O board with 16 single or 8 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 200 kHz, 2 analog
output (D/A) channels (12-bit), 8 digital input and output lines, and 2
counter/timers (24-bit) with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-6024E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-31
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
22-32
PCI-6024E
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-33
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
22-34
PCI-6024E
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-35
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
22-36
PCI-6024E
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-37
22 National Instruments
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-38
PCI-6024E
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-39
22 National Instruments
PCI-6025E
The PCI-6025E is an I/O board with 16 single or 8 differential analog inputs
(A/D) channels (12-bit) with a maximum sample rate of 200 kHz, 2 analog
output channels (12-bit), 32 digital input and output lines, and 2
counter/timers (24-bit) with a maximum source clock rate of 20 MHz.
The PCI-6025E provides 8 digital input and output lines, the PCI-6025E 8255
provides an additional 24 digital input and output lines.
xPC Target supports this board with these driver blocks:
• “PCI-6025E Analog Input (A/D)” on page 22-41
• “PCI-6025E Analog Output (D/A)” on page 22-43
• “PCI-6025E and PCI-6025E 8255 Digital Input” on page 22-44
• “PCI-6025E Digital Output” on page 22-45
• “PCI-6025E Pulse Generation” on page 22-46
• “PCI-6025E Pulse Width/Period Measurement” on page 22-47
Board Characteristics
Board name PCI-6025E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-40
PCI-6025E
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
22-41
22 National Instruments
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-42
PCI-6025E
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
22-43
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — (PCI-6025E 8255) From the list choose either A, B, or C. The I/O board
has an 82C55A chip with 3 ports. The port name defines which port of the
82C55A chip is used for this driver block. Each port has a maximum of 8 digital
lines that can be configured as inputs. The PCI-6025E provides 8 digital input
lines, the PCI-6025E 8255 provides an additional 24 digital input lines,
22-44
PCI-6025E
distributed across the ports A, B, and C. In each case, one block is needed for
each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
22-45
22 National Instruments
Port — (PCI-6025E 8255) From the list choose either A, B, or C. The I/O board
has an 82C55A chip with 3 ports. The port name defines which port of the
82C55A chip is used for this driver block. Each port has a maximum of 8 digital
lines that can be configured as inputs. The PCI-6025E provides 8 digital input
lines, the PCI-6025E 8255 provides an additional 24 digital input lines,
distributed across the ports A, B, and C. In each case, one block is needed for
each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-46
PCI-6025E
a high level. For example, to generate a pulsetrain at 1KHz with 25% low and
75% high, use the vector
[5000 15000]
22-47
22 National Instruments
this table, the data in the Output column resulted from a 1KHz pulse train
with a 25% low and a 75% high pulse.
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-48
PCI-6030E (Formerly PCI-MIO-16XE-10)
Board Characteristics
Board name PCI-6030E
Manufacturer National Instruments
Bus type PCI
Access method I/O mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-49
22 National Instruments
volts Double 1
Number the channels beginning with 1, even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
22-50
PCI-6030E (Formerly PCI-MIO-16XE-10)
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
22-51
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels begin with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-52
PCI-6030E (Formerly PCI-MIO-16XE-10)
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 10volts, enter
[-10,10]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-53
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-54
PCI-6030E (Formerly PCI-MIO-16XE-10)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-55
22 National Instruments
22-56
PCI-6030E (Formerly PCI-MIO-16XE-10)
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-57
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-58
PCI-6031E
PCI-6031E
The PCI-6031E is an I/O board with 64 single or 32 differential analog input
(A/D) channels (16-bit) with a maximum sample rate of 100 kHz, 2 analog
output (D/A) channels (16-bit), 8 digital input and output lines, and 2
counter/timers (24-bit) with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-6031E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-59
22 National Instruments
volts Double 1
Number the channels beginning with 1, even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
22-60
PCI-6031E
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
22-61
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels begin with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-62
PCI-6031E
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 10volts, enter
[-10,10]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-63
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-64
PCI-6031E
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-65
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-66
PCI-6031E
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-67
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-68
PCI-6040E (Formerly PCI-MIO-16E-4)
Board Characteristics
Board name PCI-6040E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-69
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
22-70
PCI-6040E (Formerly PCI-MIO-16E-4)
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
22-71
22 National Instruments
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-72
PCI-6040E (Formerly PCI-MIO-16E-4)
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-73
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-74
PCI-6040E (Formerly PCI-MIO-16E-4)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-75
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-76
PCI-6040E (Formerly PCI-MIO-16E-4)
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-77
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-78
PCI/PXI-6052E
PCI/PXI-6052E
The PXI/PCI-6052E is an I/O board with 16 single or 8 differential analog input
channels (16-bit) with a maximum sample rate of 333 kHz, 2 analog output
channels (16-bit) and 8 digital input and output lines, and two counters/timers
(24-bit) with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PXI/PCI-6052E
Manufacturer National Instruments
Bus type PCI/PXI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-79
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
22-80
PCI/PXI-6052E
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
22-81
22 National Instruments
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels begin with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-82
PCI/PXI-6052E
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-83
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-84
PCI/PXI-6052E
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-85
22 National Instruments
22-86
PCI/PXI-6052E
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-87
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-88
PCI-6070E (Formerly PCI-MIO-16E-1)
Board Characteristics
Board name PCI-6070E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-89
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
22-90
PCI-6070E (Formerly PCI-MIO-16E-1)
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
22-91
22 National Instruments
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-92
PCI-6070E (Formerly PCI-MIO-16E-1)
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-93
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-94
PCI-6070E (Formerly PCI-MIO-16E-1)
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-95
22 National Instruments
22-96
PCI-6070E (Formerly PCI-MIO-16E-1)
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-97
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-98
PCI-6071E
PCI-6071E
The PCI-6071E is an I/O board with 64 single or 32 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 1.25 MHz, 2 analog
output (D/A) channels (12-bit), 8 digital input and output lines, and 2
counter/timers (24-bit) with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name PCI-6071E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-99
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
-2 to +2 -2 0 to +2 2
-1 to + 1 -1 0 to +1 1
22-100
PCI-6071E
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
22-101
22 National Instruments
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-102
PCI-6071E
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-103
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-104
PCI-6071E
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-105
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-106
PCI-6071E
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-107
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-108
PCI-6503
PCI-6503
The PCI-6503 is an I/O board with 24 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-6503
Manufacturer National Instruments
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
22-109
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-110
PCI-6503
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-111
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-112
PCI-6527
PCI-6527
The PCI-6527 is an I/O board with 24 filtered digital input lines and 24 digital
output lines. You can individually turn input filtering on or off for each of the
24 input lines. However, there is only one filter time of all of the input lines that
have filtering enabled.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-6527
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support Digital I/O: Yes
Multiple board support Yes
22-113
22 National Instruments
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The Port parameter defines which
port is used for this driver block. Each port has a maximum of 8 digital inputs.
In each case, one block is needed for each port.
The documentation for this board from National Instruments labels these ports
0, 1, and 2.
Filter vector — This is a Boolean vector that selects which input lines to filter.
For example, if you enter a Channel vector of [1,3,5], and you want to filter
all three lines, enter
[1,1,1]
If you want to filter lines 1 and 5, but not line 3, then enter
[1,0,1]
If the filter vector is a single element, then it is scaler expanded to the same
width as the Channel vector. In the example above, if the Filter vector is [0],
it is expanded to [0,0,0]. Likewise, if the Filter vector is [1]it is expanded to
[1,1,1].
Filter interval — Enter the time interval the hardware filter uses to
determine a stable pulse. If the input pule is shorter then this interval, it is
ignored. There is only one filter interval for all filtered inputs, and if you filter
on more than one digital input block for this board, you must enter the same
Filter interval for all blocks.
A reasonable value for the Filter interval would be 200 to 300 us.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-114
PCI-6527
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
22-115
22 National Instruments
Port — From the list choose either A, B, or C. The Port parameter defines which
port is used for this driver block. Each port has a maximum or 8 digital output
lines. In each case, one block is needed for each port.
The documentation for this board from National Instruments labels these ports
3, 4, and 5.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-116
PCI-6601
PCI-6601
The National Instruments PCI-6601 is a general purpose counter/timer board.
It has four 32-bit counter channels. The reference frequency for this board is 20
MHz.
xPC Target supports this board with the following driver blocks:
xPC Target does not support the interrupt or timer functionality of the board.
Board Characteristics
Board name PCI-6601
Manufacturer National Instruments
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
22-117
22 National Instruments
Number the lines beginning with 1 even though the board manufacturer starts
numbering the ports with 0.
Note Treat the eight I/O ports as two groups of four ports. The two groups
are ports 1 to 4 and ports 5 to 8. Do not specify both input and output channels
in the same group of four ports. The driver will emit an error.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
Number the lines beginning with 1 even though the board manufacturer starts
numbering the ports with 0.
22-118
PCI-6601
Note Treat the eight I/O ports as two groups of four ports. The two groups
are ports 1 to 4 and ports 5 to 8. Do not specify both input and output channels
in the same group of four ports. The driver will emit an error.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, and the Channel parameter is longer, that
setting is used for all channels. If you specify a value of 1, the corresponding
channel is reset to the value specified in the initial value vector. If you specify
a value of 0, the channel remains at the last value attained while the model was
running.
For example, if the block parameters are set as follows:
• Channel — [5 6 7 8]
• Reset vector — [1 1 0 0]
• Initial value vector — [ 1 0 1 0]
Channels 5 and 6 will reset to the initial value vector. Channels 7 and 8 will
hold at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
When execution stops, the driver writes the vector values to the output
channels if the corresponding entry in the Reset vector is set to 1.
For example, if the block parameters are set as follows:
• Channel — [5 6 7 8]
• Reset vector — [1 1 0 0]
• Initial value vector — [ 1 0 1 0]
22-119
22 National Instruments
After the target application executes, then stops, channel 5 will be set back to
1 and channel 6 will be set to 0. Channels 7 and 8 will hold the last values
attained.
Sample time — The usual sampletime in seconds. Can be a MATLAB variable.
PCI slot — The usual slot number as used by all PCI board drivers.
Counting mode — From the list, select a counting mode. Choose one of the
following:
• Normal
• Quadrature Mode X1
• Quadrature Mode X2
• Quadrature Mode X4
• Two-pulse mode
• Synchronous Source Mode
Initial count — The initial count specifies the initial value for the counter.
Enter a nonnegative integer.
Reload at index pulse — Select this check box to have the count value reset to
the value of Initial count at each index pulse.
Index phase — If the Reload at index pulse check box is selected, the Index
phase parameter specifies the phase of the quadrature signals during which
the count will be reloaded with the initial count. The count is reloaded in
response to a channel index pulse. From the list, select one of the following:
22-120
PCI-6601
• A low B low
• A low B high
• A high B low
• A high B high
Filter — You can apply a digital debouncing filter to the input pins prior to
processing. From the list, select one of the following filter types:
• None
• Synchronize input to Timebase 3 (20 MHz)
• Minimum pulse width 5 microsec
• Minimum pulse width 1 microsec
• Minimum pulse width 500 nanosec
• Minimum pulse width 100 nanosec
• Minimum pulse width 25 nanosec
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in your target
PC, enter
-1
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
•1
22-121
22 National Instruments
•2
•3
•4
These parameters specify the counter(s) to be used with this driver block. In
each case, one block is needed for each port.
The reference frequency for this board is 20 MHz.
Initial high count — Enter the number of clock ticks the counter should
maintain for a high level.
Initial low count — Enter the number of clock ticks the counter should
maintain at a low level.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
•1
•2
•3
•4
22-122
PCI-6601
These parameters specify the counter(s) to be used with this driver block. In
each case, one block is needed for each port.
Trigger mode — From the list, choose Level Triggered or Edge Triggered.
See the table below for an example of how Trigger mode and Polarity affect
one another. In this table, the data in the Output column resulted from a 1KHz
pulse train with a 25% low and a 75% high pulse.
Polarity — From the list, choose Active low or Active high. See the table
below for an example of how Trigger mode and Polarity affect one another. In
this table, the data in the Output column resulted from a 1KHz pulse train
with a 25% low and a 75% high pulse.
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-123
22 National Instruments
getxpcpci
•1
•2
•3
•4
These parameters specify the counter to be used with this driver block. In each
case, one block is needed for each port.
The reference frequency for this board is 20 MHz.
Initial high count — Enter the number of clock ticks the counter should
maintain for a high level.
Initial low count — Enter the number of clock ticks the counter should
maintain at a low level.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-124
PCI/PXI-6602
PCI/PXI-6602
The National Instruments PCI/PXI-6602 is a general purpose counter/timer
board. It has eight 32-bit counter channels. The reference frequency for this
board is 80 MHz.
xPC Target supports this board with the following driver block:
• “PCI/PXI-6602 Digital Input” on page 22-125
• “PCI/PXI-6602 Digital Output” on page 22-126
• “PCI/PXI-6602 Incremental Encoder” on page 22-128
• “PCI/PXI-6602 Pulse Generation” on page 22-129
• “PCI/PXI-6602 Pulse Width/Period Measurement” on page 22-130
• “PCI/PXI-6602 Armed Pulse Generation” on page 22-132
xPC Target does not support the interrupt or timer functionality of the board.
Board Characteristics
Board name PCI/PXI-6602
Manufacturer National Instruments
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
22-125
22 National Instruments
Number the lines beginning with 1 even though the board manufacturer starts
numbering the ports with 0.
Note Treat the eight I/O ports as two groups of four ports. The two groups
are ports 1 to 4 and ports 5 to 8. Do not specify both input and output channels
in the same group of four ports. The driver will emit an error.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
Number the lines beginning with 1 even though the board manufacturer starts
numbering the ports with 0.
22-126
PCI/PXI-6602
Note Treat the eight I/O ports as two groups of four ports. The two groups
are ports 1 to 4 and ports 5 to 8. Do not specify both input and output channels
in the same group of four ports. The driver will emit an error.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, and the Channel parameter is longer, that
setting is used for all channels. If you specify a value of 1, the corresponding
channel is reset to the value specified in the initial value vector. If you specify
a value of 0, the channel remains at the last value attained while the model was
running.
For example, if the block parameters are set as follows:
• Channel — [5 6 7 8]
• Reset vector — [1 1 0 0]
• Initial value vector — [ 1 0 1 0]
Channels 5 and 6 will reset to the initial value vector. Channels 7 and 8 will
hold at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
When execution stops, the driver writes the vector values to the output
channels if the corresponding entry in the Reset vector is set to 1.
For example, if the block parameters are set as follows:
• Channel — [5 6 7 8]
• Reset vector — [1 1 0 0]
• Initial value vector — [ 1 0 1 0]
22-127
22 National Instruments
After the target application executes, then stops, channel 5 will be set back to
1 and channel 6 will be set to 0. Channels 7 and 8 will hold the last values
attained.
Sample time — The usual sampletime in seconds. Can be a Matlab variable.
PCI slot — The usual slot number as used by all PCI board drivers.
Counting mode — From the list, select a counting mode. Choose one of the
following:
• Normal
• Quadrature Mode X1
• Quadrature Mode X2
• Quadrature Mode X4
• Two-pulse mode
• Synchronous Source Mode
Initial count — The initial count specifies the initial value for the counter.
Enter a nonnegative integer.
Reload at index pulse — Select this check box to have the count value reset to
the value of Initial count at each index pulse.
Index phase — If the Reload at index pulse check box is selected, the Index
phase parameter specifies the phase of the quadrature signals during which
the count will be reloaded with the initial count. The count is reloaded in
response to a channel index pulse. From the list, select one of the following:
22-128
PCI/PXI-6602
• A low B low
• A low B high
• A high B low
• A high B high
Filter — You can apply a digital debouncing filter to the input pins prior to
processing. From the list, select one of the following filter types:
• None
• Synchronize input to Timebase 3 (80 MHz)
• Minimum pulse width 5 microsec
• Minimum pulse width 1 microsec
• Minimum pulse width 500 nanosec
• Minimum pulse width 100 nanosec
• Minimum pulse width 25 nanosec
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in your target
PC, enter
-1
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
•1
22-129
22 National Instruments
•2
•3
•4
•5
•6
•7
•8
These parameters specify the counter(s) to be used with this driver block. In
each case, one block is needed for each port.
The reference frequency for this board is 80 MHz.
Initial high count — Enter the number of clock ticks the counter should
maintain for a high level.
Initial low count — Enter the number of clock ticks the counter should
maintain at a low level.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
•1
•2
22-130
PCI/PXI-6602
•3
•4
•5
•6
•7
•8
These parameters specify the counter(s) to be used with this driver block. In
each case, one block is needed for each port.
Trigger mode — From the list, choose Level Triggered or Edge Triggered.
See the table below for an example of how Trigger mode and Polarity affect
one another. In this table, the data in the Output column resulted from a 1KHz
pulse train with a 25% low and a 75% high pulse.
Polarity — From the list, choose Active low or Active high. See the table
below for an example of how Trigger mode and Polarity affect one another. In
this table, the data in the Output column resulted from a 1KHz pulse train
with a 25% low and a 75% high pulse.
In every case, the output of the block is the number of clock ticks (of the 80MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Filter — From the list, choose one of the following:
• None
• Synchronize input to Timebase 3 (80MHz)
22-131
22 National Instruments
This parameter specifies the level of digital filtering you want to apply to the
pin. See the National Instruments PCI/PXI-6602 user manual documentation
for details.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
•1
•2
•3
•4
•5
22-132
PCI/PXI-6602
•6
•7
•8
These parameters specify the counter to be used with this driver block. In each
case, one block is needed for each port.
The reference frequency for this board is 80 MHz.
Initial high count — Enter the number of clock ticks the counter should
maintain for a high level.
Initial low count — Enter the number of clock ticks the counter should
maintain at a low level.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-133
22 National Instruments
PCI-6703
The PCI-6703 is an I/O board with 16 voltage outputs and 8 digital I/O lines.
xPC Target supports this board with this driver block:
• “PCI-6703 Analog Output (D/A)” on page 22-134
Board Characteristics
Board name PCI-6703
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Sample time — Base sample time or a multiple of the base sample time.
22-134
PCI-6703
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-135
22 National Instruments
PCI-6704
The PCI-6704 is an I/O board with 16 voltage outputs, 16 current outputs, and
8 digital I/O lines.
xPC Target supports this board with this driver block:
• “PCI-6704 Analog Output (D/A)” on page 22-136
Board Characteristics
Board name PCI-6704
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
22-136
PCI-6704
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-137
22 National Instruments
PCI-6711
The PCI-6711 is an analog output board with 4 analog output (D/A) channels
(12-bit) and 8 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-6711
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support D/A: No, Digital I/O: Yes
Multiple board support Yes
volts Double 1
22-138
PCI-6711
Number the channels beginning with 1 even though the board manufacturer
starts numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-139
22 National Instruments
Each line can be used for input or output. If a line is not listed in this field, a
digital output block using the same board can use that line.
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-140
PCI-6711
Each line can be used for input or output. If a line is not listed in this field, a
digital input block using the same board can use that line.
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-141
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-142
PCI/PXI-6713
PCI/PXI-6713
The PCI/PXI-6713 is an analog output board with 8 analog output (D/A)
channels (12-bit) and 8 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI/PXI-6713
Manufacturer National Instruments
Bus type PCI/PXI
Access method Memory mapped
Multiple block instance support D/A: No, Digital I/O: Yes
Multiple board support Yes
volts Double 1
22-143
22 National Instruments
Number the channels beginning with 1 even though the board manufacturer
starts numbering the channels with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-144
PCI/PXI-6713
Each line can be used for input or output. If a line is not listed in this field, a
digital output block using the same board can use that line.
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-145
22 National Instruments
Each line can be used for input or output. If a line is not listed in this field, a
digital input block using the same board can use that line.
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-146
PCI/PXI-6713
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-147
22 National Instruments
PCI-DIO-96
The PC-DIO-96 is an I/O board with 96 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PC-DIO-96
Manufacturer National Instruments
Bus type PCI
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
22-148
PCI-DIO-96
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has four 8255 chips
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1, 2, 3, or 4.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-149
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1, 2, 3, or 4.
22-150
PCI-DIO-96
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
22-151
22 National Instruments
PXI-6040E
The PXI-6040E is an I/O board with 16 single or 8 differential analog input
channels (12-bit) with a maximum sample rate of 500 kHz, 2 analog output
channels (12-bit), 8 digital input and output lines, and 2 counter/timers (24-bit)
with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PXI-6040E
Manufacturer National Instruments
Bus type PXI (Compact PCI)
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-152
PXI-6040E
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
22-153
22 National Instruments
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
22-154
PXI-6040E
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-155
22 National Instruments
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-156
PXI-6040E
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-157
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-158
PXI-6040E
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-159
22 National Instruments
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-160
PXI-6040E
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-161
22 National Instruments
PXI-6070E
The PXI-6070E is an I/O board with 16 single or 8 differential analog input
channels (12-bit) with a maximum sample rate of 1.25 MHz, 2 analog output
channels (12-bit), 8 digital input and output lines, and 2 counter/timers (24-bit)
with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PXI-6070E
Manufacturer National Instruments
Bus type PXI (Compact PCI)
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
volts Double 1
22-162
PXI-6070E
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
-5 to +5 -5 0-5 5
-2 to +2 -2 0-2 2
-1 to + 1 -1 0-1 1
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
22-163
22 National Instruments
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-164
PXI-6070E
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
22-165
22 National Instruments
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-166
PXI-6070E
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-167
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-168
PXI-6070E
22-169
22 National Instruments
Polarity — From the list, choose Active low or Active high. See the table
below for an example of how Trigger mode and Polarity affect one another. In
this table, the data in the Output column resulted from a 1KHz pulse train
with a 25% low and a 75% high pulse.
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-170
PXI-6071E
PXI-6071E
The PXI-6071E is an I/O board with 64 single or 32 differential analog input
(A/D) channels (12-bit) with a maximum sample rate of 1.25 MHz, 2 analog
output (D/A) channels (12-bit), 8 digital input and output lines, and 2
counter/timers (24-bit) with a maximum source clock rate of 20 MHz.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name PXI-6071E
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support A/D: No, D/A: No, Digital I/O: Yes;
Period/Pulsewidth measurement: Yes;
Pulsetrain Generation: No
Multiple board support Yes
22-171
22 National Instruments
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
-2 to +2 -2 0 to +2 2
-1 to + 1 -1 0 to +1 1
22-172
PXI-6071E
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +1 volts, enter
[-10,1,1]
Input coupling vector — Enter a coupling code for each of the channels in the
channel vector. The coupling vector must be the same length as the channel
vector. This driver allows a different coupling for each channel.
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are single input and the fifth
channel is a differential input, enter
[0,0,2]
22-173
22 National Instruments
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Model base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
22-174
PXI-6071E
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-175
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-176
PXI-6071E
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-177
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-178
PXI-6071E
In every case, the output of the block is the number of clock ticks (of the 20MHz
source clock) required for the specified measurement. When measuring pulse
width, the output reflects the number of clock ticks for which the input signal
was in the specified (low or high) state. See the table above for an example.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-179
22 National Instruments
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
22-180
PXI-6508
PXI-6508
The PXI-6508 is an I/O board with 96 digital input and output lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PXI-6508
Manufacturer National Instruments
Bus type PXI (Compact PCI)
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
22-181
22 National Instruments
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip
with 3 ports. The Port parameter defines which port of the 8255 chip is used
for this driver block. Each port has a maximum or 8 digital lines that can be
configured as inputs or outputs depending on which driver block is chosen. In
each case, one block is needed for each port.
Chip — From the list choose 1, 2, 3, or 4.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-182
PXI-6508
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The I/O board has a 8255 chip with
3 ports. The Port parameter defines which port of the 8255 chip is used for this
driver block. Each port has a maximum or 8 digital lines that can be configured
as inputs or outputs depending on which driver block is chosen. In each case,
one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Chip — From the list choose 1, 2, 3, or 4.
Sample time - Enter a base sample time or a multiple of the base sample time.
22-183
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-184
PXI-6527
PXI-6527
The PXI-6527 is an I/O board with 24 filtered digital input lines and 24 digital
output lines. You can individually turn input filtering on or off for each of the
24 input lines. However, there is only one filter time of all of the input lines that
have filtering enabled.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PXI-6527
Manufacturer National Instruments
Bus type PXI
Access method Memory mapped
Multiple block instance support Digital I/O: Yes
Multiple board support Yes
22-185
22 National Instruments
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The Port parameter defines which
port is used for this driver block. Each port has a maximum of 8 digital inputs.
In each case, one block is needed for each port.
The documentation for this board from National Instruments labels these ports
0, 1, and 2.
Filter vector — This is a Boolean vector that selects which input lines to filter.
For example, if you enter a Channel vector of [1,3,5], and you want to filter
all three lines, enter
[1,1,1]
If you want to filter lines 1 and 5, but not line 3, then enter
[1,0,1]
If the filter vector is a single element, then it is scaler expanded to the same
width as the Channel vector. In the example above, if the Filter vector is [0],
it is expanded to [0,0,0]. Likewise, if the Filter vector is [1]it is expanded to
[1,1,1].
Filter interval — Enter the time interval the hardware filter uses to
determine a stable pulse. If the input pule is shorter then this interval, it is
ignored. There is only one filter interval for all filtered inputs, and if you filter
on more than one digital input block for this board, you must enter the same
Filter interval for all blocks.
A reasonable value for the Filter interval would be 200 to 300 us.
Sample time — Enter a base sample time or a multiple of the base sample
time.
22-186
PXI-6527
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Number the lines beginning with 1 even though the board manufacturer starts
numbering the lines with 0.
22-187
22 National Instruments
Port — From the list choose either A, B, or C. The Port parameter defines which
port is used for this driver block. Each port has a maximum or 8 digital output
lines. In each case, one block is needed for each port.
The documentation for this board from National Instruments labels these ports
3, 4, and 5.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-188
PXI-6704
PXI-6704
The PXI-6704 is an I/O board with 16 voltage outputs, 16 current outputs, and
8 digital I/O lines.
xPC Target supports this board with this driver block:
• “PXI-6704 Analog Output (D/A)” on page 22-189
Board Characteristics
Board name PXI-6704
Manufacturer National Instruments
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Sample time — Base sample time or a multiple of the base sample time.
22-189
22 National Instruments
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
22-190
23
North Atlantic Industries,
Inc. (Formerly Apex)
This chapter describes the North Atlantic Industries, Inc. (NAII) I/O boards supported by xPC Target
(http://www.naii.com).
PC-12SD (PC-77SD1) (p. 23-2) I/O board with up to 12 input channels for positioning
sensors of type Synchro or Resolver.
NAII (Apex) 73LD3 (p. 23-5) I/O board with up to 6 input channels for LVDT/RVDT
position sensors. The capabilities of this board vary
according to its part number designation.
NAII (Apex) 73SD3 (p. 23-8) I/O board with up to six Synchro/Resolver-to-digital
channels. The capabilities of this board vary according to
its part number designation.
NAII (Apex) 76LD1 (p. 23-12) I/O board with up to 12 2-wire or up to six 3-wire or
4-wire stimulus (output) channels for LVDT/RVDT
position sensors.
NAII (Apex) 76CL1 (p. 23-15) I/O board with up to eight 2-wire or up to four 3-wire or
4-wire LVDT/RVDT measurement (input) channels for
LVDT/RVDT position sensors.
NAII (Apex) 76CS1 (p. 23-21) I/O board with up to 8 synchro/resolver measurement
(input, S/D) channels and up to six stimulus (output, D/S)
channels for positioning sensors of type Synchro or
Resolver.
23 North Atlantic Industries, Inc. (Formerly Apex)
PC-12SD (PC-77SD1)
The PC-12SD is an I/O board with up to 12 input channels for positioning
sensors of type Synchro or Resolver. The manufacturer individually programs
the board according to the order code or board code. Values for some of the block
parameters with this driver depend on this board code.
xPC Target supports this board with this driver:
• “PC-12SD (PC-77SD1) Synchro/Resolver” on page 23-2
Board Characteristics
Board name PC-12SD
Manufacturer Apex (NAA)
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
23-2
PC-12SD (PC-77SD1)
• Angle — The signal width is 1. This scalar is the angular position in radians.
• Angle - Status — The signal width is 2. The first element is the angular
position, and the second element is the status.
• Angle - Velocity — The signal width is 2. The first element is the angular
position, and the second element is the angular velocity. The unit for the
angular velocity is revolutions/second (rps).
• Angle - Velocity - Status —The signal width is 3. The first element is the
angular position, the second element the angular velocity, and the third
element is the status.
The status signal returns information about test status, signal status and
reference status for each S/D channel. Each status returns binary information
(0 is OK, 1 is FAILURE). The test status has weight 20, signal status has
weight 21, and the reference status has weight 22.
For example, a status value of 5, means the test status is OK and both signal
status and reference status are FAILURE.
23-3
23 North Atlantic Industries, Inc. (Formerly Apex)
23-4
NAII (Apex) 73LD3
xPC Target does not support the digital I/O functionality of this board.
Board Characteristics
Board name 73LD3
Manufacturer Apex
Bus type ISA
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
23-5
23 North Atlantic Industries, Inc. (Formerly Apex)
The channel numbers can occur in any order. Number them beginning with 1
even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number can be 2, 4, or 6 depending on the board
type.
Signal scale vector — For 2 wire applications, enter the transformation ratio
so that the full range of motion results in a full scale output signal from -32768
through 32767. For 3 or 4 wire applications, a setting of 65535 results in a full
scale output signal. This scale factor can be chosen for each channel
independently. If a scalar value is entered, it is applied to all channels.
Velocity scale vector — Enter the velocity (strokes/s or rev/s) that results in
an output signal equal to 32767, the maximum 16-bit integer. This scale factor
can be chosen for each channel independently. If a scalar value is entered, it is
applied to all channels.
Show input ports for dynamic velocity scaling — Select this check box if you
want to be able to update the velocity scale vector at run-time. If this check box
is selected, the block displays one input port for each output channel selected.
These input ports are all of width 1 and can be used to update the velocity scale
vector dynamically. Even if you select this check box and provide values to the
input ports, you still must enter a velocity scale vector to specify the initial
values.
Output format — From the list select an output format for all channels:
23-6
NAII (Apex) 73LD3
• The position and velocity values are each normalized to lie between -1 and 1.
• Position and velocity are returned in radians and radians per second,
respectively.
• The status value is encoded in a 3-bit integer that is returned as a double.
The status value consists of the following status information for the channel:
23-7
23 North Atlantic Industries, Inc. (Formerly Apex)
Board Characteristics
Board name 73SD3
Manufacturer NAII
Bus type ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
23-8
NAII (Apex) 73SD3
The channel numbers can occur in any order. The maximum allowable channel
number can be 2, 4, or 6 depending on the board type.
Two-speed ratio vector (1: single speed; greater than 1: two-speed) — Enter
a two-speed ratio vector of integers greater than 0. This must be either a scalar
or a vector the same length as the channel vector.
The two-speed ratio is normally 1 unless you are using a contiguous odd-even
channel pair (such as 3 and 4) as a single two-speed channel. In this case, the
two-speed ratio represents the gear ratio between the odd (coarse) and even
(fine) channels of the pair. Include only the even member of a two-speed
channel pair in the channel vector. For example, if you want to use channels 3
and 4 as a two-speed channel geared in the ratio of 36:1, perform the following:
• Add the value 4 (but not the value 3) to the Channel vector value
• Set the corresponding Two-speed ratio vector value to 36
High resolution vector (0: 16-bit; 1:24-bit) — Enter a high resolution vector
for the channels. This must be a scalar or a vector the same length as the
Channel vector value. Enter one of the following values:
23-9
23 North Atlantic Industries, Inc. (Formerly Apex)
Note, you can specify high resolution only for the even-numbered channels of a
two-speed channel pair. Specifying high resolution incurs a small additional
overhead.
Encoder vector (4, 6, 8: commutator poles; 12-16: encoder bits) — Enter a
scalar or a vector that is the same length as the Channel vector value. The
encoder vector controls the encoder or commutation outputs on connector JP5.
Enter values according to the following:
• Commutator — Enter values from the set [4 6 8]. These values specify the
number of poles for a commutator output.
• Encoder — Enter values from the set [12 13 14 15 16]. These values specify
the number of bits for an encoder output.
Output format — From the list select an output format for all channels:
• The position and velocity values are each normalized to lie between -1 and 1.
• Position and velocity are returned in radians and radians per second,
respectively.
• The status value is encoded in a 3-bit integer that is returned as a double.
The status value consists of the following status information for the channel:
23-10
NAII (Apex) 73SD3
status are FAILURE. If the board does not provide a reference/excitation, the
test status and reference status have no effect.
When you request a format with status, you also enable the automatic
background (bit D2 of the Test Enable Register) testing.
Max RPS vector — Enter the maximum measurable velocity (in revolutions
per second) for each channel. This value sets the velocity scale for each channel.
This value must be a scalar or a vector that is the same length as the Channel
vector value. Enter positive numbers less than 152.
Show input ports for dynamic max RPS - Select this check box to display an
input port for each channel to be used for specifying the maximum RPS
dynamically. When you select this check box, the input port signal is internally
limited to between 9.5367 and 152.5878 RPS.
Latch all channels before reading position data — Select this check box to
guarantee that all channels are latched before being read. This ensures that all
channels are sampled at exactly the same time. Note that selecting this option
incurs a small additional resource overhead.
Excitation frequency (47-10000) — Enter the frequency of the on-board
reference/excitation.
Excitation voltage (0, 2-28, or 115) — Enter the voltage of the on-board
reference/excitation.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. Be sure that this
corresponds to the actual DIP-switch settings on the board. For example, if the
base address is 300 in hexadecimal, enter
0x300
23-11
23 North Atlantic Industries, Inc. (Formerly Apex)
Board Characteristics
Board name 76LD1
Manufacturer NAII
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
23-12
NAII (Apex) 76LD1
The channel numbers can occur in any order. The maximum allowable channel
number can be 0, 2, 4, or 8 depending on the board type.
Wiring vector (2 for 2-wire;3 for 3-wire or 4-wire) — Enter the wire type for
each of the channels in Channel vector. This entry must be either a scalar or
a vector that is the same length as the Channel vector entry. Specify the
wiring vector as follows:
For example, for a Channel vector entry of [1, 3], a Wiring vector entry of
[2, 3]
• The position and velocity values are each normalized to lie between -1 and 1.
• Position and velocity are returned in radians and radians per second,
respectively.
• The status value is encoded in a 3-bit integer that is returned as a double.
The status value consists of the following status information for the channel:
23-13
23 North Atlantic Industries, Inc. (Formerly Apex)
(100), means the test status is OK and both signal status and reference
status are FAILURE. If the board does not provide a reference/excitation, the
test status and reference status have no effect.
When you request a format with status, you also enable the automatic
background (bit D2 of the Test Enable Register) testing.
Latch all channels before reading position data — Select this check box to
guarantee that all channels are latched before being read. This ensures that all
channels are sampled at exactly the same time. Note that selecting this option
incurs a small additional resource overhead.
Excitation frequency (360-10000) — Enter the frequency for the on-board
reference/excitation signal.
Excitation voltage (0, 2-28, or 115) — Enter the voltage of the on-board
reference/excitation signal.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
23-14
NAII (Apex) 76CL1
Board Characteristics
Board name 76Cl1
Manufacturer NAII
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
23-15
23 North Atlantic Industries, Inc. (Formerly Apex)
[1, 3]
The channel numbers can occur in any order. The maximum allowable channel
number can be 0, 2, 4, or 8 depending on the board type.
Wiring vector (2 for 2-wire;3 for 3-wire or 4-wire) — This must be either a
scalar or a vector the same length as the Channel vector value. Enter a value
of 2 to indicate that the corresponding channel is 2-wire. Enter a value of 3 to
indicate the corresponding channel is 3-wire or 4-wire. For example, a Channel
vector value of [1,3] and a wiring vector setting of
[2, 3]
• The position and velocity values are each normalized to lie between -1 and 1.
• Position and velocity are returned in radians and radians per second,
respectively.
• The status value is encoded in a 3-bit integer that is returned as a double.
The status value consists of the following status information for the channel:
23-16
NAII (Apex) 76CL1
status are FAILURE. If the board does not provide a reference/excitation, the
test status and reference status have no effect.
When you request a format with status, you also enable the automatic
background (bit D2 of the Test Enable Register) testing.
Latch all channels before reading position data — Select this check box to
guarantee that all channels are latched before being read. This ensures that all
channels are sampled at exactly the same time. Note that selecting this option
incurs a small additional resource overhead.
Excitation frequency (360-10000) — Enter the frequency of the on-board
reference/excitation.
Excitation voltage (0, 2-28, or 115) — Enter the voltage of the on-board
reference/excitation.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
23-17
23 North Atlantic Industries, Inc. (Formerly Apex)
The channel numbers can occur in any order. The maximum allowable channel
number can be 0, 2, 4, or 6 depending on the board type.
If a channel n is configured as a 2-wire channel pair (as specified in the Wiring
vector parameter), enter the A and B subchannels in Channel vector as n and
-n, respectively. For example, if all channels are configured as 2-wire, the
Channel vector value
[1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6]
23-18
NAII (Apex) 76CL1
Wiring vector (2 for 2-wire;3 for 3-wire or 4-wire) — Enter the wire type for
each of the channels in Channel vector. This entry must be either a scalar or
a vector that is the same length as the Channel vector entry. Specify the
wiring vector as follows:
Note that if a channel is 2-wire, you can specify A and B subchannels (as
described for the Channel vector parameter).
For example, a Channel vector of
[5, 6]
• test status
• signal status
• excitation status
23-19
23 North Atlantic Industries, Inc. (Formerly Apex)
23-20
NAII (Apex) 76CS1
Board Characteristics
Board name 76CS1
Manufacturer NAII
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
23-21
23 North Atlantic Industries, Inc. (Formerly Apex)
The channel numbers can occur in any order. The maximum allowable channel
number can be 0, 2, 4, or 8 depending on the board type.
Two-speed ratio vector (1: single speed; greater than 1: two-speed) — Enter
a two-speed ratio vector of integers greater than 0. This must be either a scalar
or a vector the same length as the Channel vector value.
The two-speed ratio is normally 1 unless you are using a contiguous odd-even
channel pair (such as 3 and 4) as a single two-speed channel. In this case, the
two-speed ratio represents the gear ratio between the odd (coarse) and even
(fine) channels of the pair. Include only the even member of a two-speed
channel pair in the Channel vector. For example, if you want to use channels
3 and 4 as a two-speed channel geared in the ratio of 36:1, perform the
following:
• Add the value 4 (but not the value 3) to the Channel vector value
• Set the corresponding Two-speed ratio vector value to 36
High resolution vector (0: 16-bit; 1:24-bit) — Enter a high resolution vector
for the channels. This must be a scalar or a vector the same length as the
Channel vector value. Enter one of the following values:
23-22
NAII (Apex) 76CS1
• Commutator — Enter values from the set [4 6 8]. These values specify the
number of poles for a commutator output.
Encoder — Enter values from the set [12 13 14 15 16]. These values specify
the number of bits for an encoder output.
Output format — From the list select an output format for all channels:
• The position and velocity values are each normalized to lie between -1 and 1.
• Position and velocity are returned in radians and radians per second,
respectively.
• The status value is encoded in a 3-bit integer that is returned as a double.
The status value consists of the following status information for the channel:
23-23
23 North Atlantic Industries, Inc. (Formerly Apex)
Show input ports for dynamic max RPS - Select this check box to display an
input port for each channel to be used for specifying the maximum RPS
dynamically. When you select this check box, the input port signal is internally
limited to between 9.5367 and 152.5878 RPS.
Latch all channels before reading position data — Select this check box to
guarantee that all channels are latched before being read. This ensures that all
channels are sampled at exactly the same time. Note that selecting this option
incurs a small additional resource overhead.
Save board setup at model termination (takes 5 seconds) — Select this
check box to save the current board settings to the board at model termination.
This action takes approximately 5 seconds. Wait for the save action to complete
before removing power from the board. Upon save completion, the message
Setup has been saved
appears in the message window on the upper right of the target PC screen.
Excitation frequency (47-1000) — Enter the frequency of the on-board
reference/excitation.
Excitation voltage (0, 2-28, or 115) — Enter the voltage of the on-board
reference/excitation.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
23-24
NAII (Apex) 76CS1
The channel numbers can occur in any order. The maximum allowable channel
number can be 0, 2, 4, or 6 depending on the board type.
Reset vector — Enter a scalar or a vector that is the same length as the
Channel vector value. The reset vector controls the behavior of the channel at
model termination. If you specify a scalar value, that setting is used for all
channels. If you specify a value of 1, the corresponding channel resets to the
value specified in the initial value vector. If you specify a value of 0, the channel
remains at the last value attained while the model was running.
Initial value vector — Enter a scalar or a vector that is the same length as the
channel vector. The initial value vector contains the initial values (in radians)
for the output channels. If you specify a scalar value, that value is the initial
value for all channels. The channels are set to the initial values between the
time the model is downloaded and the time it is started.
Two-speed ratio vector (1: single speed; greater than 1: two-speed) — Enter
a two-speed ratio vector of integers greater than 0. This must be either a scalar
or a vector the same length as the channel vector.
The two-speed ratio is normally 1 unless you are using a contiguous odd-even
channel pair (such as 3 and 4) as a single two-speed channel. In this case, the
two-speed ratio represents the gear ratio between the odd (coarse) and even
(fine) channels of the pair. Include only the even member of a two-speed
channel pair in the channel vector. For example, if you want to use channels 3
and 4 as a two-speed channel geared in the ratio of 36:1, perform the following:
23-25
23 North Atlantic Industries, Inc. (Formerly Apex)
• Add the value 4 (but not the value 3) to the Channel vector value
• Set the corresponding Two-speed ratio vector value to 36
High resolution vector (0: 16-bit; 1:24-bit) — Enter a high resolution vector
for the channels. This must be a scalar or a vector the same length as the
Channel vector value. Enter one of the following values:
Note, you can specify high resolution only for the even-numbered channels of a
two-speed channel pair. Specifying high resolution incurs a small additional
overhead.
Show output status port — Select this check box to enable the automatic
background (bit D2 of the Test Enable Register) testing. This option displays a
status output port labeled S when you click Apply or OK. This port emits a
signal with a width of 3. The signal contains the following words for the board:
• test status
• signal status
excitation status
Excitation frequency (47-10000) — Enter the frequency of the on-board
reference/excitation.
Excitation voltage (0, 2-28, or 115) — Enter the voltage of the on-board
reference/excitation.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
23-26
NAII (Apex) 76CS1
getxpcpci
Note that the device ID of the NAII 76CS1 board is 7621 in hexadecimal.
23-27
23 North Atlantic Industries, Inc. (Formerly Apex)
23-28
24
Quanser
Q8
The Quanser Q8 is a multifunction measurement and control board. It has
eight 14-bit singled-ended A/D converters (supported by two A/D chips with
four channels per chip), eight 12-bit D/A voltage outputs, 32 digital
communication channels (each of which can be used for digital input or digital
output), eight 24-bit encoder inputs, and two 32-bit counter/timers.
xPC Target supports this board with these driver blocks:
• “Q8 Analog Input” on page 24-2
• “Q8 Analog Output” on page 24-4
• “Q8 Digital Input” on page 24-6
• “Q8 Digital Output” on page 24-7
• “Q8 Incremental Encoder” on page 24-8
• “Q8 Counter” on page 24-11
Board Characteristics
Board name Q8
Manufacturer Quanser
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
Q8 Analog Input
Scaling of Input to Output
volts Double 1
24-2
Q8
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0. Note that the input range is -10V to 10V for all
channels and is not reconfigurable.
Two A/D chips on the Q8 board convert these channels. One A/D chip converts
channels 1 to 4, the second A/D chip converts channels 5 to 8. To maximize
throughput, balance the conversion load between the two groups of channels.
For example, if you want to convert four channels, a channel vector value like
the following has one A/D chip convert channels 1 and 2 and the other A/D chip
convert channels 5 and 6:
[1, 2, 5, 6]
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
24-3
24 Quanser
Q8 Analog Output
Scaling of Input to Output
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Two A/D chips on the Q8 board convert these channels. One A/D chip converts
channels 1 to 4, the second A/D chip converts channels 5 to 8. To maximize
throughput, balance the conversion load between the two groups of channels.
For example, if you want to convert four channels, a channel vector value like
the following has one A/D chip convert channels 1 and 2 and the other A/D chip
convert channels 5 and 6:
[1, 2, 5, 6]
Range vector — Enter a range code for each of the channels in the channel
vector. The value can be a scalar or a vector that must be the same length as
the channel vector. If you specify a scalar value, that setting is used for all
channels. This board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
0 to 10 10
24-4
Q8
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Simultaneous update — Choose this check box to ensure that all the outputs
update simultaneously (non-transparent mode).
Note that choosing this check box requires an extra register write per sample
time and might cause some performance loss.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
24-5
24 Quanser
Q8 Digital Input
Scaling of Input to Output
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
The Q8 board has 32 digital channels. You can use each of these digital
channels for input or output.
Note If you have a Q8 digital input and digital output block corresponding to
the same board (the same PCI slot), do not use the same digital channel
number in both blocks.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
24-6
Q8
getxpcpci
Q8 Digital Output
Scaling of Input to Output
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
The Q8 board has 32 digital channels. You can use each of these digital
channels for input or output.
Note If you have a Q8 digital input and digital output block corresponding to
the same board (the same PCI slot), do not use the same digital channel
number in both blocks.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
24-7
24 Quanser
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. Enter a scalar or a vector that is the same
length as the channel vector. If you specify a scalar value, that value is the
initial value for all channels. The channels are set to the initial values between
the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
Q8 Incremental Encoder
Channel vector — Enter a vector of numbers between 1 and 8. This driver
allows you to enter channel numbers in any order. For example, to use the first
three odd encoder input channels, enter
[1,3,5]
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Note If you specify four channels or less, it is more efficient to use channels
that are all odd or all even. Doing so ensures optimal performance.
Initial count vector — The initial value vector contains valid count values to
be loaded into the preload register (PR) for the corresponding channel. After a
counter decrements to zero, it reloads from the value in the preload register.
24-8
Q8
Enter a scalar or a vector that is the same length as the channel vector. If you
specify a scalar value, that value is the initial count value for all channels.
Prescale vector — The prescale vector is a base prescale factor for digital
filtering. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. This
filter clock frequency helps eliminate high frequency noise. Enter a value from
0 to 255. An entry of 0 corresponds to the highest possible available frequency
of 16.7 MHz.
Quadrature vector — Enter the quadrature vector. Enter a scalar or a vector
that is the same length as the channel vector. If you specify a scalar value, that
setting is used for all channels. The allowable entries are
Mode vector — Enter the counting mode. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels. The allowable entries are
24-9
24 Quanser
• 0 — Disables index mode. This mode treats the index/load (I/LD) input as a
level-sensitive asynchronous input.
• 1 — Enables index mode. This mode treats the index/load (I/LD) input as a
level-sensitive synchronous input with the quadrature clocks.
Index polarity vector — Enter the index polarity mode vector. Enter a scalar
or a vector that is the same length as the channel vector. If you specify a scalar
value, that setting is used for all channels. The allowable entries are
Preserve counts vector — Enter the preserve counts vector. Enter a scalar or
a vector that is the same length as the channel vector. If you specify a scalar
value, that setting is used for all channels. The allowable entries are
• 0 — Do not preserve the current count for the corresponding channel. The
driver loads its counter from its preload register (PR) when the model is
restarted.
• 1 — Preserve the current count for the corresponding channel when the
model is restarted. (Note that the count will be meaningless after power is
recycled.)
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
24-10
Q8
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Q8 Counter
Channel vector — Enter a vector of numbers containing 1 or 2. This driver
allows you to enter channel numbers in any order. Channel 1 references the
counter channel, channel 2 references the watchdog channel. For example, to
use both channels, enter
[1,2]
Mode vector — Enter the display port mode. Enter a scalar or a vector that is
the same length as the channel vector. If you specify a scalar value, that setting
is used for all channels. The allowable entries are
Show arm input vector — Enter a scalar or a vector that is the same length
as the channel vector. If you specify a scalar value, that setting is used for all
channels. The allowable entries are
• 0 — Do not display the input arm input. The channel is always armed.
• 1 — Display the input arm input for the associated channel. This setting
allows a channel to be armed or disarmed. You can use this port to enable or
disable the channel output dynamically. To enable or disable the channel
output, connect a signal to the input arm input. A signal value of 1 enables
the channel output, a value of 0 disables the channel output.
24-11
24 Quanser
When you disarm a channel, its output is continuously high. When you arm a
channel, the corresponding input port(s) control the output, as usual.
The value of an input port is undefined for the time between when a model is
downloaded and the time it is started. If an input port is armed, its initial value
is determined by the corresponding Initial low count vector and Initial high
count vector values:
• If either the Initial low count vector or Initial high count vector value is
nonzero, the channel will be armed between download time and model start
time
• If both the Initial low count vector or Initial high count vector value is
zero, the channel will be disarmed.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial low count vector — This parameter specifies the initial width (the time
after model download and prior to model start) in 30 nanosecond intervals of
the low portion of the output signal for the corresponding channel. Enter a
scalar or a vector that is the same length as the channel vector. If you specify
a scalar value, that setting is used for all channels.
Initial high count vector — This parameter specifies the initial width (the
time after model download and prior to model start) in 30 nanosecond intervals
of the high portion of the output signal for the corresponding channel. Enter a
scalar or a vector that is the same length as the channel vector. If you specify
a scalar value, that setting is used for all channels.
Sample time — Base sample time or a multiple of the base sample time.
PCI slot — If only one board of this type is physically present in the target PC,
enter
-1
24-12
Q8
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
24-13
24 Quanser
24-14
25
DM6420 (p. 25-2) I/O board with 16 single or 8 differential analog input
(A/D) channels, 2 analog output (D/A) channels, 8
independent digital I/O lines, 8 dependent digital I/O
lines, and 2 counter/timers.
DM6430 (p. 25-9) ISA PC/104 I/O board with 16 single or 8 differential
analog input (A/D) channels, 1 analog output (D/A)
channel, 16 digital I/O lines, and 2 counter/timers.
DM6604 (p. 25-15) ISA PC/104 I/O board with 8 analog output (D/A)
channels, and 24 digital I/O lines.
DM6804 (p. 25-19) ISA PC/104 I/O board with 24 digital I/O lines and 5
counter/timer channels.
DM6814 (p. 25-30) 16-bit counting board with 3 channels. This board
typically connects to incremental encoders.
DM6816 (p. 25-34) ISA PC/104 I/O board with 9 independent PWM channels,
8-bit resolution, 3 16-bit timer/counters, and an on-board
8 MHZ clock.
DM7420 (p. 25-36) PCI PC/104 I/O board with 16 single or 8 differential
analog input (A/D) channels, 8 independent digital I/O
lines, 8 dependent digital I/O lines, and 9 counter/timers.
25 Real Time Devices
DM6420
The DM6420 is an I/O board with 16 single or 8 differential analog input (A/D)
channels (12-bit) with a maximum sample rate of 500 kHz, 2 analog output
(D/A) channels (12-bit), 8 independent digital I/O lines, 8 dependent digital I/O
lines, and 2 counter/timers (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the counter/timers on this board.
Board Characteristics
Board name DM6420
Manufacturer Real Time Devices
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
25-2
DM6420
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Input coupling vector — Enter either 1 (single-ended) or 2 (differential) for
each of the channels in the channel vector to choose the coupling code. The
coupling vector must be the same length as the channel vector. This driver
allows the coupling of each channel to be different.
For example, if the first and second channels are single-ended and the fifth
channel is a differential input, enter
[1,1,2]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Range vector — Enter a range code for each of the channels entered in the
channel vector. The range vector must be the same length as the channel
vector. This driver allows a different range for each channel.
25-3
25 Real Time Devices
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +5 volts, enter
[-10,5,5]
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the channel vector
to choose the gain code of that channel. The gain vector must be the same
length as the channel vector. This driver allows the gain of each channel to be
different.
Note While this board has programmable input ranges of +5, +10 and 0 to
10, this driver sets the input range to +10, and then lets you select different
input ranges by choosing different gains.
The following table is a list of the ranges for this driver given the gain entered
in the gain vector.
1 -10 to 10
2 -5 to +5
4 -2.5 to 2.5
8 -1.25 to 1.25
Notice that by increasing the gain code the voltage range is decreased. The gain
divides the input voltage range.
25-4
DM6420
For example, if the first channel has a gain code of 1 (10 volt range) and the
second and fifth channels have a gain code of 2 (5 volt range), enter
[1,2,2]
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels entered in the
channel vector. The range vector must be the same length as the channel
vector. This driver allows a different range for each channel.
25-5
25 Real Time Devices
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +5 volts, enter
[-10,5,5]
Sample time — Enter the model base sample time or a multiple of the base
sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
25-6
DM6420
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The port name defines which port
is used for this driver block. Each port has a maximum of 8 digital lines that
can be configured as inputs. In each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-7
25 Real Time Devices
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either 1 or 2. The port name defines which port is
used for this driver block. Each port has a maximum of 8 digital lines that can
be configured as outputs. In each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-8
DM6430
DM6430
The DM6430 is an ISA PC/104 I/O board with 16 single or 8 differential analog
input (A/D) channels (16-bit) with a maximum sample rate of 100 kHz, 1 analog
output (D/A) channel (16-bit), 16 digital I/O lines, and 2 counter/timers (16-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the counter/timers on this board.
Board Characteristics
Board name DM6430
Manufacturer Real Time Devices
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
25-9
25 Real Time Devices
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Gain vector — Enter 1, 2, 4, or 8 for each of the channels in the channel vector
to choose the gain code of that channel. The gain vector must be the same
length as the channel vector. This driver allows the gain of each channel to be
different.
The following table is a list of the ranges for this driver given the gain entered
in the gain vector.
1 -10 to 10
2 -5 to +5
4 -2.5 to 2.5
8 -1.25 to 1.25
Notice that by increasing the gain code the voltage range is decreased. The gain
divides the input voltage range.
For example, if the first channel has a gain code of 1 (10 volt range) and the
second and fifth channels have a gain code of 2 (5 volt range), enter
[1,2,2]
25-10
DM6430
For example, if the first and second channels are single-ended and the fifth
channel is a differential input, enter
[0,0,1]
The driver selects a second differential input 8 channels higher than the first
channel. In the example above, the driver would select the thirteenth channel
as a differential input with the fifth channel.
Sample time — Base sample time of a multiple of the base sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
volts Double 1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
25-11
25 Real Time Devices
25-12
DM6430
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either 1 or 2. The port name defines which port is
used for this driver block. Each port has a maximum of 8 digital lines that can
be configured as inputs. In each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-13
25 Real Time Devices
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either 1 or 2. The port name defines which port is
used for this driver block. Each port has a maximum of 8 digital lines that can
be configured as outputs. In each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
25-14
DM6604
DM6604
The DM6604 is an ISA PC/104 I/O board with 8 analog output (D/A) channels
(12-bit), and 24 digital I/O lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name DM6604
Manufacturer Real Time Devices
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
25-15
25 Real Time Devices
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector —Enter a range code for each of the channels entered in the
channel vector. The range vector must be the same length as the channel
vector. This driver allows a different range for each channel.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +5 volts, enter
[-10,5,5]
Sample time — Enter the model base sample time or a multiple of the base
sample time.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
25-16
DM6604
Port — From the list choose either A, B, or C. The port name defines which port
is used for this driver block. Each port has a maximum of 8 digital lines that
can be configured as inputs. In each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The port name defines which port
is used for this driver block. Each port has a maximum of 8 digital lines that
can be configured as outputs. In each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
25-17
25 Real Time Devices
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-18
DM6804
DM6804
The DM6804 is an ISA PC/104 I/O board with 24 digital I/O lines and 5
counter/timer channels (16-bit).
It contains one 8255 chip with 3 digital I/O ports and one AM9513A
counter/timer chip. For additional information about the various counter/timer
modes of that chip see the AM9513A data sheet which is part of the board
documentation.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name DM6804
Manufacturer Real Time Devices
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
25-19
25 Real Time Devices
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The port name defines which port
is used for this driver block. Each port has a maximum of 8 digital lines that
can be configured as inputs. In each case, one block is needed for each port.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-20
DM6804
For example, to use all of the digital outputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either A, B, or C. The port name defines which port
is used for this driver block. Each port has a maximum of 8 digital lines that
can be configured as outputs. In each case, one block is needed for each port.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-21
25 Real Time Devices
TTL Double 0 to 1
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
25-22
DM6804
Base address —Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-23
25 Real Time Devices
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
DM6804 Counter FM
The DM6804 has one AM9513A chip with 5 counters.
The DM6804 FM driver programs the AM9513A for FM (Frequency
Modulation) signal generation (a square wave with fixed duty cycle and
variable frequency). For the corresponding counter channel, the PWM signal is
output at the pin named OUT.
25-24
DM6804
TTL Double 0 to 1
Output duty cycle — Enter a value between 0 and 1 to set the duty cycle of the
square wave. The Duty Cycle is held fixed during execution of the target
application.
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the duty cycle entering the block defines the duration of the TTL
high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running and gets
armed when the application begins running. This parameter sets the TTL level
when the counter is disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
25-25
25 Real Time Devices
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
Note Your control over the output duty cycle is not always precise. See
“PWM and FM Driver Block Notes” on page 1-8 for details.
25-26
DM6804
Level sequence of square wave — From the list, choose either high-low or
low-high:
• If you choose high-low, the square wave period starts with the TTL high part
followed by the TTL low part.
• If you choose low-high, the square wave period starts with the TTL low part
followed by the TTL high part.
In either case, the Output duty cycle defined in the setting above define the
duration of the TTL high part.
Level when disarmed — From the list, choose either high or low. The counter
is automatically disarmed when the target application is not running. If the
application is running, the second input port controls whether the counter is
armed or disarmed. This parameter sets the TTL level when the counter is
disarmed.
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
25-27
25 Real Time Devices
TTL Double 0 to 1
DM6804 FM Capture
This block programs the AMD9513A for capturing FM signals.
There is one output for relative frequency compared to the base frequency. To
get the actual frequency, multiply the base frequency by the relative frequency.
The FM signal has to enter the pin named GATE of the corresponding counter
channel. The CLK pin has to be left unconnected.
25-28
DM6804
TTL Double 0 to 1
Sample time — Enter the base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle)
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
DM6804xx
You can use this block to program the AMD9513A counter. The PWM, PWM &
ARM, FM, FM & ARM, PWM Capture, and FM Capture blocks use this block
in their underlying subsystems. The API for this block is not currently
documented.
25-29
25 Real Time Devices
DM6814
The DM6814 is a 16-bit counting board with three channels. This board
typically connects to incremental encoders. Incremental encoders convert
physical motion into electrical pulses that can be used to determine velocity,
direction, and distance.
Each board also three I/O ports, with each port containing eight digital I/O
lines.
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the 12 digital input lines on this board.
Board Characteristics
Board name DM6814
Manufacturer Real Time Devices
Bus type ISA
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
25-30
DM6814
25-31
25 Real Time Devices
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — Select port A, B, or C.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
25-32
DM6814
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — Select port A, B, or C.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial values (0 or
1) of the output channels. Enter a scalar or a vector that is the same length as
the channel vector. If you enter a scalar, that value is used for all channels. The
channels are set to these initial values between the time the model is
downloaded and the time it is started.
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the base address board setting. For example, if the base address
is 300 (hexadecimal), enter
0x300
25-33
25 Real Time Devices
DM6816
The DM6816 is an ISA PC/104 I/O board with 9 independent PWM channels,
8-bit resolution, 3 16-bit timer/counters, and an on-board 8 MHZ clock.
xPC Target supports this board with this driver block:
• “DM6816 PWM” on page 25-34
Board Characteristics
Board name DM6816
Manufacturer Real Time Devices
Bus type ISA (PC104)
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
DM6816 PWM
Channel vector — Enter numbers between 1 and 9 to select the PWM channel.
This driver allows the selection of individual PWM channels in any order. The
number of elements defines the number of channels used.
For example, to use all of the channels, enter
[1,2,3,4,5,6,7,8,9]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Clock source for channels 1, 2, 3 — From the list choose either 8 MHz clock
or Timer 1 output as the clock source for the channels. By default, it is Timer
1 output. This parameter affects channels 1, 2, or 3.
Clock source for channels 4, 5, 6 — From the list choose either 8 MHz clock
or Timer 1 output as the clock source for the channels. By default, it is Timer
1 output. This parameter affects channels 4, 5, or 6.
25-34
DM6816
Clock source for channels 7, 8, 9 — From the list choose either 8 MHz clock
or Timer 1 output as the clock source for the channels. By default, it is Timer
1 output. This parameter affects channels 7, 8, or 9.
25-35
25 Real Time Devices
DM7420
The DM7420 is a PCI PC/104 I/O board with 16 single or 8 differential analog
input (A/D) channels (12-bit) with a maximum sample rate of 600 kHz, 8
independent digital I/O lines, 8 dependent digital I/O lines, and 9
counter/timers.
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the counter/timers on this board.
Board Characteristics
Board name DM6604
Manufacturer Real Time Devices
Bus type PCI (PC104)
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
volts Double 1
25-36
DM7420
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 10 volts, enter
[-10,10]
Gain vector — Enter 1, 2, 4, 8, 16, or 32 for each of the channels in the channel
vector to choose the gain code of that channel. The gain vector must be the same
length as the channel vector. This driver allows the gain of each channel to be
different.
25-37
25 Real Time Devices
The following table is a list of the ranges for this driver given the gain entered
in the gain vector.
1 0 to 10
2 0 to +5
4 0 to 2.5
8 0 to 1.25
16 0 to 0.625
32 0 to 0.312
Notice that by increasing the gain code the voltage range is decreased. The gain
divides the input voltage range.
For example, if the first channel has a gain code of 1 (10 volt range) and the
second and fifth channels have a gain code of 2 (5 volt range), enter
[1,2,2]
25-38
DM7420
The following table is a list of the couplings for this driver and the
corresponding coupling codes.
For example, if the first and second channels are ground referenced
single-ended and the third channel is a differential input, enter
[1,1,3]
For differential inputs, the driver selects a second differential input that is
eight channels higher than the first channel. In the example above, the driver
selects the eleventh channel (AIN11/AIN3-) as a differential input.
Sample time — Base sample time or a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
25-39
25 Real Time Devices
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either 0 or 1.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
25-40
DM7420
For example, to use all of the digital outputs for one port, enter
[1,2,3,4,5,6,7,8]
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Port — From the list choose either 0 or 1.
Sample time — Base sample time of a multiple of the base sample time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
25-41
25 Real Time Devices
25-42
26
SBS Technologies
Flex/104A PC/104 IP Carrier Board (p. 26-2) PC/104 format IP carrier board with a capacity of 2
IP modules.
IP-16ADC (p. 26-4) 16 single or 8 differential analog input (A/D)
channels (16-bit) with a combined throughput of
100kHz.
IP-16DAC (p. 26-6) 3 independent precalibrated analog output (D/A)
channels (16-bit).
IP-DAC (p. 26-8) 6 independent precalibrated analog output (D/A)
channels (12-bit).
IP-Digital 24 (p. 26-10) 24 digital I/O lines which can be independently
configured for input or output.
IP-HiADC (p. 26-13) 16 analog input (A/D) channels (12-bit).
IP-Synchro (p. 26-15) Two channels of position measurement using
synchro, resolver, LVDT, or Inductosyn®
transducers.
IP-Unidig-E-48 (p. 26-17) 48 digital I/O lines which can be independently
configured for input or output
PCI-40A Carrier Board (p. 26-20) ISA format IP carrier board with a capacity of 4 IP
modules.
Broadcast Memory (p. 26-21) PCI broadcast memory node
26 SBS Technologies
Board Characteristics
Board name Flex-104A PC/104 carrier board
Manufacturer SBS Technologies
Bus type PC/104
Access method I/O Mapped
Multiple block instance support No
Multiple board support Yes
Flex-104A
Driver Block Parameters
Carrier ID — Enter a number to uniquely identify this IP carrier board within
the model.
Base address — Enter the base address of the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
26-2
Flex/104A PC/104 IP Carrier Board
This board permutes the expected pinout of the 50-pin I/O connector for each
IP module as follows
1 1 18 35 35 20
2 3 19 37 36 22
3 5 20 39 37 24
4 7 21 41 38 26
5 9 22 43 39 28
6 11 23 45 40 30
7 13 24 47 41 32
8 15 25 49 42 34
9 17 26 2 43 36
10 19 27 4 44 38
11 21 28 6 45 40
12 23 29 8 46 42
13 25 30 10 47 44
14 27 31 12 48 46
15 29 32 14 49 48
16 31 33 16 50 50
17 33 34 18
26-3
26 SBS Technologies
IP-16ADC
The IP-16ADC I/O board has 16 single or 8 differential analog input (A/D)
channels (16-bit) with a combined throughput of 100kHz.
xPC Target supports this board with this driver block:
• “IP-16ADC Analog Input (A/D)” on page 26-4
Board Characteristics
Board name IP-16ADC
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support Yes
Multiple board support Yes
volts double 1
26-4
IP-16ADC
Carrier slot — Select the slot on the carrier board into which the IP-16ADC
module is plugged. Note that different carrier boards can have different slot
capacities.
Channel vector — Enter a vector of numbers between 1 and 16. The channel
numbers can occur in any order. For example, to use the first and third analog
output (A/D) channels, enter
[1, 3]
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 -5 to +5
5 0 to 5
10 0 to 10
Range codes –10 and –5 specify differential channels, which each use two pins
on the I/O cable. Range codes 10 and 5 specify single-ended channels, which
each use only one pin. Certain combinations of channel numbers and range
codes can refer to conflicting physical I/O pins and will cause an error of the
form “Bipolar channel x and unipolar channel y use the same I/O pins”. Consult
the section “I/O Pin Wiring” in the IP-16ADC User’s Manual as you select the
channel and range vectors to avoid this.
Sample time — Enter the base sample time or a multiple of the base sample
time.
26-5
26 SBS Technologies
IP-16DAC
The IP-16DAC I/O board has 3 independent precalibrated analog output (D/A)
channels (16-bit).
xPC Target supports this board with this driver block:
• “IP-16DAC Analog Output (D/A)” on page 26-6
Board Characteristics
Board name IP-16DAC
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support Yes
Multiple board support Yes
volts double 1
26-6
IP-16DAC
Carrier slot — Select the slot on the carrier board into which the IP-16DAC
module is plugged. Note that different carrier boards can have different slot
capacities.
Channel vector — Enter a vector of numbers between 1 and 3. The channel
numbers can occur in any order. For example, to use the first and second analog
output (D/A) channels, enter
[1,2]
-5 -5 to +5
5 0 to 5
10 0 to 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter [-10,5]
The range settings must correspond to the jumper settings on the board for
DAC A and DAC B and DAC C.
Sample time — Base sample time of a multiple of the base sample time.
26-7
26 SBS Technologies
IP-DAC
The IP-DAC I/O board has 6 independent precalibrated analog output (D/A)
channels (12-bit).
xPC Target supports this board with this driver blocks:
• “IP-DAC Analog Output (D/A)” on page 26-8
Board Characteristics
Board name IP-DAC
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support Yes
Multiple board support Yes
volts double 1
26-8
IP-DAC
Carrier slot — Select the slot on the carrier board into which the IP-16ADC
module is plugged. Note that different carrier boards can have different slot
capacities.
Channel vector — Enter a vector of numbers between 1 and 6. The channel
numbers can occur in any order. For example, to use the first and second analog
output (D/A) channels, enter
[1,2]
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
board allows the range of each channel to be different.
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 -5 to +5
5 0 to 5
10 0 to 10
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter [-10,5]
The range settings have to correspond to the OUTPUT RANGE SELECTION
settings on the board for DAC0 and DAC1 (channel 1 and 2 respectively).
Sample time — Base sample time of a multiple of the base sample time.
26-9
26 SBS Technologies
IP-Digital 24
IP-Digital 24 boards have 24 digital I/O lines which can be independently
configured for input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name IP-Digital-24
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support Yes
Multiple board support Yes
26-10
IP-Digital 24
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
26-11
26 SBS Technologies
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
26-12
IP-HiADC
IP-HiADC
The IP-HiADC I/O board has 16 analog input (A/D) channels (12-bit).
xPC Target supports this board with this driver block:
• “IP-HiADC Analog Input (A/D)” on page 26-13
Board Characteristics
Board name IP-HiADC
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support Yes
Multiple board support Yes
volts double 1
26-13
26 SBS Technologies
Carrier slot — Select the slot on the carrier board into which the IP-HiADC
module is plugged. Note that different carrier boards can have different slot
capacities.
Channel vector — Enter a vector of numbers between 1 and 16. The channel
numbers can occur in any order. For example, to use the first and third analog
output (A/D) channels, enter
[1, 3]
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range — Select either -5V to 5V or -10V to 10V. This applies to all channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
26-14
IP-Synchro
IP-Synchro
IP-Synchro provides two channels of position measurement using synchro,
resolver, LVDT, or Inductosyn® transducers.
xPC Target supports this board with this driver block:
• “IP-Synchro” on page 26-15
Board Characteristics
Board name IP-Synchro
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support No
Multiple board support Yes
IP-Synchro
Scaling Input to Output
26-15
26 SBS Technologies
Carrier slot — Select the slot on the carrier board into which the IP-Synchro
module is plugged. Note that different carrier boards can have different slot
capacities.
Channel vector — Enter a vector with one or two elements to select the
Synchro/Resolver input channels you use with this block. 1 represents channel
A and 2 represents channel B. This driver allows the selection of inputs in
either order.
For example to use channels A and B in that order, enter
[1,2]
Precision vector — This must be a scalar or a vector the same length as the
channel vector. For each input channel it specifies a precision of either 10, 12,
14, or 16 bits. If the automatic precision option is in effect, then the selected
precision for each channel will be used for the entire run. Otherwise it merely
specifies the initial precision.
Automatic precision — Select this check box to have the IP-Synchro
automatically change its precision (resolution) in order to track the input
velocity.
Output format — This option selects the output status format.
Sample time — Enter a base sample time or a multiple of the base sample
time.
26-16
IP-Unidig-E-48
IP-Unidig-E-48
IP-Unidig-E-48 boards have 48 digital I/O lines which can be independently
configured for input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name IP-Unidig-E-48
Manufacturer SBS Technologies
Bus type N/A
Access method I/O Mapped
Multiple block instance support Yes
Multiple board support Yes
26-17
26 SBS Technologies
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
26-18
IP-Unidig-E-48
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter a base sample time or a multiple of the base sample
time.
26-19
26 SBS Technologies
Board Characteristics
Board name PCI-40A carrier board
Manufacturer SBS Technologies
Bus type PCI
Access method I/O Mapped
Multiple block instance support No
Multiple board support Yes
PCI-40A
Driver Block Parameters
Carrier ID — Enter a number to uniquely identify this IP carrier board within
the model.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
26-20
Broadcast Memory
Broadcast Memory
xPC Target uses a model for shared memory that includes Simulink blocks, for
the shared memory drivers, and MATLAB structures for defining shared
memory and node initialization partitions. The topics in this section are
• “Create Shared Memory Partitions” on page 26-21 — Before you begin to use
SBS Broadcast Memory shared memory blocks, define a partition structure
that defines how you want to allocate shared memory.
• “Initialize Shared Memory Nodes” on page 26-24 — Before you begin to use
SBS Broadcast Memory shared memory blocks, define a node initialization
structure that defines how shared memory is allocated (partitioned) and how
the board is configured.
Note The xPC Target SBS25x0 driver does not fully support node-to-node
network configuration. In most cases, a shared memory hub is required to use
the SBS Shared driver blocks. If you have additional questions, please contact
The MathWorks Technical Support.
After you define the shared memory partitions, you can add SBS Broadcast
Memory shared memory driver blocks to your Simulink model. Create a shared
memory structure in one of the following ways. See “Shared Memory Partition
Structure” on page 26-29 for the complete list of fields for the structure.
The following description refers to the smpartsbs25x0 command. Type
26-21
26 SBS Technologies
help smpartsbs25x0
>> smpartsbs25x0
SBS25x0 Shared Memory Parition
Shared-Memory partition
Total Bytes in partition = 4
Starting Address = 0x0
Number of segments = 1
ans =
Address: '0x0'
Type: 'uint32'
Alignment: '4'
Size: '[ 1 ]'
WIT: 'off'
26-22
Broadcast Memory
>> x=smpartsbs25x0(Partition)
- The Address field is optional. Only specify this field for the first segment
of a partition. The elements of a partition are defined as a continuous
memory block from the first address. The following segments extrapolate
their addresses from the first segment. If you have fragmented memory,
use multiple partitions and SBS Broadcast Memory read/write blocks to
work with the memory.
- The Type and Size fields are required for all fields in the partition
structure.
- The Alignment value is optional. It is '4' by default, which forces
segments that do not have alignment specifications to start on 4 byte (32
bit) boundaries. In this partition, the third segment (Partition(3)) has an
alignment of '8'.
- The base addresses of subsequent segments are fully defined by the data
type, size, and alignment of the preceding segment.
- You can then call the smpartsbs25x0() command to fully populate the
partition structure.
26-23
26 SBS Technologies
ans =
TargetAbortEnable: 'off'
LoopbackEnable: 'off'
Node2Node: 'off'
RXEnable: 'on'
TXEnable: 'on'
MemorySize: '256kByte'
WITEnable: 'off'
IRQ_ErrorEnable: 'off'
26-24
Broadcast Memory
IRQ_WITEnable: 'off'
Partition: []
SlotID: 'any'
ans =
TargetAbortEnable: 'off'
LoopbackEnable: 'on'
Node2Node: 'off'
RXEnable: 'on'
TXEnable: 'on'
MemorySize: '256kByte'
WITEnable: 'off'
IRQ_ErrorEnable: 'off'
IRQ_WITEnable: 'off'
Partition: [1x1 smpartsbs25x0]
SlotID: 'any'
Currently, you can define values only for the fields LoopbackEnable,
WITEnable, and Partition.
26-25
26 SBS Technologies
For information about the Change endianess block, see “Byte Reversal/Change
Endianess Block” in Chapter 6.
Board Characteristics
Board name SBS Broadcast Memory
Manufacturer SBS
Bus type PCI
Access method Memory mapped
Multiple block instance support Yes
Multiple board support Yes
SBS25x0 init
Driver Block Parameters
Before you begin to configure these block parameters, be sure that you have a
predefined node initialization structure. See “Initialize Shared Memory Nodes”
on page 26-24.
Each model that uses shared memory must have one 5565 init block for every
SBS Broadcast Memory board in the system.
Node struct — Enter the name of the predefined node initialization structure.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
26-26
Broadcast Memory
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
SBS25x0 read
Driver Block Parameters
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure. The 5565 read block requires this
structure to specify how Simulink signal values are mapped in the shared
memory. It also uses this structure to determine the total size and address of
the shared memory. See “Create Shared Memory Partitions” on page 26-21.
Partition struct — Enter the name of the predefined shared memory partition
structure. The block uses this structure to specify how Simulink signal values
map into shared memory.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Error Status Port — Select this check box to monitor the status of the SBS
Broadcast Memory board LIER register modes.
26-27
26 SBS Technologies
SBS25x0 write
Driver Block Parameters
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure. The 5565 write block requires this
structure to specify how Simulink signal values are mapped in the shared
memory. It also uses this structure to determine the total size and address of
the shared memory. See “Create Shared Memory Partitions” on page 26-21.
Partition struct — Enter the name of the predefined shared memory partition
and object. The block uses this structure to specify how Simulink signal values
map into shared memory.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Error Status Port — Select this check box to monitor the status of the SBS
Broadcast Memory board LIER register modes.
26-28
Broadcast Memory
is not aware of structures; you must pass the output of each structure segment
as input to the 5565 pack block.
This block ignores the Address field of the partition structure.
26-29
26 SBS Technologies
where:
Partition Description
Fields
26-30
Broadcast Memory
Partition Description
Fields
26-31
26 SBS Technologies
TXEnable: 'on'
MemorySize: '256kByte'
WITEnable: 'off'
IRQ_ErrorEnable: 'off'
IRQ_WITEnable: 'off'
Partition: []
SlotID: 'any'
These values affect the Extended Control Register. Refer to the SBS Broadcast
Memory product documentation for further details on registers.
Of particular note are the following register modes:
Board Description
Modes
26-32
Broadcast Memory
Board Description
Modes
'256kByte'
'512kByte'
'1MByte'
'2MByte'
'4MByte'
'8MByte'
Board Interrupts. If you want to have an interrupt source, the SBS shared
memory board can generate PCI interrupts in response to writes to memory
partitions of a memory block. You define this behavior through the WIT field of
shared memory partition structure. Each partition segment has its own WIT
setting.
To enable a memory location to generate an interrupt, set the WIT field as
desired, then configure the xPC Target model to generate an interrupt.
The following procedure describes how to configure an entire xPC Target model
to accept an interrupt from an SBS shared memory board:
26-33
26 SBS Technologies
This command lists board information for all installed PCI devices that xPC
Target knows about.
2 If you have multiple SBS shared memory boards, find the board ID for which
you want to define the interrupt.
This is the interrupt source number you need to specify in the xPC target
code generation options field in step 10 of the following procedure.
4 From the MATLAB Command Window, type the name of your Simulink
model.
7 From the Category list, choose xPC Target code generation options.
10 Select the interrupt number to which the board is set (from step 3).
11 Click the I/O board generating the interrupt list and select the SBS board
that is associated with the IRQ. From the list, choose the appropriate board
ID:
SBS_25x0_ID_0x100
SBS_25x0_ID_0x101
SBS_25x0_ID_0x102
SBS_25x0_ID_0x103
26-34
Broadcast Memory
12 If your system has multiple boards, at the PCI slot/ISA base address
parameter, specify the PCI slot that contains the board you are configuring
for interrupts.
13 Click OK.
26-35
26 SBS Technologies
26-36
27
Sensoray
This chapter describes the Sensoray boards supported by xPC Target (http://www.sensoray.com).
526 (p. 27-2) Multifunction measurement and control board with eight
16-bit analog inputs, four 16-bit analog outputs, four
24-bit quadrature encoder inputs, and eight digital I/O
channels.
626 (p. 27-11) Multifunction I/O board with 16 14-bit differential analog
inputs, four 13-bit analog outputs, three pairs of 24-bit
up/down counters (total of six counters), 48 digital I/O
channels, watchdog timer, and backup battery support.
27 Sensoray
526
The Sensoray 526 is a multifunction measurement and control board. It has
eight 16-bit analog inputs, four 16-bit analog outputs, four 24-bit quadrature
encoder inputs, and eight digital I/O channels.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name 526
Manufacturer Sensoray
Bus type PC/104
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
Sensoray526 AD
Scaling of Input to Output
27-2
526
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 2C0 (hexadecimal), enter
0x2C0
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values.
Sensoray526 Dual AD
The Sensoray526 Dual AD block controls two boards simultaneously. This
enables simultaneous conversion for both boards. Each board does not have to
wait for the other to finish converting data before starting its own conversion.
Acquisition overlaps result in considerable time savings.
27-3
27 Sensoray
Note, for optimal performance, equally split the active channels between the
two boards. If you need eight channels, use four channels on each board.
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Sample time — Base sample time or a multiple of the base sample time.
Board A base address/Board B base address — Enter the base address of the
board. This entry must correspond to the base address DIP switch settings on
the board. For example, if the base address is 2C0 (hexadecimal), enter
0x2C0
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values. For dual boards, change the
base address of at least one of the boards. The boards cannot have the same
base address.
Sensoray526 DA
Scaling of Input to Output
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
27-4
526
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the output channels. At initialization, the block always uses this
value. If Reset vector has a value of 1, the board sets the corresponding
channel to the value of the Initial value vector when execution stops. Enter a
double precision voltage value in the range -10 to +10. This must be scalar or a
vector that is the same length as the channel vector. If you specify a scalar
value, that value is the initial value for all channels. The channels are set to
the initial values between the time the model is downloaded and the time it is
started.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 2C0 (hexadecimal), enter
0x2C0
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values.
Sensoray526 Dual DA
The Sensoray526 Dual AD block controls two boards simultaneously. This
enables the block to write the output registers to both boards before the
conversion start bits are written on both boards.
Output from the second board changes state approximately 1 to 2 microseconds
after the first board. This change is independent of the number of channels in
use.
27-5
27 Sensoray
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Board A Reset vector/Board B Reset vector — The reset vector controls the
behavior of the channel at model termination. Enter a scalar or a vector that is
the same length as the channel vector. If you specify a scalar value, that setting
is used for all channels. If you specify a value of 1, the corresponding channel
is reset to the value specified in the initial value vector. If you specify a value
of 0, the channel remains at the last value attained while the model was
running.
Board A Initial value vector/Board B Initial value vector — The initial
value vector contains the initial voltage values for the output channels. At
initialization, the block always uses this value. If Reset vector has a value of
1, the board sets the corresponding channel to the value of the Initial value
vector when execution stops. Enter a double precision voltage value in the
range -10 to +10. This must be scalar or a vector that is the same length as the
channel vector. If you specify a scalar value, that value is the initial value for
all channels. The channels are set to the initial values between the time the
model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 2C0 (hexadecimal), enter
0x2C0
27-6
526
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values. For dual boards, change the
base address of at least one of the boards. The boards cannot have the same
base address.
Sensoray526 DI
Scaling of Input to Output
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values.
27-7
27 Sensoray
Sensoray526 DO
Scaling of Input to Output
27-8
526
Base address — Enter the base address of the board. This entry must
correspond to the base address DIP switch settings on the board. For example,
if the base address is 2C0 (hexadecimal), enter
0x2C0
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values.
• Signed +- 2^23 — If the block interprets the high order bit as a sign bit, the
output takes values in the range -223 to (+223)-1.
• Unsigned 0 -> 2^24-1 — If the block interprets the 24-bit counter as an
unsigned quantity, the output is in the range 0 to (224)-1.
Count speed — From the list, select a counting mode. Choose one of the
following:
27-9
27 Sensoray
Note that the Sensoray 526 board ships from the manufacturer with a base
address of 0x2C0. If you want to change the base address, see the board
manufacturer documentation for allowed values.
27-10
626
626
The Sensoray 626 is a multifunction I/O board. It has 16 14-bit differential
analog inputs, four 13-bit analog outputs, three pairs of 24-bit up/down
counters (total of six counters), 48 digital I/O channels, watchdog timer, and
backup battery support.
You can have up to four Sensoray 626 boards in your system.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name 626
Manufacturer Sensoray
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
27-11
27 Sensoray
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Range vector — Range vector — Enter a range code for each of the channels
in the channel vector. The value can be a scalar or a vector that must be the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels.
27-12
626
The following table is a list of the ranges for this driver and the corresponding
range codes.
-5 to +5 -5
For example, if the first channel is -10 to +10 volts, and the second channel is
0 to 5 volts, enter
[-10,5]
Sample time — Base sample time or a multiple of the base sample time.
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial value for
each analog output channel when model execution starts. Enter a scalar or a
27-13
27 Sensoray
vector that is the same length as the channel vector. If you specify a scalar
value, that setting is used for all channels. The channel is set to the initial
value between the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Sample time — Base sample time or a multiple of the base sample time.
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
27-14
626
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. If you
specify a value of 1, the corresponding channel is reset to the value specified in
the initial value vector. If you specify a value of 0, the channel remains at the
last value attained while the model was running.
Initial value vector — The initial value vector contains the initial value for
each digital output channel when model execution starts. Enter a scalar or a
vector that is the same length as the channel vector. If you specify a scalar
value, that setting is used for all channels. The channel is set to the initial
value between the time the model is downloaded and the time it is started.
Sample time — Base sample time or a multiple of the base sample time.
Number the channels beginning with 1 even though the board manufacturer
numbers them beginning with 0.
Count speed vector — The count speed vector specifies a counting mode for
the channel. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. Choose
one of the following.
1 1X quadrature
27-15
27 Sensoray
2 2X quadrature
4 4X quadrature
Index reset mode vector — This is the event on the index input that resets
the channel to the value of the Reset value vector value. Enter a scalar or a
vector that is the same length as the channel vector. If you specify a scalar
value, that setting is used for all channels.
• Rising edge on index
• Falling edge on index
• Both edges
• None
Reset value vector — This parameter contains the preload value for the
corresponding channel. This is the value to which the channel is set when the
event specified by the Index reset mode parameter occurs. Enter a valid value,
as a scalar or a vector, that is the same length as the channel vector. If you
specify a scalar value, that setting is used for all channels.
Sample time — Base sample time or a multiple of the base sample time.
27-16
626
This parameter refers to one of the three pairs of 24-bit up/down counters (total
of six counters). Each channel corresponds to a counter pair.
0A, 0B 1
1A, 1B 2
2A, 2B 3
When measuring a signal, connect that signal to the B+ pin of the second
encoder. For example, for a Channel 1 input signal, connect the signal to
Encoder (0B) B+, which is pin 5 of the J4 connector. Connect the signal ground
to the GND pins (not to the B- pins). See the manufacturer documentation for
this board for further information.
Clock source vector — This parameter specifies the clock source for the
channel. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. Choose
one of the following.
1 External clock
Sample size vector — This value specifies how many measurement samples
the output for the channel is based on. For example, if the sample size for a
channel is n, the board samples the signal n times, then returns as its output
the number of times out of n that the signal was high.
Enter a scalar or a vector that is the same length as the channel vector. If you
specify a scalar value, that setting is used for all channels.
Sample time — Base sample time or a multiple of the base sample time.
27-17
27 Sensoray
27-18
28
Softing
Due to the complexity of CAN applications, the Softing (http://www.softing.com) board drivers that
xPC Target supports are not described in this chapter. Instead, see the chapters “CAN I/O Support”
and “CAN I/O Support for FIFO” for details.
28 Softing
28-2
29
Systran
This chapter describes the Systran reflective shared memory boards supported by xPC Target
(http://www.systran.com).
Before You Start (p. 29-2) Guidelines for setting up structures for shared
memory
SCRAMNet+ SC150 PCI (p. 29-5) Real-time reflective PCI memory board with 2
MBytes of node memory
Shared Memory Structure Reference (p. 29-9) Shared memory reference for structures
29 Systran
• “Create Shared Memory Partitions” on page 29-2 — Before you begin to use
SCRAMNet+ SC150 shared memory blocks, define a partition structure that
defines how you want to allocate shared memory.
• “Initialize Shared Memory Nodes” on page 29-4 — Before you begin to use
SCRAMNet+ SC150 shared memory blocks, define a node initialization
structure that defines how shared memory is allocated (partitioned) and how
the board is configured.
• SC150 read/write
• SC150 pack/unpack
After you define the shared memory partitions, you can add SCRAMNet+
SC150 shared memory driver blocks to your Simulink model. Create a shared
memory structure in one of the following ways. See “Shared Memory Partition
Structure” on page 29-9 for the complete list of fields for the structure.
The following description refers to the completepartitionstruct command.
Type
help completepartitionstruct
29-2
Before You Start
completepartitionstruct([],'scramnet')
ans =
Address: '0x0'
Type: 'uint32'
Size: '1'
Alignment: '4'
RIE: 'off'
TIE: 'off'
ExtTrigger1: 'off'
ExtTrigger2: 'off'
HIPRO: 'off'
Internal: [1x1 struct]
- The Address field is optional. Only specify this field for the first segment
of a partition. The elements of a partition are defined as a continuous
memory block from the first address. The following segments extrapolate
their addresses from the first segment. If you have fragmented memory,
use multiple partitions and SCRAMNet+ SC150 read/write blocks to work
with the memory.
- The Type and Size fields are required for all fields in the partition
structure.
29-3
29 Systran
- The base addresses of subsequent segments are fully defined by the data
type, size, and alignment of the preceding segment.
- You can then call the completepartitionstruct() command to full
populate the partition structure.
After you define the node initialization partition, you can add SCRAMNet+
SC150 shared memory driver blocks to your Simulink model. Create a shared
memory structure in one of the following ways. See “Shared Memory Node
Initialization Structure” on page 29-14 for the complete list of fields for the
structure.
The following description refers to the completenodestruct command. Type
help completenodestruct
node =
29-4
SCRAMNet+ SC150 PCI
For information about the Change endianess block, see “Byte Reversal/Change
Endianess Block” in Chapter 6.
Board Characteristics
Board name SCRAMNet+ SC150
Manufacturer Systran
Bus type PCI
Access method Memory mapped
Multiple block instance support Yes
Multiple board support Yes
SC150 init
Driver Block Parameters
Before you begin to configure these block parameters, be sure that you have a
predefined node initialization structure. See “Initialize Shared Memory Nodes”
on page 29-4.
Each model that uses shared memory must have one SC150 init block for every
SCRAMNet+ SC150 board in the system.
29-5
29 Systran
Node struct — Enter the name of the predefined node initialization structure.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
SC150 read
Driver Block Parameters
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure. The SC150 read block requires this
structure to specify how Simulink signal values are mapped in the shared
memory. It also uses this structure to determine the total size and address of
the shared memory. See “Create Shared Memory Partitions” on page 29-2.
Partition struct — Enter the name of the predefined shared memory partition
structure. The block uses this structure to specify how Simulink signal values
map into shared memory.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
29-6
SCRAMNet+ SC150 PCI
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
SC150 write
Driver Block Parameters
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure. The SC150 write block requires this
structure to specify how Simulink signal values are mapped in the shared
memory. It also uses this structure to determine the total size and address of
the shared memory. See “Create Shared Memory Partitions” on page 29-2.
Partition struct — Enter the name of the predefined shared memory partition
structure. The block uses this structure to specify how Simulink signal values
map into shared memory.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
29-7
29 Systran
29-8
Shared Memory Structure Reference
where
29-9
29 Systran
Partition Description
Fields
29-10
Shared Memory Structure Reference
Partition Description
Fields
29-11
29 Systran
Partition Description
Fields
29-12
Shared Memory Structure Reference
Partition Description
Fields
29-13
29 Systran
where
Node Description
Structure
Fields
Board Mode
The SCRAMNet+ SC150 board has a number of modes that you can set through
the Interface.Mode field. The Interface Mode fields set the corresponding bits
in the CSR. To display the board mode fields, type
29-14
Shared Memory Structure Reference
>> node.Interface.Mode
ans =
NetworkCommunicationsMode: 'TransmitReceive'
InsertNode: 'on'
DisableFiberOpticLoopback: 'on'
EnableWireLoopback: 'off'
DisableHostToMemoryWrite: 'off'
WriteOwnSlotEnable: 'off'
MessageLengthLimit: '256'
VariableLengthMessagesOnNetwork: 'off'
HIPROEnable: 'off'
MultipleMessages: 'on'
NoNetworkErrorCorrection: 'on'
MechanicalSwitchOverride: 'on'
DisableHoldoff: 'on'
29-15
29 Systran
Board Timeout
The SCRAMNet+ SC150 board allows you to set the network timeout through
the Interface.Timeout field. The Interface Timeout fields set the
corresponding bits in the CSR.
To display the timeout fields, type
>> node.Interface.Timeout
ans =
NumOfNodesInRing: '2'
TotalCableLengthInM: '2'
29-16
Shared Memory Structure Reference
>>
These fields have the following values:
29-17
29 Systran
Virtual Paging
The SCRAMNet+ SC150 board allows you to set the bits of the Virtual Paging
Register operation through the Interface.VirtualPaging field. The Interface
VirtualPaging fields set the corresponding bits in the CSR.
>> node.Interface.VirtualPaging
ans =
VirtualPagingEnable: 'off'
VirtualPageNumber: '0'
Board Interrupts
The SCRAMNet+ SC150 board allows you to specify the interrupt sources
transmitted and received between the nodes of the network. You can set these
bits through the Interface.Interrupts field. The Interface Interrupts fields
set the corresponding bits in the CSR.
>> node.Interface.Interrupts
ans =
HostInterrupt: 'off'
InterruptOnMemoryMaskMatch: 'off'
OverrideReceiveInterrupt: 'off'
InterruptOnError: 'off'
NetworkInterrupt: 'off'
OverrideTransmitInterrupt: 'off'
InterruptOnOwnSlot: 'off'
ReceiveInterruptOverride: 'off'
>>
29-18
Shared Memory Structure Reference
29-19
29 Systran
29-20
30
United Electronic
Industries (UEI)
This chapter describes the groups of boards supported by xPC target (http://www.ueidaq.com).
Grouping the UEI Boards (p. 30-4) Explanation of the grouping of the UEI boards
PD2-MF 12-Bit Series (p. 30-13) 16 or 64 single or 8 or 32 differential analog input (A/D)
channels (12-bit) with a maximum sample rate of
1.25MHz. The gain varies from 1 to 8 or 1 to 1000. The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PD2-MF 14-Bit Series (p. 30-23) 16 or 64 single or 8 or 32 differential analog input (A/D)
channels (14-bit). The gain varies from 1 to 8 or 1 to 1000.
The boards also have 2 analog output (D/A) channels
(12-bit), 16 digital input lines, and 16 digital output lines.
PD2-MF 16-Bit Series (p. 30-33) 16 or 64 single or 8 or 32 differential analog input (A/D)
channels (16-bit). The gain varies from 1 to 8 or 1 to 1000.
The boards also have 2 analog output (D/A) channels
(12-bit), 16 digital input, and 16 digital output lines.
PD2-MFS 12-Bit Series (p. 30-43) 4 or 8 single analog input (A/D) channels (12-bit). The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PD2-MFS 14-Bit Series (p. 30-53) 4 or 8 single analog input (A/D) channels (14-bit). The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PD2-MFS 16-Bit Series (p. 30-63) 4 or 8 single analog input (A/D) channels (16-bit). The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
30 United Electronic Industries (UEI)
PDXI-MF 12-Bit Series (p. 30-73) 16 or 64 single or 8 or 32 differential analog input (A/D)
channels (12-bit) with a maximum sample rate of
1.25MHz. The gain varies from 1 to 8 or 1 to 1000. The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PDXI-MF 14-Bit Series (p. 30-83) 16 or 64 single or 8 or 32 differential analog input (A/D)
channels (14-bit). The boards also have 2 analog output
(D/A) channels (12-bit), 16 digital input, and 16 digital
output lines.
PDXI-MF 16-Bit Series (p. 30-93) 16 or 64 single or 8 or 32 differential analog input (A/D)
channels (16-bit). The boards also have 2 analog output
(D/A) channels (12-bit), 16 digital input, and 16 digital
output lines.
PDXI-MFS 12-Bit Series (p. 30-103) 4 or 8 single analog input (A/D) channels (12-bit). The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PDXI-MFS 14-Bit Series (p. 30-113) 4 or 8 single analog input (A/D) channels (14-bit). The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PDXI-MFS 16-Bit Series (p. 30-124) 4 or 8 single analog input (A/D) channels (16-bit). The
boards also have 2 analog output (D/A) channels (12-bit),
16 digital input, and 16 digital output lines.
PD2-AO Series (p. 30-134) 8, 16, or 32 analog output (D/A) channels (16-bit) with a
maximum sample rate of 100 kHz per channel. They also
have 8 digital input and 8 digital output lines.
PD2-DIO-64 (p. 30-139) 64 digital I/O channels in 16-bit ports, three
counters/timers, two enhanced synchronous serial
interface (ESSI) ports, and four high-speed (100 ns) IRQ
lines.
PD2-DIO-128 (p. 30-143) 128 digital I/O channels in 16-bit ports, three
counters/timers, two enhanced synchronous serial
interface (ESSI) ports, and four high-speed (100 ns) IRQ
lines.
30-2
PD2-DIO-128i (p. 30-146) 64 optoisolated digital input and 64 optoisolated digital
output ports in 16-bit ports.
PDL-DIO-64 (p. 30-149) Lab boards with 64 digital I/O channels in 16-bit ports,
three counters/timers, two enhanced synchronous serial
interface (ESSI) ports, and four high-speed (100 ns) IRQ
lines.
PDXI-DIO-64 (p. 30-153) 64 digital I/O channels in 16-bit ports, three
counters/timers, two enhanced synchronous serial
interface (ESSI) ports, and four high-speed (100 ns) IRQ
lines.
PDXI-AO Series (p. 30-157) 8, 16, or 32 analog output (D/A) channels (16 bit) with a
maximum sampling rate of 100 kHz per channel. They
also have 8 digital input lines, and 8 digital output lines.
30-3
30 United Electronic Industries (UEI)
• Form Factor — The form factor can be one of two things. PD2 denotes a
32-bit, 33-MHz PCI bus board. PDXI indicates a 32-bit, 33-MHz PXI/PCI bus
board.
• Board Type — The board type can be one of three things. MF indicates a
multifunction board. MFS indicates a multifunction board with sample and
hold. AO indicates an analog output board.
• Channel — For MF and MFS board types, the channel is the number of
analog input channels. For AO board types, the channel is the number of
analog output channels.
• Speed — The speed is the number of samples per second supported by the
board.
• Resolution — For MF and MFS boards, the Resolution is the analog input
resolution. For AO board types, the Resolution is the analog output
resolution.
• Gain — Gain is denoted by letters that represent ranges. DG indicates a gain
of 1, 2, 5, or 10. L indicates a range of 1, 10, 100, or 1000. H indicates a range
of 1, 2, 4, or 8.
30-4
Grouping the UEI Boards
30-5
30 United Electronic Industries (UEI)
In frame-based mode, the boards for these driver blocks send interrupts to xPC
Target. The xPC Target model is executed when each frame completes on the
board. For proper use of the UEI frame driver blocks, note the IRQ values for
each UEI board in the model and configure those boards appropriately with the
model Configuration Parameters dialog. The topics in this section describe
• “Notes on Master and Slave Boards” on page 30-6 — Note the listed master
and slave boards usage notes.
• “Interrupt Numbers” on page 30-7 — Look for and note the correct UEI
board IRQ number. You use the number that the target machine BIOS
assigns.
• “Interrupt Configuration” on page 30-9 — Configure the model with the
correct UEI board IRQ number using the model simulation parameters
dialog.
• “Example Models” on page 30-11 — Refer to the example UEI frame model
examples in the xpcdemos directory.
• You should set the slowest board as the master. If you do not want to use the
slowest board as the master, you can explicitly set the Acquisition
frequency parameter of the master board driver block to one that enables
the slowest board in the configuration to work. You can derive the maximum
speed of the board from the board name.
• Slave boards do not need to be identical to the master board.
30-6
Analog Input Frame Driver Blocks
• In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
• The number of channels in use on the master does not need to be the same
as those used on any of the slave boards.
• Connect the master and its slave(s) with the J6 connectors on the boards and
the appropriate cables. This ensures that the acquisition clock and the scan
clock from the master board is sent to all slave boards.
• The number of slaves you can have is limited by the number of connection
points available on the cable and the availability of PCI slots.
Interrupt Numbers
This topic describes how you determine the interrupt number to which the
board is set. The methods vary depending on your hardware configuration.
This topic includes
• “Single UEI Board” on page 30-8 — How to use getxpcpci to get information
about the PCI devices installed on the target machine. This method works if
you have one UEI board in your system. The target machine BIOS assigns
the IRQ number.
• “Guidelines for Multiple UEI Boards” on page 30-8 — How to get information
about the PCI devices if you have two or more UEI boards configured in a
master/slave configuration. This is an iterative method that requires you to
reboot the target machine with the insertion of each UEI board.
Note To ensure that the PCI BIOS sets up the plugged-in PCI cards
properly, disable (set to No) the Plug-and-Play (PnP) operating system feature.
The xPC Target kernel is not a PnP operating system; you must ensure that
this feature is disabled or PCI devices will not work on xPC Target.
30-7
30 United Electronic Industries (UEI)
4 Compare this board’s IRQ number with the Ethernet Controller IRQ
number, also listed in the getxpcpci display.
These numbers should not be the same. If they are, move the UEI board to
another slot and reboot the target machine.
5 Assuming a unique IRQ UEI board number, note the IRQ, bus, and slot
number for the UEI board.
Once you know your UEI board and its IRQ number, go to “Interrupt
Configuration” on page 30-9 for further configuration details.
4 Note the bus and slot information for the board you just installed.
5 Repeat Steps 1 to 4 for each UEI board you want in your configuration.
30-8
Analog Input Frame Driver Blocks
6 Note the IRQ for the UEI board you designate as the master after you install
all the boards.
7 Check this board’s IRQ number with the Ethernet Controller IRQ number,
also listed in the getxpcpci display.
These numbers should not be the same. If they are, move the master UEI
board to another slot, reboot the target machine, and check the master IRQ
number again. Ignore the slave board IRQ numbers.
8 Assuming a unique IRQ UEI board number, note the IRQ, bus, and slot
number for the UEI board.
Once you know the bus and slot information for the UEI boards, and the
master’s IRQ number, go to “Interrupt Configuration” on page 30-9 for further
configuration details.
Interrupt Configuration
After you add a frame block to a model, use the following procedures to set the
simulation parameters to use the interrupt from the UEI board rather than the
timer interrupt when running the model. This section assumes that you know
the appropriate IRQ numbers for the boards you are configuring. If you do not,
see “Interrupt Numbers” on page 30-7.
This topic includes
• “Simulation Parameters” on page 30-9 — If the UEI A/D frame block is not
in a Function-Call Subsystem called from an IRQ Source block, use this
procedure.
• “IRQ Source Block” on page 30-10 — If the UEI A/D frame block is in a
Function-Call Subsystem called from an IRQ Source block, use this
procedure.
Simulation Parameters
If the UEI A/D frame block is not in a Function-Call Subsystem called from an
IRQ Source block,
30-9
30 United Electronic Industries (UEI)
3 In the Target selection section, from the RTW system target file list,
browse to and select xpctarget.tlc.
4 In the xPC Target options node, from the Real-time interrupt source list,
select the IRQ number you have jumpered on the board.
Note This number must not match the IRQ number for the Ethernet
controller.
5 In the same node, from the I/O board generating the interrupt list, select
the value UEI-MFx. This specifies that the UEI MFx board generates the
interrupt.
6 In the same node, for the PCI slot/ISA base address parameter, enter the
same PCI address as for the UEI MFx Frame block PCI slot parameter.
- Only enter -1 (for autodetection) if this is the only UEI board in the target
system.
- If more than one UEI board is or will be in the target system, enter the bus
and slot number using the format [bus, slot].
2 From the IRQ line number list, select the IRQ number.
3 From the I/O board generating the interrupt list, select the value UEI-MFx.
This specifies that a UEI MFx board generates the interrupt.
30-10
Analog Input Frame Driver Blocks
Note This number must not match the IRQ number for the Ethernet
controller.
4 For the PCI slot parameter, enter the same PCI address as for the UEI MFx
Frame block PCI slot parameter.
- Only enter -1 (for autodetection) if this is the only UEI board in the target
system.
- If more than one UEI board is or will be in the target system, enter the bus
and slot number using the format [bus, slot].
5 Click OK.
6 Repeat this procedure for each IRQ Source block calling separate
subsystems.
Example Models
Example models that illustrate the use of UEI frame driver blocks are in the
xpcdemos directory. Correct operation of these models requires that the
interrupt source be set correctly in the simulation parameters dialog.
Note that these examples use the UEI PD2-MF-16-333/16H driver block.
Replace the block as appropriate for your target system.
30-11
30 United Electronic Industries (UEI)
Note Even if the frame time at which the board runs is set to the same time
as the model sample time, because the times derive from different sources
they will drift relative to each other.
30-12
PD2-MF 12-Bit Series
Board Characteristics
Board type PD2-MF-16-1M/12L
PD2-MF-16-1M/12H
PD2-MF-64-1M/12L
PD2-MF-64-1M/12H
Manufacturer United Electronic Industries (UEI)
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-13
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-14
PD2-MF 12-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-15
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Input coupling mode — From the list, select one from the following list of
input coupling modes:
30-16
PD2-MF 12-Bit Series
• Single Ended
• Differential
Refer to the UEI PowerDAQ documentation for input connections.
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 512. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 256.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
30-17
30 United Electronic Industries (UEI)
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
30-18
PD2-MF 12-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
30-19
30 United Electronic Industries (UEI)
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-20
PD2-MF 12-Bit Series
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
30-21
30 United Electronic Industries (UEI)
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-22
PD2-MF 14-Bit Series
Board Characteristics
Board type PD2-MF-16-400/14L
PD2-MF-16-400/14H
PD2-MF-64-400/14L
PD2-MF-64-400/14H
PD2-MF-16-2M/14H
PD2-MF-64-2M/14H
Manufacturer United Electronic Industries (UEI)
Bus type PCI, ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-23
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-24
PD2-MF 14-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
30-25
30 United Electronic Industries (UEI)
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Input coupling mode — From the list, select one from the following list of
input coupling modes:
• Single Ended
• Differential
30-26
PD2-MF 14-Bit Series
For example, if you specify two channels, the frame size must be less than or
equal to 256.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
30-27
30 United Electronic Industries (UEI)
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
30-28
PD2-MF 14-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
30-29
30 United Electronic Industries (UEI)
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
30-30
PD2-MF 14-Bit Series
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
30-31
30 United Electronic Industries (UEI)
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-32
PD2-MF 16-Bit Series
Board Characteristics
Board type PD2-MF-16-50/16H
PD2-MF-16-333/16L
PD2-MF-16-333/16H
PD2-MF-64-333/16L
PD2-MF-64-333/16H
PD2-MF-16-500/16L
PD2-MF-16-500/16H
PD2-MF-64-500/16L
PD2-MF-64-500/16H
Manufacturer United Electronic Industries (UEI)
Bus type PCI, ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-33
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-34
PD2-MF 16-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-35
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Input coupling mode — From the list, select one from the following list of
input coupling modes:
30-36
PD2-MF 16-Bit Series
• Single Ended
• Differential
Refer to the UEI PowerDAQ documentation for input connections.
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 512. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 256.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
30-37
30 United Electronic Industries (UEI)
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
30-38
PD2-MF 16-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
30-39
30 United Electronic Industries (UEI)
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
30-40
PD2-MF 16-Bit Series
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
30-41
30 United Electronic Industries (UEI)
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-42
PD2-MFS 12-Bit Series
Board Characteristics
Board type PD2-MFS-4-1M/12
PD2-MFS-4-1M/12DG
PD2-MFS-8-1M/12
PD2-MFS-8-1M/12DG
Manufacturer United Electronic Industries (UEI)
Bus type PCI, ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-43
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-44
PD2-MFS 12-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type:
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
30-45
30 United Electronic Industries (UEI)
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
30-46
PD2-MFS 12-Bit Series
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
30-47
30 United Electronic Industries (UEI)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-48
PD2-MFS 12-Bit Series
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-49
30 United Electronic Industries (UEI)
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-50
PD2-MFS 12-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
30-51
30 United Electronic Industries (UEI)
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-52
PD2-MFS 14-Bit Series
Board Characteristics
Board type PD2-MFS-4-500/14
PD2-MFS-4-500/14DG
PD2-MFS-8-500/14
PD2-MFS-8-500/14DG
PD2-MFS-4-800/14
PD2-MFS-4-800/14DG
PD2-MFS-8-800/14
PD2-MFS-8-800/14DG
PD2-MFS-4-2M/14
PD2-MFS-4-2M/14DG
PD2-MFS-8-2M/14
PD2-MFS-8-2M/14DG
Manufacturer United Electronic Industries (UEI)
Bus type PCI, ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-53
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-54
PD2-MFS 14-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-55
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
30-56
PD2-MFS 14-Bit Series
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
30-57
30 United Electronic Industries (UEI)
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-58
PD2-MFS 14-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-59
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-60
PD2-MFS 14-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
30-61
30 United Electronic Industries (UEI)
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-62
PD2-MFS 16-Bit Series
Board Characteristics
Board type PD2-MFS-4-300/16
PD2-MFS-4-300/16DG
PD2-MFS-8-300/16
PD2-MFS-8-300/16DG
PD2-MFS-4-500/16
PD2-MFS-4-500/16DG
PD2-MFS-8-500/16
PD2-MFS-8-500/16DG
Manufacturer United Electronic Industries (UEI)
Bus type PCI, ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-63
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-64
PD2-MFS 16-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-65
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
30-66
PD2-MFS 16-Bit Series
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
30-67
30 United Electronic Industries (UEI)
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-68
PD2-MFS 16-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-69
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-70
PD2-MFS 16-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
30-71
30 United Electronic Industries (UEI)
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-72
PDXI-MF 12-Bit Series
Board Characteristics
Board type PDXI-MF-16-1M/12L
PDXI-MF-16-1M/12H
PDXI-MF-64-1M/12L
PDXI-MF-64-1M/12H
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-73
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-74
PDXI-MF 12-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-75
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Input coupling mode — From the list, select one from the following list of
input coupling modes:
30-76
PDXI-MF 12-Bit Series
• Single Ended
• Differential
Refer to the UEI PowerDAQ documentation for input connections.
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
30-77
30 United Electronic Industries (UEI)
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
30-78
PDXI-MF 12-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, or 32 depending on the specific board type. For all other boards series
the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
30-79
30 United Electronic Industries (UEI)
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
30-80
PDXI-MF 12-Bit Series
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
30-81
30 United Electronic Industries (UEI)
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-82
PDXI-MF 14-Bit Series
Board Characteristics
Board type PDXI-MF-16-400/14L
PDXI-MF-16-400/14H
PDXI-MF-64-400/14L
PDXI-MF-64-400/14H
PDXI-MF-16-2M/14H
PDXI-MF-64-2M/14H
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-83
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-84
PDXI-MF 14-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-85
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Input coupling mode — From the list, select one from the following list of
input coupling modes:
30-86
PDXI-MF 14-Bit Series
• Single Ended
• Differential
Refer to the UEI PowerDAQ documentation for input connections.
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
30-87
30 United Electronic Industries (UEI)
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
30-88
PDXI-MF 14-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, or 32 depending on the specific board type. For all other boards series
the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
30-89
30 United Electronic Industries (UEI)
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
30-90
PDXI-MF 14-Bit Series
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
30-91
30 United Electronic Industries (UEI)
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-92
PDXI-MF 16-Bit Series
Board Characteristics
Board type PDXI-MF-16-333/16L
PDXI-MF-16-333/16H
PDXI-MF-64-333/16L
PDXI-MF-64-333/16H
PDXI-MF-16-500/16L
PDXI-MF-16-500/16H
PDXI-MF-64-500/16L
PDXI-MF-64-500/16H
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-93
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-94
PDXI-MF 16-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-95
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Input coupling mode — From the list, select one from the following list of
input coupling modes:
30-96
PDXI-MF 16-Bit Series
• Single Ended
• Differential
Refer to the UEI PowerDAQ documentation for input connections.
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
30-97
30 United Electronic Industries (UEI)
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
30-98
PDXI-MF 16-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, or 32 depending on the specific board type. For all other boards series
the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
30-99
30 United Electronic Industries (UEI)
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
30-100
PDXI-MF 16-Bit Series
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
30-101
30 United Electronic Industries (UEI)
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-102
PDXI-MFS 12-Bit Series
Board Characteristics
Board type PDXI-MFS-4-1M/12
PDXI-MFS-4-1M/12DG
PDXI-MFS-8-1M/12
PDXI-MFS-8-1M/12DG
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-103
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-104
PDXI-MFS 12-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-105
30 United Electronic Industries (UEI)
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
30-106
PDXI-MFS 12-Bit Series
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
30-107
30 United Electronic Industries (UEI)
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-108
PDXI-MFS 12-Bit Series
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, or 32 depending on the specific board type. For all other boards series
the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
30-109
30 United Electronic Industries (UEI)
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-110
PDXI-MFS 12-Bit Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
30-111
30 United Electronic Industries (UEI)
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-112
PDXI-MFS 14-Bit Series
30-113
30 United Electronic Industries (UEI)
Board Characteristics
Board type PDXI-MFS-4-500/14
PDXI-MFS-4-500/14DG
PDXI-MFS-8-500/14
PDXI-MFS-8-500/14DG
PDXI-MFS-4-800/14
PDXI-MFS-4-800/14DG
PDXI-MFS-8-800/14
PDXI-MFS-8-800/14DG
PDXI-MFS-4-2M/14
PDXI-MFS-4-2M/14DG
PDXI-MFS-4-2M/14H
PDXI-MFS-8-2M/14
PDXI-MFS-8-2M/14DG
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
30-114
PDXI-MFS 14-Bit Series
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-115
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
30-116
PDXI-MFS 14-Bit Series
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
30-117
30 United Electronic Industries (UEI)
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
30-118
PDXI-MFS 14-Bit Series
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-119
30 United Electronic Industries (UEI)
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, or 32 depending on the specific board type. For all other boards series
the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-120
PDXI-MFS 14-Bit Series
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-121
30 United Electronic Industries (UEI)
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
30-122
PDXI-MFS 14-Bit Series
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-123
30 United Electronic Industries (UEI)
Board Characteristics
Board type PDXI-MFS-4-300/16
PDXI-MFS-4-300/16DG
PDXI-MFS-8-300/16
PDXI-MFS-8-300/16DG
PDXI-MFS-4-500/16
PDXI-MFS-4-500/16DG
PDXI-MFS-8-500/16
PDXI-MFS-8-500/16DG
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-124
PDXI-MFS 16-Bit Series
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 4, 8, 16, or 64 depending on the board
type.
Gain vector — Enter a vector of numbers to select the gains for each of the
channels. Available gains vary depending on board type. MF PGL gains may
be set to 1, 10, 100, or 1000. MF PGH gains may be set to 1, 2, 4, or 8. MF
DG-option gains may be set to 1, 2, 5, or 10.
Mux settling time factor — This vector must be the same length as the
channel vector. It contains values of 0 or 1. If 1, the corresponding channel has
a longer settling time. This is useful when using a high gain such as 100 or
1000.
Range — Select the voltage range from the list provided. This applies to all
channels.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-125
30 United Electronic Industries (UEI)
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even though the board manufacturer numbers them beginning with 0.
The maximum allowable channel number is 4, 8, 16, or 64 depending on the
board type.
Gain vector — Enter a vector of numbers to specify the gains for each of the
channels in the scan. Enter a single value to use the same gain for all vectors
in the scan. Available gains vary depending on board type. Allowable values
depend on the board type.
• L (Low level) boards — Specify the gain as one of 1, 10, 100, or 1000.
• H (High level) boards — Specify the gain as one of 1, 2, 4, or 8.
• DG-option boards — Specify the gain as one of 1, 2, 5, or 10.
30-126
PDXI-MFS 16-Bit Series
Mux settling time vector (slow bit) — Enter a vector that is the same length
as the channel vector. Each vector element must be a 0 or 1. If you specify 1,
the corresponding channel has a longer settling time. To get an accurate
reading, you might want to specify a 1 for channels that have higher gains,
such as 100 or 1000. Refer to the UEI PowerDAQ documentation for further
information on the longer settling time. This time depends on the board type.
Caution With frame based acquisition, the additional time needed for the
Mux settling time vector (slow bit) value might cause an acquisition
overrun that xPC Target does not detect. For example, on a
PD2-MF-xx-333/16H board, each nonslow acquisition takes 3 microseconds. If
the slow bit is set to 1, that same acquisition takes more than 10
microseconds. With xPC Target, the scan is performed at the maximum rate
for a given board. This means that the slow acquisition takes a multiple of 3
microsecond ticks. For a PD2-MF-xx-333/16H board, this becomes 12
microseconds.
For example, assume that N scans of the channel vector compose a frame of
data. Assume also that you have a PD2-MF-xx-333/16H board with a Channel
vector value of [1 2 3 4] and a Mux settling time vector (slow bit) value of
[0 1 0 1]. For the PD2-MF-xx-333/16H board, two of the of the acquisition
delays are 3 microseconds, and two are 12 microseconds. With a Block
sampletime value of .001 second, if N is greater than 38, the data will not be
acceptable. If you set all slow bits to 0, N can have a value of up to 83. The
software detects the limit at N = 83, but is not aware of the extra board
dependent delay.
Range — From the list, select one of the following voltage ranges. The value
you select applies to all channels.
• +-10 Volts
• +-5 Volts
• 0-10 Volts
• 0-5 Volts
30-127
30 United Electronic Industries (UEI)
Frame size — Enter the number of samples per channel to return as a frame
of data. Due to constraints in the hardware architecture, the total number of
samples in a frame of data cannot exceed 1024. The relationship between the
number of samples, frame size, and number of channels is
total number of samples = FrameSize x nChannels
For example, if you specify two channels, the frame size must be less than or
equal to 512.
Output format — From the list, select either Frame or Vector.
• Frame — Select Frame if you expect the output signal from this block to be
the input signal for a block that requires a frame. For example, a Signal
Processing block.
• Vector — Select Vector if you expect the output signal from this block to be
the input signal for an xPC Target scope or some other block that requires
vector input.
Scan clock source — Select Internal or External to identify the clock source
for the frame scans.
Scan time — Enter the time (in seconds) between scans as the interval.
Frame time — Enter the interval (in seconds) during which the board will
interrupt. The driver block evenly spaces the scans in the frame across the
Frame time interval. If the Frame time interval is too short, you will receive
a buffer overrun error at run time. For optimal results, experimentally increase
the Frame time value and reiterate the process. Always rebuild the model
when you change this value.
The Frame size, Scan time, and Frame time parameters are not independent,
but are related by
Note Because xPC Target uses this value to set hardware parameters on the
board, you cannot change the Frame time value at the MATLAB prompt.
30-128
PDXI-MFS 16-Bit Series
Block is in an ISR — Select this check box if the block is in an interrupt service
routine (ISR). Selecting this check box forces the block sample time to -1, which
enables the block to work in the ISR. If this check box is not selected, the block
sample time is equal to the value of Frame time.
Slave board — If you have multiple boards configured in a master/slave
combination, select this box for the slave boards only. Leave the box unchecked
for the master board. (Note that a single board configuration is considered a
master board.)
Note In the model, set the priority of slave blocks higher than master blocks.
Right-click the slave or master block and select Block Properties. In the
dialog, enter a value in the Priority property. For example, if you have
multiple slave blocks, you can enter values of 2 for the slave blocks and 3 for
the master block, where a lower number indicates a higher priority.
Acquisition frequency — Enter the rate at which the high speed conversion
clock runs. This is the clock used to acquire each scan in a frame. For example,
with a PD2-MF-xx-333/16H board, the maximum clock is 333 kHz. At that rate,
the second channel in a scan will be acquired 3 microseconds after the first one
in every scan of the frame.
Specify -1 to select the maximum rate available for the specified board.
DMA burst size — From the list, select either 32, 16, or 8. The DMA engine
transfers data in packets of the burst size or less. Between each burst, a new
bus arbitration cycle must complete. The best performance is achieved with
higher DMA burst size values, with 32 being highest. However, in some
architectures and with some PCI bus adaptors, a DMA burst size of 32 might
cause problems. For example, it might lock up the target machine when DMA
is attempted. In these cases, reduce the DMA burst size value to 8, rebuild and
rerun the target application. If the DMA works at 8, select 16 to increase
performance and try again.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-129
30 United Electronic Industries (UEI)
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
volts Double 1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, or 32 depending on the specific board type. For all other boards series
the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
30-130
PDXI-MFS 16-Bit Series
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-131
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
30-132
PDXI-MFS 16-Bit Series
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-133
30 United Electronic Industries (UEI)
PD2-AO Series
The PD2-AO series boards have 8, 16, 32, or 96 analog output (D/A) channels
(16-bit) with a maximum sample rate of 100 kHz per channel. They also have
8 digital input and 8 digital output lines.
xPC Target supports this series of boards with these driver blocks:
Board Characteristics
Board type PD2-AO-8/16
PD2-AO-16/16
PD2-AO-32/16
PD2-AO-96/16
Manufacturer United Electronic Industries (UEI)
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
30-134
PD2-AO Series
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO series boards is 8, 16, 32, or
96 depending on the specific board type.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-135
30 United Electronic Industries (UEI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-136
PD2-AO Series
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-137
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-138
PD2-DIO-64
PD2-DIO-64
The PD2-DIO-64 series PCI boards have 64 digital I/O channels in 16-bit ports,
three counters/timers, two enhanced synchronous serial interface (ESSI) ports,
and four high-speed (100 ns) IRQ lines.
xPC Target supports this series of boards with these driver blocks:
xPC Target only supports the digital I/O channels for this board series. It does
not support the additional functionality.
Board Characteristics
Board type PD2-DIO-64
PD2-DIO-64ST
PD2-DIO-64CT
PD2-DIO-64TS
Manufacturer United Electronic Industries (UEI)
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-139
30 United Electronic Industries (UEI)
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-140
PD2-DIO-64
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. This
parameter contains values of 0 or 1. It controls the behavior at model
termination. A value of 1 causes the corresponding channel to be reset to the
value specified in the initial value vector. A value of 0 causes the channel to
remain at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the digital output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels. This parameter contains the initial values (0 or 1) for the
output channels. The channels are set to these values between the time the
model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-141
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-142
PD2-DIO-128
PD2-DIO-128
The PD2-DIO-128 series PCI boards have 128 digital I/O channels in 16-bit
ports, three counters/timers, two enhanced synchronous serial interface (ESSI)
ports, and four high-speed (100 ns) IRQ lines.
xPC Target supports this series of boards with these driver blocks:
xPC Target only supports the digital I/O channels for this board series. It does
not support the additional functionality.
Board Characteristics
Board type PD2-DIO-128
PD2-DIO-128ST
Manufacturer United Electronic Industries (UEI)
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-143
30 United Electronic Industries (UEI)
Port (first channel of port) — From the list, select the first channel of the
port. Each port is 16 bits. This value plus the Channel vector value appear on
the terminal block.
Channel vector — Enter a vector of numbers to specify the input channels. For
example, to use the first and third digital input channels, enter
[1 3]
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-144
PD2-DIO-128
Port (first channel of port) — From the list, select the first channel of the
port. Each port is 16 bits. This value and the Channel vector value appear on
the terminal block.
Channel vector — Enter a vector of numbers to specify the output channels.
For example, to use the first and third digital output channels, enter
[1 3]
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. This
parameter contains values of 0 or 1. It controls the behavior at model
termination. A value of 1 causes the corresponding channel to be reset to the
value specified in the initial value vector. A value of 0 causes the channel to
remain at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the digital output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels. This parameter contains the initial values (0 or 1) for the
output channels. The channels are set to these values between the time the
model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-145
30 United Electronic Industries (UEI)
PD2-DIO-128i
The PD2-DIO-128i series PCI boards have 64 optoisolated digital input and 64
optoisolated digital output ports in 16-bit ports.
xPC Target supports this series of boards with these driver blocks:
Board Characteristics
Board type PD2-DIO-128i
Manufacturer United Electronic Industries (UEI)
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-146
PD2-DIO-128i
Channel vector — Enter a vector of numbers to specify the input channels. For
example, to use the first and third digital input channels, enter
[1 3]
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-147
30 United Electronic Industries (UEI)
The input and output ports on the PD2-DIO-128i are completely separate.
There is no conflict if you use the same port numbers as input and output.
Channel vector — Enter a vector of numbers to specify the output channels.
For example, to use the first and third digital output channels, enter
[1 3]
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. This
parameter contains values of 0 or 1. It controls the behavior at model
termination. A value of 1 causes the corresponding channel to be reset to the
value specified in the initial value vector. A value of 0 causes the channel to
remain at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the digital output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels. This parameter contains the initial values (0 or 1) for the
output channels. The channels are set to these values between the time the
model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-148
PDL-DIO-64
PDL-DIO-64
The PDL-DIO-64 series PCI lab boards have 64 digital I/O channels in 16-bit
ports, three counters/timers, two enhanced synchronous serial interface (ESSI)
ports, and four high-speed (100 ns) IRQ lines.
xPC Target supports this series of boards with these driver blocks:
xPC Target only supports the digital I/O channels for this board series. It does
not support the additional functionality.
Board Characteristics
Board type PDL-DIO-64
PDL-DIO-64ST
PDL-DIO-64CT
PDL-DIO-64TS
Manufacturer United Electronic Industries (UEI)
Bus type PCI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-149
30 United Electronic Industries (UEI)
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-150
PDL-DIO-64
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. This
parameter contains values of 0 or 1. It controls the behavior at model
termination. A value of 1 causes the corresponding channel to be reset to the
value specified in the initial value vector. A value of 0 causes the channel to
remain at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the digital output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels. This parameter contains the initial values (0 or 1) for the
output channels. The channels are set to these values between the time the
model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-151
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-152
PDXI-DIO-64
PDXI-DIO-64
The PDXI-DIO-64 series PXI boards have 64 digital I/O channels in 16-bit
ports, three counters/timers, two enhanced synchronous serial interface (ESSI)
ports, and four high-speed (100 ns) IRQ lines.
xPC Target supports this series of boards with these driver blocks:
xPC Target only supports the digital I/O channels for this board series. It does
not support the additional functionality.
Board Characteristics
Board type PDXI-DIO-64
PDXI-DIO-64ST
PDXI-DIO-64CT
PDXI-DIO-64TS
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
30-153
30 United Electronic Industries (UEI)
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-154
PDXI-DIO-64
The channel numbers can occur in any order. Number the channels beginning
with 0, which is the same as the hardware label.
Reset vector — The reset vector controls the behavior of the channel at model
termination. Enter a scalar or a vector that is the same length as the channel
vector. If you specify a scalar value, that setting is used for all channels. This
parameter contains values of 0 or 1. It controls the behavior at model
termination. A value of 1 causes the corresponding channel to be reset to the
value specified in the initial value vector. A value of 0 causes the channel to
remain at the last value attained while the model was running.
Initial value vector — The initial value vector contains the initial voltage
values for the digital output channels. Enter a scalar or a vector that is the
same length as the channel vector. If you specify a scalar value, that setting is
used for all channels. This parameter contains the initial values (0 or 1) for the
output channels. The channels are set to these values between the time the
model is downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-155
30 United Electronic Industries (UEI)
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-156
PDXI-AO Series
PDXI-AO Series
The PDXI-AO series boards have 8, 16, or 32 analog output (D/A) channels (16
bit) with a maximum sampling rate of 100 kHz per channel. They also have 8
digital input lines, and 8 digital output lines.
xPC Target supports this series of boards with these driver blocks:
Board Characteristics
Board type PDXI-AO-8/16
PDXI-AO-16/16
PDXI-AO-32/16
PDXI-AO-96/16
Manufacturer United Electronic Industries (UEI)
Bus type CompactPCI, PXI
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
30-157
30 United Electronic Industries (UEI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number for PD2-AO and PDXI-AO series boards
is 8, 16, 32, or 96 depending on the specific board type. For all other boards
series the maximum channel number is 2.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector and should contain the initial voltage values for the output
channels. The channels are set to these values between the time the model is
downloaded and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-158
PDXI-AO Series
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all boards except for the PD2-AO
and PDXI-AO series. For those boards, the maximum channel number is 8.
Sample time — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-159
30 United Electronic Industries (UEI)
The channel numbers can occur in any order. Number the channels beginning
with 1 even if the board manufacturer numbers them beginning with 0. The
maximum allowable channel number is 16 for all board types except for the
PD2-AO and PDXI-AO series. For those boards, the maximum channel number
is 8.
Reset vector — The reset vector must be the same length as the channel
vector. It contains values of 0 or 1. This parameter controls the behavior at
model termination. A value of 1 causes the corresponding channel to be reset
to the value specified in the initial value vector. A value of 0 causes the channel
to remain at the last value attained while the model was running.
Initial value vector — The initial value vector must be the same length as the
channel vector. It contains the initial values (0 or 1) for the output channels.
The channels are set to these values between the time the model is downloaded
and the time it is started.
Sample time — Enter the base sample time or a multiple of the base sample
time.
30-160
PDXI-AO Series
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
30-161
30 United Electronic Industries (UEI)
30-162
31
xPC Target Support for
Vector CANape
xPC Target interfaces the target PC to the Vector CAN Application Environment (CANape)
(http://www.vector-cantech.com) using the Universal Calibration Protocol (XCP). This chapter
includes the following sections
Vector CANape (p. 31-2) Third-party monitoring system that you can use to work
with xPC Target data.
Configuring xPC Target and Vector How to set up the xPC Target system to work Vector
CANape (p. 31-5) CANape.
31 xPC Target Support for Vector CANape
Vector CANape
You can use a target PC as an electronic control unit (ECU) for a Vector
CANape system. Using a target PC in this way, a Vector CANape system can
read signals and parameters from a target application running on the target
PC. To support this feature, xPC Target provides an XCP protocol component.
The xPC Target XCP component translates XCP commands to standard xPC
Target equivalents.
Note This chapter describes how to configure xPC Target and Vector
CANape to work together. It also assumes that you are familiar with the
Vector CANape product family. See http://www.vector-cantech.com for
further information about the Vector CANape products.
xPC Target works with Vector CANape, Version 5.00.20 and 5.00.30. To enable
a target PC to work with Vector CANape, you need to
• Configure Vector CANape to use the xPC Target XCP communication layer.
• Enable xPC Target to generate a target application that can provide data
compliant with Vector CANape.
• Provide a standard RS-232 or TCP/IP physical layer between the host PC
and target PC.
To support the XCP communication layer, xPC Target provides
• An xPC Target XCP conversion library (xcpforxpc.dll) to convert the XCP
commands in the user-defined XCP communication layer to the
corresponding xPC Target commands.
• A generator that produces A2L files that Vector CANape can load into the
Vector CANape database. The generated file contains signal and parameter
access information for the target application.
The following illustrates how xPC Target and Vector CANape interact.
31-2
Vector CANape
xpcenv.mat xcpforxpc.dll
(defines communication parameters)
C API
xpcapi.dll
Host PC
RS-232 or Ethernet
Target PC Target PC
Running xPC Target
31-3
31 xPC Target Support for Vector CANape
31-4
Configuring xPC Target and Vector CANape
• “Getting Started” on page 31-5 — Set up your model to work with Vector
CANape.
• “Creating a new Vector CANape Project to Associate with a Particular
Target Application” on page 31-7 — Create a new Vector CANape and
associate that project with a particular target application
• “Associating an Existing Vector CANape Project with a Particular Target
PC” on page 31-9 — Associate an existing Vector CANape project with one
particular target PC
• “Providing A2L Files for Vector CANape Database” on page 31-10 — Provide
target application A2L files for a CANape database
Getting Started
Set up your model to work with Vector CANape. This procedures uses the
xpcosc model. This procedure assumes that you have already configured your
model to generate xPC Target code. If you have not done so, see the xPC Target
getting started documentation.
2 In the model Simulink window, and from the Simulation menu, click
Configuration Parameters.
31-5
31 xPC Target Support for Vector CANape
This enables target applications to generate data, such as that for A2L, for
Vector CANape.
The Real-Time Workshop pane should now look like the figure shown.
xPC Target builds the target application, including an A2L data file for the
target application.
Next, copy the XCP library files (two) into the CANape binary directory. These
files reside in the xPC Target directory area under the MATLAB install
location. Follow these instructions:
31-6
Configuring xPC Target and Vector CANape
1 Relative to the MATLAB root directory that you found with matlabroot,
change directory as follows
cd <MATLABroot>\toolbox\rtw\targets\xpc\api
1 In a DOS window, create a new directory to hold your project. This can be
the same directory as your xPC Target model files. For example, type
mkdir C:\MyProject
2 Start the Vector CANape Create a new Project wizard. The Windows Start
menu contains this as a selection in the Vector CANape section.
You can start the new project directly from the last screen of the create a
new project wizard. After the preliminary warning, the CANape window is
displayed.
6 In Device Name, enter a name for the device to describe your target
application. For example, type
31-7
31 xPC Target Support for Vector CANape
xPCTarget
7 Click Next
You might get an error concerning datatypes. This error message indicates
that you need to reapply the value 255 to the parameters MAX_CTO and
MAX_DTO.
12 Click OK.
13 In the Transport layer pane, from the Interface menu list of the, select
USER_DEFINED.
15 Browse and select the file xcpforxpc.dll from the CANape\Exec directory.
16 Click Open.
17 Click OK.
18 In the XCP driver settings window, verify the connection to the target PC by
clicking Test connection. This command only succeeds if the target PC is
31-8
Configuring xPC Target and Vector CANape
19 Click OK and answer Yes if you are asked to update your database.
20 You have completed the configuration of Vector CANape for xPC Target.
Continue with the rest of the Vector CANape wizard dialog as usual.
This CANape project should now be ready to monitor and control your xPC
Target. The CANape database should populated with a comprehensive list of
xPC Target application signals and parameters that are available. During
target revisions, it may be necessary to manually reload the A2L that is
generated by the xPC Target build process. This can be done from the CANape
Database editor.
Next, provide your target application A2L file to Vector CANape. See
“Providing A2L Files for Vector CANape Database” on page 31-10. If you want
to associate your Vector CANape project with a particular target PC, see
“Associating an Existing Vector CANape Project with a Particular Target PC”
on page 31-9.
• You are working with multiple target PCs from the same host computer.
• You are using a host computer that does not have an installed copy of
MATLAB and xPC Target.
• You have set up and built your model to generate data for Vector CANape. If
you have not yet done so, see “Getting Started” on page 31-5.
• You have an existing Vector CANape project directory
31-9
31 xPC Target Support for Vector CANape
4 If you are satisfied with these settings, copy the xPC Target configuration
file to the desired Vector CANape project directory. For example:
copy C:\WINNT\Profiles\smith\Application
Data\MathWorks\MATLAB\R14\xPCTargetPrefs C:\MyProject
To retrieve the actual path of xpcenv.mat, you can use the following
MATLAB command:
[prefdir '\xPCTargetPrefs']
The Vector CANape project now has a local copy of xpcenv.mat. It will always
connect to the same target PC, regardless of the state of MATLAB. Next, you
must provide your target application A2L file to Vector CANape. See
“Providing A2L Files for Vector CANape Database” on page 31-10.
• You have set up and built your model to generate data for Vector CANape. If
you have not yet done so, see “Getting Started” on page 31-5.
• You have created a Vector CANape project directory and know the name of
that project directory.
To enable Vector CANape to load the A2L file for the model xpcosc
1 In a DOS shell, change directory to the one that contains the A2L file from
the previous procedure. For example
31-10
Configuring xPC Target and Vector CANape
cd D:\work\xpc
2 Look for and copy the A2L file to your Vector CANape project directory. For
example
copy xpcosc.a2l C:\MyProject
Vector CANape automatically loads the target application A2L file when it
connects to the target PC.
31-11
31 xPC Target Support for Vector CANape
31-12
32
Versalogic
VSBC-6 (p. 32-2) A single board computer with 8 signal ended analog input
(A/D) channels, 16 digital I/O lines, and a watchdog
timer.
32 Versalogic
VSBC-6
The VSBC-6 is a single board computer with 8 signal ended analog input (A/D)
channels, 16 digital I/O lines, and a watchdog timer.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name VSBC-6
Manufacturer Versalogic
Bus type N/A
Access method N/A
Multiple block instance support Yes
Multiple board support No
Number the channels beginning with 1 even if the board manufacturer starts
numbering the channels with 0.
Range vector — Enter a range code for each of the channels in the channel
vector. The range vector must be the same length as the channel vector. This
driver allows each channel to be different.
32-2
VSBC-6
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0 to +5 5
For example, if the first channel is -10 to + 10 volts and the second and fifth
channels are 0 to +5 volts, enter
[-10,5,5]
Sample time — Model base sample time or a multiple of the base sample time.
Number the lines beginning with 1, even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
32-3
32 Versalogic
Number the lines beginning with 1, even if the board manufacturer starts
numbering the lines with 0.
Sample time — Enter the base sample time or a multiple of the base sample
time.
32-4
33
VMIC
This chapter describes the VMIC reflective shared memory board supported by xPC Target
(http://www.vmic.com).
VMICPCI-5565 (p. 33-6) High-speed fiber optic reflective PCI memory board
with 64 or 128 MBytes shared memory
33 VMIC
• “Create Shared Memory Partitions” on page 33-2 — Before you begin to use
VMIC shared memory blocks, define a partition structure that defines how
you want to allocate shared memory.
• “Initialize Shared Memory Nodes” on page 33-4 — Before you begin to use
VMIC shared memory blocks, define a node initialization structure that
defines how shared memory is allocated (partitioned) and how the board is
configured.
• 5565 read/write
• 5565 pack/unpack
After you define the shared memory partitions, you can add VMIC shared
memory driver blocks to your Simulink model. Create a shared memory
structure in one of the following ways. See “Shared Memory Partition
Structure” on page 33-11 for the complete list of fields for the structure.
The following description refers to the completepartitionstruct command.
Type
help completepartitionstruct
33-2
Before You Start
completepartitionstruct([],'5565')
ans =
Address: '0x0'
Type: 'uint32'
Size: '1'
Alignment: '4'
Internal: [1x1 struct]
- The Address field is optional. Only specify this field for the first segment
of a partition. The elements of a partition are defined as a continuous
memory block from the first address. The following segments extrapolate
their addresses from the first segment. If you have fragmented memory,
use multiple partitions and VMIC read/write blocks to work with the
memory.
- The Type and Size fields are required for all fields in the partition
structure.
33-3
33 VMIC
node =
33-4
Before You Start
33-5
33 VMIC
VMICPCI-5565
The VMICPCI-5565 is a high-speed fiber optic reflective memory. It can also
generate/broadcast interrupts. xPC Target uses this board as part of the
shared memory network that you can use to exchange data between computer
nodes.
xPC Target supports this board with these driver blocks:
For information about the Change endianess block, see “Byte Reversal/Change
Endianess Block” in Chapter 6.
Board Characteristics
Board name VMICPCI-5565
Manufacturer VMIC
Bus type PCI
Access method Memory mapped
Multiple block instance support Yes
Multiple board support Yes
5565 init
Driver Block Parameters
Before you begin to configure these block parameters, be sure that you have a
predefined node initialization structure. See “Initialize Shared Memory Nodes”
on page 33-4.
33-6
VMICPCI-5565
Each model that uses shared memory must have one 5565 init block for every
VMIC board in the system.
Node struct — Enter the name of the predefined node initialization structure.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
5565 read
Driver Block Parameters
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure. The 5565 read block requires this
structure to specify how Simulink signal values are mapped in the shared
memory. It also uses this structure to determine the total size and address of
the shared memory. See “Create Shared Memory Partitions” on page 33-2.
Partition struct — Enter the name of the predefined shared memory partition
structure. The block uses this structure to specify how Simulink signal values
map into shared memory.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
33-7
33 VMIC
If two or more boards of this type are physically present in the target PC, enter
the bus number and the PCI slot number of the board associated with this
driver block. Use the format [BusNumber, SlotNumber]. To determine the bus
number and the PCI slot number, type
getxpcpci
Error Status Port — Select this check box to monitor the status of the VMIC
board LISR register modes.
5565 write
Driver Block Parameters
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure. The 5565 write block requires this
structure to specify how Simulink signal values are mapped in the shared
memory. It also uses this structure to determine the total size and address of
the shared memory. See “Create Shared Memory Partitions” on page 33-2.
Partition struct — Enter the name of the predefined shared memory partition
structure. The block uses this structure to specify how Simulink signal values
map into shared memory.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
Error Status Port — Select this check box to monitor the status of the VMIC
board LISR register modes.
33-8
VMICPCI-5565
5565 pack
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure.
Memory partitions consist of groups of Simulink signals, which are combined
into blocks (packets) of 32 bit words. The 5565 pack block packs the specified
partition structure into an unstructured double word array vector by
converting one or more Simulink signals of varying data types into the vector.
Typically, the input to a pack block is the output from a write block. Simulink
is not aware of structures; you must pass the output of each structure segment
as input to the 5565 pack block.
This block ignores the Address field of the partition structure.
5565 unpack
Before you begin to configure this block, be sure that you have a predefined
shared memory partition structure.
The 5565 unpack block unpacks an unstructured double word array vector
(from the 5565 pack block) into the specified partition structure. This block
ignores the Address field of the partition structure.
5565 broadcast
The 5565 broadcast block generates a network interrupt that other boards in
the shared memory network can detect.
The 5565 broadcast block has two inputs:
• En — This input port is a Boolean input that can enable or disable the
transmission of a network interrupt. For continuous interrupts. connect this
input port to a Constant block with a Boolean value of true (1). If you want
33-9
33 VMIC
to enable interrupts only part of the time, you can use another kind of input,
such as a pulse generator.
• Data — This input port allows you to transmit a data value (uint32) with the
interrupt. Note that xPC Target does not support receiving this data value.
Sampletime — Enter the base sample time or a multiple of the base sample
time.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
33-10
Shared Memory Structure Reference
where:
33-11
33 VMIC
Partition Description
Fields
33-12
Shared Memory Structure Reference
Partition Description
Fields
where:
33-13
33 VMIC
Node Description
Structure
Fields
Board Mode
The VMIC board has a number of registers that you can set through the
Interface.Mode field. To display the board mode fields, type
>> node.Interface.Mode
ans =
StatusLEDOff: 'off'
TransmitterDisable: 'off'
DarkOnDarkEnable: 'off'
LoopbackEnable: 'off'
LocalParityEnable: 'off'
MemoryOffset: '0'
MemorySize: '64MByte'
33-14
Shared Memory Structure Reference
Note that mode values affect the VMIC board setting of the LSR1 (Local
Control and Status Register 1) and LIER (Local Interrupt Enable Register)
registers. Refer to the VMIC product documentation for further details on these
two registers. To monitor the status of these modes, select the Error Status
Port check box of the VMIC 5565 read or write block.
Of particular note are the following modes:
StatusLEDOff Turns the VMIC board status LED on and off. Setting
this value to 'off' turns off the LED when the xPC Target
model runs, setting this value to 'on' turns on the LED
when the xPC Target model runs. When the xPC Target
terminates, the LED status reverses in both cases. The
default value is 'off'.
MemoryOffset Applies a global offset to all network data transfers
coming from the VMIC board. The following table lists
offset values and the resulting offset. The default value
is '0'.
MemorySize Specifies the minimum memory size required. The VMIC
driver checks this value against the memory size of the
VMIC board. A VMIC board has a memory size of either
'64MByte' or '128MByte'. If you enter a size in this field
that is larger than the actual VMIC board memory size,
the driver will return an error. The default value is
'64MByte'.
'0' 0
'1' 0x4000000
33-15
33 VMIC
'2' 0x8000000
'3' 0xC000000
Board Interrupts
The VMIC board can generate PCI interrupts in response to network events
that have been broadcast from other nodes, or error conditions. For example,
you can configure two xPC Target Simulink models, one as master, and one as
a slave of the broadcast node in the master xPC Target model. In such a
configuration, the broadcast node interrupt triggers the model’s time steps.
To display the interrupt mode fields, type
>> node.Interface.Interrupts
ans =
LocalMemoryParity: 'off'
MemoryWriteInhibited: 'off'
LatchedSyncLoss: 'off'
RXFifoFull: 'off'
RXFifoAlmostFull: 'off'
BadData: 'off'
PendingInit: 'off'
RoguePacket: 'off'
ResetNodeRequest: 'off'
PendingInt3: 'off'
PendingInt2: 'off'
PendingInt1: 'off'
Each field corresponds to a bit in the LIER register of the VMIC board. Each
bit enables the specified interrupt source on the VMIC board. Refer to the
VMIC product documentation for further details on this register.
To enable a node to generate a network interrupt source, add the 5565
broadcast block to a model (for example, the master model). This block issues
network interrupts at the model sample rate. Correspondingly, to enable other
nodes of the network (for example, the slaves) to accept broadcast interrupts
from the model, configure the slave model to expect the broadcast interrupt.
33-16
Shared Memory Structure Reference
The following procedure describes how to configure an entire xPC Target model
to accept a broadcast interrupt from a VMIC board. See “5565 broadcast” on
page 33-9 for a description of the Interrupt parameter value that the xPC
Target model expects.
This command lists board information for all installed PCI devices that xPC
Target knows about.
This is the interrupt source number you need to specify in the xPC target
code generation options field in step 10 of the following procedure.
This line directs the model to expect an interrupt. It assumes that the value
of the 5565 broadcast block Interrupt parameter is 1.
4 From the MATLAB Command Window, type the name of your Simulink
model.
7 From the Category list, choose xPC Target code generation options.
10 Select the interrupt number to which the board is set (from step 2).
11 Click the I/O board generating the interrupt list and select VMIC-5565
from the list.
33-17
33 VMIC
12 Click OK.
Note If you have a larger model, and you want to localize control of the
interrupt within that model, use the IRQ Source block from the Asynchronous
Event sublibrary.
Board Node ID
The jumpers of the VMIC board specify the board node ID. Correspondingly,
you can also configure the VMIC block with the board node ID using the
Interface.NodeID field. Enter values according to the following:
NodeID Description
Value
'any' Allows the VMIC driver to work with any VMIC node
regardless of the VMIC board node ID jumper setting
value from Specifies the particular VMIC node that the driver must
'0' to look for. If this value does not match the jumpered value on
'255' the VMIC board, the driver returns an error.
The default value of 'any' suffices in most instances. However, you might want
to specify a particular NodeID value if you have multiple VMIC boards in your
system and you want to identify the driver for a particular node.
33-18
34
Miscellaneous Blocks
xPC Target Scope Block (p. 34-3) For information about this block, see “Adding an xPC
Target Scope Block” on page 3-16 and “Entering
Parameters for an xPC Target Scope Block” on page 3-20.
From xPC Target (p. 34-10) This block behaves like a source. This block creates and
controls an xPC Target scope object running on the target
PC.
To xPC Target (p. 34-12) The main purpose of this block is to write a new value to a
specific parameter on the target application while it is
running.
xPC Target From File (p. 34-14) Use the xPC Target From File block to read data from a
file on the target PC hard disk and distribute that data in
chunks every sample time.
xPC Target Software Reboot (p. 34-18) Use the Software Reboot block to reboot the target PC
when your simulation reaches a certain state.
I/O Port Read (p. 34-19) To access the address space reserved for I/O devices and
communicate directly to a device, xPC Target provides
the I/O Port Read and I/O Port Write blocks.
I/O Port Write (p. 34-21) To access the address space reserved for I/O devices and
communicate directly to a device, xPC Target provides
the I/O Port Read and I/O Port Write blocks.
xPC Target TET (p. 34-23) This block outputs the Task Execution Time (TET) in
seconds. Use the output of this block as an input to an xPC
Target Scope block.
34 Miscellaneous Blocks
xPC Target Time (p. 34-24) This block outputs the time in clock ticks that the kernel
has been executing.
Asynchronous Event Support (p. 34-25) xPC Target incudes support for asynchronous events.
These events are triggered by a hardware interrupt
asynchronously to normal execution
34-2
xPC Target Scope Block
If you have a scope type of Target and a scope mode of Numerical, the scope
block dialog adds a Numerical format box to the dialog. You can define the
display format for the data. If you choose not to complete the Numerical
format box, xPC Target displays the signal using the default format of %15.6f,
which is a floating point format, with no label.
34-3
34 Miscellaneous Blocks
Numerical format — If you have a scope type of Target and a scope mode of
Numerical, the scope block dialog adds a Numerical format box to the dialog.
Enter a label and associated numeric format type in which to display signals.
By default, the entry format is the floating point %15.6f. The Numerical
format box takes entries of the format:
'[LabelN] [%width.precisiontype] [LabelX]'
where:
LabelN is the label for the signal. You can use a different label for each signal
or the same label for each signal. This argument is optional.
width is the minimum number of characters to offset from the left of the screen
or label. This argument is optional.
precision is the maximum number of decimal points for the signal value. This
argument is optional.
type is the data type for the signal format. You can use one or more of the
following types:
Type Description
%f Floating point
LabelX is a second label for the signal. You can use a different label for each
signal or the same label for each signal. This argument is optional.
Enclose the contents of the Numerical format field in quotation marks.
For example
'Foo %15.2f end'
34-4
xPC Target Scope Block
For a whole integer signal value, enter 0 for the precision value. For example
'Foo1 %15.0f end'
For a multiple format entries, delimit each entry with a command and
surround the entire string with a pair of quotes. For example
'Foo2 %15.6f end,Foo3 %15.6f end2'
Y-Axis limits — Enter a row vector with two elements where the first element
is the lower limit of the y-axis and the second element is the upper limit. If you
enter 0 for both elements, then the scaling is set to auto. Note that this
parameter is only applicable for scopes of type Target and scope modes of type
Graphical redraw, Graphical sliding, and Graphical rolling.
34-5
34 Miscellaneous Blocks
Trigger mode — From the list, select either FreeRun, Software Triggering,
Signal Triggering, or Scope Triggering.
If you select Scope Triggering, then in the Trigger scope number box, enter
the scope number of a Scope block. If you use this trigger mode, you must also
add a second Scope block to your Simulink model. You do not need to specify
the Trigger signal.
If you want the scope to trigger on a specific sample of the other scope, enter a
value in the Sample to trigger on box. The default value is 0 and indicates that
the triggering scope and the triggered (current) scope start simultaneously. For
more information on this field, see “Triggering One Scope with Another Scope
to Acquire Data” in Chapter 2 in the xPC Target user’s guide documentation.
For additional information on trigger, see “Advanced Data Acquisition Topics”
on page 2-11.
34-6
xPC Target Scope Block
If you select Scope Triggering, then in the Trigger scope number box, enter
the scope number of a Scope block. If you use this trigger mode, you must also
add a second Scope block to your Simulink model. You do not need to specify
signal triggering.
If you want the scope to trigger on a specific sample of the other scope, enter a
value in the Sample to trigger on box. The default value is 0 and indicates that
the triggering scope and the triggered (current) scope start simultaneously. For
more information on this field, see “Triggering One Scope with Another Scope
to Acquire Data” in Chapter 2 in the xPC Target user’s guide documentation.
34-7
34 Miscellaneous Blocks
If you select Scope Triggering, then in the Trigger scope number box, enter
the scope number of a Scope block. If you use this trigger mode, you must also
add a second Scope block to your Simulink model. You do not need to specify
signal triggering.
If you want the scope to trigger on a specific sample of the other scope, enter a
value in the Sample to trigger on box. The default value is 0 and indicates that
the triggering scope and the triggered (current) scope start simultaneously. For
more information on this field, see “Triggering One Scope with Another Scope
to Acquire Data” in Chapter 2 in the xPC Target user’s guide documentation.
34-8
xPC Target Scope Block
Filename — Enter a name for the file to contain the signal data. By default,
the target PC writes the signal data to a file named C:\data.dat.
Mode — From the list, select either Lazy or Commit. Both modes open a file,
write signal data to the file, then close that file at the end of the session. With
the Commit mode, each file write operation simultaneously updates the FAT
entry for the file. This mode is slower, but the file system always knows the
actual file size. With the Lazy mode, the FAT entry is updated only when the
file is closed and not during each file write operation. This mode is faster, but
if the system crashes before the file is closed, the file system might not know
the actual file size (the file contents, however, will be intact).
WriteSize — Enter the block size, in bytes, of the data chunks. This parameter
specifies that a memory buffer, of length Number of samples, writes data to
the file in WriteSize chunks. By default, this parameter is 512 bytes, which is
the typical disk sector size. Using a block size that is the same as the disk sector
size provides optimal performance.
Number of samples — Enter the number of values to be acquired in a data
package.
AutoRestart — Select this check box to enable the scope of type file to collect
data up to Number of samples, then start over again, appending the new data
to the end of the signal data file. Clear the AutoRestart check box to have the
scope of type file collect data up to Number of samples, then stop.
34-9
34 Miscellaneous Blocks
Note The use of From xPC Target blocks require a connection between the
host and target PC. If there is no connection between the host and target PC,
operations such as opening a model that contains these blocks or copying
these blocks within or between models, will take significantly longer than
normal.
• To highlight a signal line that a From xPC Target block refers to, double-click
the From xPC Target block.
• If the From xPC Target block has not yet been configured, double-clicking
the From xPC Target block has no effect.
• To edit the From xPC Target block parameters, right-click on the block and
select Mask parameters.
To run a model that contains From xPC Target blocks, you must
• Configure the Real-Time Workshop parameters RTW system target file for
the model. Set this value to xpctarget.tlc. You access this dialog from the
Simulink model Simulation -> Configuration Parameters menu. See
“Entering the Real-Time Workshop Parameters” on page 3-42 in the xPC
Target getting started documentation.
• Specify the correct target PC environment on the xPC Target options node
of the Real-Time Workshop parameters dialog. In particular, either select
the Use default target PC check box or enter the target name of the target
PC to which you want to connect. If you have only one target PC, the model
uses the default target PC and you do not to perform this configuration. See
the Use the default target PC check box description in “xPC Target
Options” on page 3-50 in the xPC Target getting started documentation.
34-10
From xPC Target
Note If you have only one target PC, the model uses the default target and
you do not perform these configurations.
34-11
34 Miscellaneous Blocks
To xPC Target
This block behaves as a sink. The main purpose of this block is to write a new
value to a specific parameter on the target application. This block is
implemented as an M-file S-function. The block is optimized so that it only
changes a parameter on the target application when the input value differs
from the value that existed at the last time step. This block uses the parameter
downloading feature of the xPC Target command-line interface.
Note The use of To xPC Target blocks require a connection between the host
and target PC. If there is no connection between the host and target PC,
operations such as opening a model that contains these blocks or copying
these blocks within or between models, will take significantly longer than
normal.
• To highlight a signal line that a From xPC Target block refers to, double-click
the From xPC Target block.
• If the From xPC Target block has not yet been configured, double-clicking
the From xPC Target block has no effect.
• To edit the From xPC Target block parameters, right-click on the block and
select Mask parameters.
34-12
To xPC Target
To run a model that contains From xPC Target blocks, you must
• Configure the Real-Time Workshop parameters RTW system target file for
the model. Set this value to xpctarget.tlc. You access this dialog from the
Simulink model Simulation -> Configuration Parameters menu. See
“Entering the Real-Time Workshop Parameters” on page 3-42 in the xPC
Target getting started documentation.
• Specify the correct target PC environment on the xPC Target options node
of the Real-Time Workshop parameters dialog. In particular, either select
the Use default target PC or enter the target name of the target PC to which
you want to connect. If you have only one target PC, the model uses the
default target PC and you do not to perform this configuration.See the Use
the default target PC check box description in “xPC Target Options” on
page 3-50 in the xPC Target getting started documentation.
Note If you have only one target PC, the model uses the default target and
you do not perform these configurations.
34-13
34 Miscellaneous Blocks
This can then be converted into the appropriate signals by the Byte Unpacking
block.
• “File Format” on page 34-15 — Describes the target PC source file format
• “Block parameters” on page 34-16 — Describes the block parameters for the
From File block
34-14
xPC Target From File
File Format
Before you use a target PC file as the source for the From File block, ensure
that the data in the file is formatted properly. The file format is a concatenation
of the different data elements for one time step, followed by the next time step,
and so on.
For example, assume that the data in your file is the same as that in the
preceding example. Assign a variable to each component, for example,
Assume, also, that there are N time steps worth of data. The array dimension
for a and b are then
• size(a) — [1, N]
• size(b) — [3, N]
In sequence, write out the data like the following to create the file.
a(1, 1) 4 bytes
b(:, 1) 24 bytes
a(1, 2) 4 bytes
b(:, 2) 24 bytes
...
...
a(1, N) 4 bytes
b(:, N) 24 bytes
If you already have the data as MATLAB variables, use the xpcbytes2file
function to create the file on the host PC before transferring it to the target PC.
This function has the following syntax:
xpcbytes2file(filename, var1, ... varn)
where
• filename — Specify the name of the data file from which the From File block
distributes data
• var1, ... varn— Specify the column of data to be output to the model.
34-15
34 Miscellaneous Blocks
Block parameters
Filename — Enter the name of the target PC file that contains the data.
Output port width — Enter the size, in bytes, of the data to be distributed
each sample time.
Buffer size — Enter the size of the software FIFO, in bytes. The xPC Target
kernel fills this FIFO with the data to be input to the model. The From File
block empties this FIFO as it inputs the data to the model.
This parameter should ideally be
This means that the data buffer is of size 2000. This buffer is initially full.
Each time the block executes, eight bytes are output to the model, and the
number of bytes in the buffer decreases by eight. Each time the number of free
bytes in the buffer goes to 512 or higher, the xPC Target kernel attempts to
read 512 bytes from the xPC Target data file to fill the buffer.
Setting this parameter to another value, for example 1024, causes the From
File block to wait until 1024 bytes are free before attempting the next read.
For efficiency, set this vale to a multiple of 512 (a disk sector is 512 bytes).
34-16
xPC Target From File
When reaching EOF — Select the behavior of the block for when you run the
application beyond when you have data in the file. Select
• Hold last output — Stops reading and stops the output at the last value
• Seek to beginning — Returns to the beginning of the file and starts reading
the data (this option results in periodic data)
Sample time — Enter a base sample time or a multiple of the base sample
time.
34-17
34 Miscellaneous Blocks
Note Not all systems support rebooting from software. You can test whether
your system supports a software reboot. From the MATLAB Command
Window, enter xpctest. For more information, see “Testing the Installation”
on page 2-45.
Block parameters
Sample time — Enter a base sample time or a multiple of the base sample
time.
34-18
I/O Port Read
2 In the I/O-Port address box, enter the beginning address for each value this
block reads.
For example, if you want to read a word (16 bits) starting at I/O port 0x300,
followed by a byte (8 bits) at 0x302, enter
{'0x300','0x302'}
3 In the Data type box, enter the type for each value this block reads. There
is one type for each address you entered in the I/O-Port address box.
For example if you want to read a word and then a byte, enter
{'uint16','uint8'}
Your dialog box should look similar to the figure shown below.
34-19
34 Miscellaneous Blocks
4 Click OK.
The number of outputs from the block changes to reflect the length of the
I/O-Port address cell array.
I/O-Port address (cell array) This is the cell array containing the
beginning I/O port addresses for the data
you want to read. These addresses are
specified in terms of hexadecimal strings.
Data type (cell array) This is the cell array containing the types of
data you want to read from I/O port. The
Data type cell array has one value for each
value in the I/O-Port address cell array.
34-20
I/O Port Write
For example, if you want to write a double word (32 bits) starting at I/O port
0x300, followed by a word (16 bits) at 0x304, enter
{'0x300','0x304'}
Your dialog box should look similar to the figure shown below.
34-21
34 Miscellaneous Blocks
3 Click OK.
The number of inputs to the block changes to reflect the length of the
I/O-Port address cell array. The data type of the input signal reflects the
type of value written to the I/O port.For example, an input signal of type
uint32 writes a double word, an uint16 input signal writes a word, and an
uint8 input signal writes a byte.
I/O-Port address (cell array) This is the cell array containing the I/O port
addresses for the data that you want read.
These addresses are specified in terms of
hexadecimal strings.
34-22
xPC Target TET
34-23
34 Miscellaneous Blocks
34-24
Asynchronous Event Support
34-25
34 Miscellaneous Blocks
3 Drag-and-drop the xPC Target IRQ block in your Simulink model and
connect the output to this block to the input of a Function-Call Subsystem.
For more information on Function-Call subsystems, see the Simulink and
Real-Time Workshop documentation.
34-26
Asynchronous Event Support
In the setup shown above, the CPU executes the contents of the Function
Call-Subsystem whenever IRQ 5 occurs.
5 From the IRQ line number list, choose 1, 2, . . . , 15. To determine the
available IRQ line numbers on the target PC, use the function getxpcpci.
6 Select or deselect the Allow preemption of function call subsystem check box.
7 From the I/O board generating the interrupt list, select an interrupt board.
8 In the PCI slot box, enter the PCI slot number or enter -1 to let xPC Target
determine the number.
9 Click OK.
For more information about the IRQ Source block, see “Async IRQ Source
Block” on page 34-28.
If you need to transfer data from your ISR, add an Async Transition Block or
Async Read/Write blocks to your Simulink model. See “Async Rate Transition
Block” on page 34-29, “Async Buffer Write and Read Blocks” on page 34-30,
and “Asynchronous Interrupt Examples” on page 34-31.
34-27
34 Miscellaneous Blocks
If you are using a CAN field bus with interrupts, see “Asynchronous Interrupt
Examples” on page 34-31.
IRQ line number Select the IRQ line number you are using for
this block. This depends on the characteristics of
your hardware. You may need to query the PCI
bus on the target PC to find what IRQ the PCI
bus assigned to your hardware. Use the function
getxpcpci.
34-28
Asynchronous Event Support
I/O board generating For many I/O boards, you need to set up the
the interrupt board properly to generate the interrupt. You
might also need to set up board specific features
at the beginning and/or end of an ISR. Select
the correct board that you intend to use from
the drop-down list.
PCI slot (-1: autosearch) If only one board of this type is physically
present in the target PC, enter
-1
34-29
34 Miscellaneous Blocks
To prevent possible data corruption, use Async Buffer Write and Read blocks.
See “Async Buffer Write and Read Blocks” on page 34-30.
34-30
Asynchronous Event Support
To access any of these models, in the MATLAB Command Window, type the
name of the model. Each model contain annotations documenting its purpose,
and should serve as an example of how to use these blocks.
34-31
34 Miscellaneous Blocks
34-32
35
Obsoleted Drivers
xPC Target has obsoleted some or all the drivers for the following manufacturers:
Existing models that use these drivers will still work. However, their presence
is not guaranteed for future releases. Do not use these driver blocks in new
models.
In addition, in the xPC Target library (xpclib), there are new versions of the
following Measurement Computing Incremental Encoder drivers. Please use
the new version of these drivers.
• CIO-QUAD02
• CIO-QUAD04
• PCI-QUAD04
35-2
Burr-Brown
Burr-Brown
I/O boards supported by xPC Target (http://www.instrument.com/pci).
PCI-20003M
The PCI-20003M is an I/O board with two analog output (D/A) channels
(12-bit).
xPC Target supports this board when it is installed on a PCI-20041C carrier
board with this driver block:
• “PCI-20003M Analog Output (D/A)” on page 35-3
Board Characteristics
Board name PCI-20003M
Manufacturer Burr-Brown
Bus type ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
35-3
35 Obsoleted Drivers
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
0-5 5
For example, if the first channel is -10 to + 10 volts and the second channel is
0 to +5 volts, enter
[-10,5]
The jumpers W1 to W5, W13, W14, W27, W31, W7 to W11, W30, W32 on the
module must correspond to this range setting.
Sample Time — Enter the base sample time or a multiple of the base sample
time.
Module Number — Enter a number from 1 to 3 to identify the connector on the
carrier board where the I/O module is inserted. This driver verifies if the
module is placed on the specified module connector.
Base Address or Carrier Board (ie: 0xd000) — Enter the base address of the
board. This entry must correspond to the DIP-switch settings on the board. For
example, if the base address is 300 (hexadecimal), enter
0x300
PCI-20019M
The PCI-20019M is an I/O board with 8 single analog input (A/D) channels
(12-bit).
xPC Target supports this board when it is installed on a PCI-20041C carrier
board with this driver block:
• “PCI-20019M Analog Input (A/D)” on page 35-5
35-4
Burr-Brown
Board Characteristics
Board name PCI-20019M
Manufacturer Burr-Brown
Bus type ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
35-5
35 Obsoleted Drivers
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5 0-5 5
Other jumper on this board. The switch and jumper settings, that are not
mentioned here, have no influence on the running of xPC Target.
W8 in W27 out
W11 in W31 -
W12 out
35-6
Burr-Brown
PCI-20023M
The PCI-20023M is an I/O board with 8 single analog input (A/D) channels
(12-bit).
xPC Target supports this board when it is installed on a PCI-20041C carrier
board with this driver block:
• “PCI-20023M Analog Input (A/D)” on page 35-7
Board Characteristics
Board name PCI-20023M
Manufacturer Burr-Brown
Bus type ISA
Access method Memory mapped
Multiple block instance support No
Multiple board support Yes
volts Double 1
35-7
35 Obsoleted Drivers
The following table is a list of the ranges for this driver and the corresponding
range codes.
Input range (V) Range code Input range (V) Range code
-5 to +5 -5
The jumpers W1, W2, W4, W5, W33 on the module must correspond to this
range setting. The switch and jumper settings, that are not mentioned here,
have no influence on running xPC Target.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Module Number (1-3) — Enter a number from 1 to 3 to identify the connector
on the carrier board where the I/O module is inserted. This driver verifies if the
module is placed on the specified module connector.
Base Address of Carrier Board (ie. 0xd000) — Enter the base address of the
I/O board. It is important that this entry corresponds to the DIP-switch
settings on the board. For example, if the base address is 300 (hexadecimal),
enter
0x300
Other jumpers on this board. The switch and jumper settings, that are not
mentioned here, have no influence on the running of xPC Target.
W8 in W27 out
W9 - W30 -
W11 in
35-8
Burr-Brown
PCI-20041C
The PCI-20041C is a carrier board with 32 digital I/O-lines grouped into four
ports that can be configured as digital input or output. Each port has a
maximum of 8 digital lines.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name PCI-20041C
Manufacturer Burr-Brown
Bus type ISA
Access method Memory mapped
Multiple block instance support Yes
Multiple board support Yes
35-9
35 Obsoleted Drivers
Sample time — Enter a base sample time or a multiple of the base sample
time.
Module Number (0-3) — Enter a number from 0 to 3 to identify the connector
on the carrier board where the I/O module is inserted. This driver verifies if the
module is placed on the specified module connector.
Base Address or Carrier Board (ie: 0xd000) — Enter the base address of the
board. This entry must correspond to the DIP-switch settings on the board. For
example, if the base address is 300 (hexadecimal), enter
0x300
35-10
Burr-Brown
Base Address or Carrier Board (ie: 0xd000) — Enter the base address of the
board. This entry must correspond to the DIP-switch settings on the board. For
example, if the base address is d000 (hexadecimal), enter
0xd000
PCI-20098C
The PCI-20098C is a carrier board with 8 single or 16 differential analog input
(A/D) channels (12-bit), and 16 digital I/O-lines grouped into two 8-line ports.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board Name PCI-20098C
Manufacturer Burr-Brown
Bus Type ISA
Access Method Memory mapped
Multiple block instance support A/D: No, Digital I/O: Yes
Multiple board support Yes
volts Double 1
35-11
35 Obsoleted Drivers
• 16 single-ended channels
• 8 differential channels
35-12
Burr-Brown
35-13
35 Obsoleted Drivers
Base Address or Carrier Board (ie: 0xd000) — Enter the base address of the
board. This entry must corresponds to the DIP-switch settings on the board.
For example, if the base address is 300 (hexadecimal), enter
0x300
35-14
Gespac
Gespac
I/O boards supported by xPC Target (http://www.gespac.com).
GESADA-1
The GESADA-1 is an industrial I/O board with 16 single or 8 differential
analog input (A/D) channels, and 4 analog output (D/A) channels (10-bit).
xPC Target supports this board with these driver blocks:
Note xPC Target does not support the external trigger and interrupt
propagation on this board.
Board Characteristics
Board name GESADA-1
Manufacturer Gespac
Bus type ISA industrial
Access method I/O mapped
Multiple block instance support No
Multiple board support Yes
35-15
35 Obsoleted Drivers
volts Double 1
Number the lines beginning with 1 even if the board manufacturer starts
numbering the lines with 0.
Range vector — From the list, choose either +-10V (-10 to +10 volts), +-5V (-5
to +5 volts), or 0-10V.This driver does not allow you to select a different range
for each channel. The input range is the same for all A/D channels.
The input range setting must correspond to the settings of jumper J6 and J9 on
the board.
Input coupling — From the list, select one from the following list of input
modes:
35-16
Gespac
volts Double 1
Input Range (V) Range Code Input Range (V) Range Code
-5 to +5 -5
For example, if the first channel is -10 to + 10 volts and the second, third and
fourth channel are -5 to +5 volts, enter
[-10,5,5,5]
The range settings have to correspond to the jumper setting of J5 on the board.
Sample time — Enter the base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
correspond to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
The base address specifies the base address of the board and has to correspond
to the Jumper setting (J12) on the board.
35-17
35 Obsoleted Drivers
GESPIA-2A
The GESPIA-2A is an industrial I/O board with 32 digital I/O lines. The
GESPIA-2A has two 6821 PIAs (0 and 1) from Motorola. Each PIA has two
ports (A and B) with 8 digital lints which can be defined as input or output.
xPC Target supports this board with these driver blocks:
Board Characteristics
Board name GESPIA-2A
Manufacturer Gespac
Bus type ISA industrial
Access method I/O mapped
Multiple block instance support Yes
Multiple board support Yes
35-18
Gespac
Sample time — Enter a base sample time or a multiple of the base sample
time.
Base address — Enter the base address of the board. This entry must
corresponds to the DIP-switch settings on the board. For example, if the base
address is 300 (hexadecimal), enter
0x300
35-19
35 Obsoleted Drivers
35-20
Measurement Computing (Computer Boards)
If you choose Only First, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. The encoder ignores all other times it reaches the index. Init remains
1 until a rollover is detected, and then set to -1. A rollover is when the counter
reaches its maximum value and begins to start counting at zero again. A
rollover can also occur when the counter reaches its minimum value and the
counter resets itself to the maximum value and resumes counting down. The
outputs are still accurate after rollover. The -1 flag is used to alert that a
rollover has occurred.
If you choose Continuous, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. Each time the encoder reaches the index, it resets to zero. Init
remains always at l because a rollover cannot occur.
Positive Rotation — From the list, choose either Clockwise or Counter
Clockwise. This parameter sets the direction for positive rotation. If you choose
Clockwise, when the encoder is turned clockwise it counts up, and when
turned counter clockwise it counts down. If you choose Counter Clockwise the
counting direction is reversed.
Mode — From the list, choose Single, Double, or Quadruple. This parameter
specifies the phase detection mode. That is, how many phase changes are
detected. For more information, see the board manual.
Resolution — This field specifies the divisions of the connected incremental
encoder for one revolution.
Filter prescale factor — Enter a base prescale factor for digital filtering. This
filter helps eliminate high frequency noise. Enter a value from 0 to ff in
hexadecimal (0 to 256 in decimal). For example, for a prescale factor value of
ff in hexadecimal, enter
0xff
35-21
35 Obsoleted Drivers
Sample Time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
Base Address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
35-22
Measurement Computing (Computer Boards)
If you choose Only First, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. The encoder ignores all other times it reaches the index. Init remains
1 until a rollover is detected, and then set to -1. A rollover is when the counter
reaches its maximum value and begins to start counting at zero again. A
rollover can also occur when the counter reaches its minimum value and the
counter resets itself to the maximum value and resumes counting down. The
outputs are still accurate after rollover. The -1 flag is used to alert that a
rollover has occurred.
If you choose Continuous, The first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. Each time the encoder reaches the index, it resets to zero. Init
remains always at l because a rollover cannot occur.
Positive Rotation — From the list, choose either Clockwise or Counter
Clockwise. This parameter sets the direction for positive rotation. If you choose
Clockwise, when the encoder is turned clockwise it counts up, and when
turned counter clockwise it counts down. If you choose Counter Clockwise the
counting direction is reversed.
Mode — From the list, choose Single, Double, or Quadruple. This parameter
specifies the phase detection mode. That is, how many phase changes are
detected. For more information, see the board manual.
Resolution — This field specifies the divisions of the connected incremental
encoder for one revolution.
Filter prescale factor — Enter a base prescale factor for digital filtering. This
filter helps eliminate high frequency noise. Enter a value from 0 to ff in
hexadecimal (0 to 256 in decimal). For example, for a prescale factor value of
ff in hexadecimal, enter
0xff
35-23
35 Obsoleted Drivers
Sample time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
Base address — Enter the base address of the board. It is important that this
entry corresponds to the DIP-switch settings on the board. For example, if the
base address is 300 (hexadecimal), enter
0x300
35-24
Measurement Computing (Computer Boards)
If you choose Only First, the first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. The encoder ignores all other times it reaches the index. Init remains
1 until a rollover is detected, and then set to -1. A rollover is when the counter
reaches its maximum value and begins to start counting at zero again. A
rollover can also occur when the counter reaches its minimum value and the
counter resets itself to the maximum value and resumes counting down. The
outputs are still accurate after rollover. The -1 flag is used to alert that a
rollover has occurred.
If you choose Continuous, The first time the encoder reaches the index, the
counter is reset to zero, the Init output signal is set to 1, and the encoder begins
to count. Each time the encoder reaches the index, it resets to zero. Init
remains always at l because a rollover cannot occur.
Positive Rotation — From the list, choose either Clockwise or Counter
Clockwise. This parameter sets the direction for positive rotation. If you choose
Clockwise, when the encoder is turned clockwise it counts up, and when
turned counter clockwise it counts down. If you choose Counter Clockwise,
the counting direction is reversed.
Mode — From the list, choose Single, Double, or Quadruple. This parameter
specifies the phase detection mode. That is, how many phase changes are
detected. For more information, see the board manual.
Resolution — This field specifies the divisions of the connected incremental
encoder for one revolution.
Filter prescale factor — Enter a base prescale factor for digital filtering. This
filter helps eliminate high frequency noise. Enter a value from 0 to ff in
hexadecimal (0 to 256 in decimal). For example, for a prescale factor value of
ff in hexadecimal, enter
0xff
35-25
35 Obsoleted Drivers
Sample time — Enter a base sample time or a multiple of the base sample
time. The sample time indicates the update rate of registration on the input
(Duty Cycle). Enter -1 to inherit the model sample time from another block.
The sample time is in seconds.
PCI Slot (-1:autosearch) — If only one board of this type is physically present
in the target PC, enter
-1
35-26