DNx-SL-514 Synchronous Serial Interface Board
Chapter 2
14
Programming with the High-Level API
May 2018
www.ueidaq.com
508.921.4600
© Copyright 2018
United Electronic Industries, Inc.
2.3
Configuring
the Resource
String
UeiDaq Framework uses resource strings to select which device, subsystem
and channels are used within a session. The resource string syntax is similar to
a web URL:
<device class>://<IP address>/<Device Id>/<Subsystem><Channel list>
For PowerDNA and RACKtangle, the device class is
pdna
.
For example, the following resource string selects SSI ports 0,1,3 on device 1 at
IP address 192.168.100.2: “pdna://192.168.100.2/Dev1/ssi0,1,3”
The SL-514 is programmed using the subsystem
ssi
to configure channels as
SSI channels.
2.4
Configuring
an SSI Master
Port
Use the method
CreateSSIMasterPort()
to configure one or more
channel(s) as a master SSI port.
The following call configures SSI master ports 0 and 1 of a SL-514 set as
device 1:
It configures the following parameters:
•
Bits per second
: the number of bits per second transferred over the
synchronous port (unsigned integer)
•
Word size
: The number of bits per word (3 to 32) (unsigned integer)
•
Clock Enable
: Enable or disable the clock output (boolean)
•
Termination Enable
: Enable or disable termination resistor (boolean)
•
Pause Time
: Specifies the time delay (t
p
) in microseconds between two
consecutive clock sequences from the master (double)
•
Transfer Timeout
: Specifies the minimum time (t
m
) in microseconds
required by the slave to realize that the data transmission is complete
(double)
•
Bit Update Time
: Specifies the time (t
v
) in microseconds from the rising
clock edge to the data in transitioning high to low or low to high (double)
// Configure session’s ports
ssiSession.CreateSSIMasterPort(“pdna://192.168.100.2/Dev1/ssi0,1”,
125000,
8,
TRUE,
FALSE,
10000.0,
16.03,
0.45);