D-TACQ 4G User Guide

Add to My manuals
87 Pages

advertisement

D-TACQ 4G User Guide | Manualzz

D-TACQ Solutions Ltd

D-TACQ 4G User Guide

Prepared By: Peter Milne

Date: 28 February 2015

User Guide Covers modular appliance range:

ACQ1001

ACQ1002

ACQ2006

Fitted with analog modules including

ACQ420FMC, ACQ430FMC, AO420FMC,

ACQ425ELF, ACQ435ELF/

Please DO NOT Print this Guide!

It's best viewed on a larger screen. Some diagrams have considerable detail that can be seen at higher zoom.

Navigation: the document has a full set of PDF bookmarks. Use the

“Bookmarks” feature of Adobe Reader to navigate.

Rev 15 Page 1 of 87 Date: 1 October 2016

3

4

5

1

2

7

8

Rev

D-TACQ Solutions Ltd

9

10

11

12,13

14

15

Date

Feb 1 2014 Intial.

Description

Mar 24 2014 Add site and css logs

Apr 6 2014

May 6 2014

Describe ACQ1001/CELF2

Add MDSshell

July 18 2014 Package definition. Describe Transients

Sept 21 2014 Fault monitor

November 3

2014

ACQ425 Transient, Streaming, CSS Install.

February 28 Add ACQ2106

2015

May 25 2015 Show boot time customisation options

June 19 2015 Document AWG, SYNC.

Minor changes.

ACQ480

Minor

Rev 15 Page 2 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

Table of Contents

1 Introduction.....................................................................................................9

1.1 What is D-TACQ 4G?..............................................................................9

1.2 Intended Audience...................................................................................9

1.3 Scope.......................................................................................................9

1.4 Glossary................................................................................................10

1.5 References............................................................................................10

1.5.1 EPICS:............................................................................................10

1.5.2 CSS................................................................................................10

1.5.3 D-TACQ Data Sheets.....................................................................10

1.5.4 Installation Guide...........................................................................10

1.6 Notation.................................................................................................10

2 Quickstart Guide...........................................................................................11

2.1 Turnkey capture with live data display..................................................11

3 Overview.......................................................................................................11

3.1 ZYNQ SOC............................................................................................11

3.2 ACQ2006/ACQ1001 Appliance..............................................................11

3.3 ACQ2106 Appliance...............................................................................11

3.4 Module Sites..........................................................................................12

3.5 Unified Command Interface...................................................................12

3.6 Unified Data Interface...........................................................................12

3.7 Remote Command interface................................................................12

3.7.1 Ease of Use Vs Security................................................................13

3.8 Scripting Local Commands...................................................................13

3.8.1 Single command Style...................................................................13

3.8.2 Stream of commands style.............................................................13

4 System software structure............................................................................14

4.1 Bootloader in Flash...............................................................................14

4.2 Embedded Linux system loaded from SD card.....................................14

4.3 User Space boot....................................................................................14

4.4 System customization by packages......................................................14

4.5 Local boot script : /mnt/local/rc.user.....................................................14

4.6 SD Card runtime policy..........................................................................14

5 Power Up Guide...........................................................................................16

5.1 Serial Console.......................................................................................16

5.2 Account..................................................................................................16

5.3 Network IP address...............................................................................16

5.3.1 Boots DHCP as default..................................................................16

5.3.2 Set Static IP address......................................................................16

5.3.3 Failover to a fixed static address...................................................16

5.4 Time of Day............................................................................................17

5.5 Embedded Web Pages.........................................................................17

5.6 ssh Server.............................................................................................17

5.7 Site and Data Ports...............................................................................17

6 Demonstration GUI.......................................................................................18

6.1 Launcher................................................................................................18

6.2 System OPI's.........................................................................................19

Rev 15 Page 3 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6.2.1 System Monitor: ACQ2006sys / ACQ1001sys / ACQ1002sys.......19

6.2.2 ACQ2006 Clocktree.......................................................................19

6.2.3 ACQ2006 Counters........................................................................20

6.3 Module OPI's.........................................................................................21

6.3.1 Plot 8 waveforms x 4096 points.....................................................21

6.3.2 ACQ435 Control.............................................................................22

6.3.3 AO420 AWG OPI............................................................................23

6.3.4 AO421 MUX OPI............................................................................23

7 Diagnostic Web Pages.................................................................................24

7.1 Home Page............................................................................................24

7.2 System Page.........................................................................................25

7.3 Firmware Page......................................................................................25

7.4 FPGA page............................................................................................26

7.4.1 Example: FPGA as text (preferred format for email) :...................26

7.5 Temperature Page.................................................................................27

7.6 Power Page...........................................................................................27

7.7 Top Page................................................................................................28

7.8 Interrupts Page......................................................................................28

7.9 Site Specific Pages...............................................................................29

8 Remote Reference........................................................................................30

8.1 Common Features.................................................................................30

8.2 System Controller..................................................................................32

8.3 ACQ435 module site.............................................................................34

8.4 AO421 MUX site....................................................................................36

8.5 AO420 AWG site....................................................................................37

8.6 CELF2 Service......................................................................................39

8.7 Accessing other sites from the System Controller................................40

9 Package Reference......................................................................................41

9.1 What is a package.................................................................................41

9.1.1 Package Structure.........................................................................41

9.2 Summary of Current Standard Packages.............................................42

9.3 Summary of Current Optional Packages..............................................42

9.4 Including an Optional Package in the boot...........................................43

9.5 Modify and Re-package a package......................................................43

10 Data Capture.............................................................................................44

10.1 Concept...............................................................................................44

10.2 Preparation..........................................................................................44

10.2.1 Define capture conditions............................................................44

10.2.2 Define the AGGREGATOR set.....................................................44

10.2.3 Port 4210 : Aggregator data port.................................................44

10.3 Network Streaming data capture.........................................................45

10.3.1 Repeating Gate Mode..................................................................45

10.4 Transient Data Capture.......................................................................45

10.4.1 Configure a Transient Capture....................................................46

10.4.2 Transient Upload Methods...........................................................46

11 Streaming Data format................................................................................47

11.1 ACQ435, default coding of spare bits.................................................47

Rev 15 Page 4 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

11.2 ACQ435, Embedded bits.....................................................................47

11.3 Generic Frame Word...........................................................................48

11.3.1 Meta Modes..................................................................................48

11.3.2 Data Rates:...................................................................................48

11.4 Scratchpad...........................................................................................49

11.5 Example Package................................................................................49

12 Synchronisation..........................................................................................50

12.1 Between modules on a carrier............................................................50

12.2 Between carriers.................................................................................50

12.2.1 Custom_Sync Example................................................................50

12.2.2 Gate Pulse Generator GPG.........................................................50

13 DSP Features.............................................................................................51

13.1 Oversampling filter..............................................................................51

14 AWG Feature / Wavegen............................................................................51

15 ACQ480 Special Features..........................................................................52

15.1 Switched 50R termination...................................................................52

15.2 Source Synchronous Clocking............................................................52

15.3 Valid Clock Rates................................................................................52

15.4 AXI DMA : Segmented Capture...........................................................52

15.5 DSP Features......................................................................................55

15.5.1 FIR Filter......................................................................................55

15.5.2 Other Filters.................................................................................56

15.5.3 Gain Controls...............................................................................56

16 DIO432 Special features............................................................................57

17 Server Port Reference................................................................................58

17.1 Peers and Groups...............................................................................58

17.2 Standard Server Ports.........................................................................58

17.3 Channel Data Server Ports.................................................................60

17.4 Custom_awg Server Ports..................................................................60

18 MDSplus Thin Client Example....................................................................61

18.1 Pre-requisites......................................................................................61

18.1.1 Configure MDSplus tree on host.................................................61

18.1.2 Install firmware.............................................................................61

18.1.3 Customise firmware.....................................................................61

18.1.4 Review post-shot script................................................................62

18.2 Run The Shot......................................................................................62

18.3 Plot the data........................................................................................63

19 Big One Shot example................................................................................64

20 Fault-monitor example................................................................................66

20.1 Features..............................................................................................66

20.2 Example CSS GUI...............................................................................67

20.2.1 Launcher......................................................................................67

20.2.2 Typical Multi-opi display...............................................................68

20.2.3 Transient GUI...............................................................................69

20.2.4 Slow rate strip plot, with scope and post-shot display................70

20.2.5 New Autorepeat function..............................................................70

20.3 EPICS record reference......................................................................71

Rev 15 Page 5 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.4 Data Still Available outside EPICS......................................................72

20.4.1 Subrate.........................................................................................72

20.4.2 Snapshot......................................................................................72

20.4.3 Post Shot......................................................................................72

21 Capture With ACQ425ELF.........................................................................73

21.1 One Shot transient with auto-repeat...................................................73

21.2 Streaming capture to Ethernet with CSS Scope.................................74

22 Full Rate streaming with ACQ2106............................................................75

22.1 Host Side Driver..................................................................................75

22.2 Example Test procedure......................................................................75

22.3 Web Diagnostic...................................................................................75

22.4 CSS Diagnostic...................................................................................75

23 Timed Captures: VCR mode.......................................................................76

23.1 Packages.............................................................................................76

23.2 Custom Configuration.........................................................................76

23.3 Scheduled start:..................................................................................76

23.4 Capture Log:........................................................................................76

23.5 Result..................................................................................................77

23.6 Offload.................................................................................................78

23.7 Suggestion for improved accuracy......................................................78

24 Boot time Customization.............................................................................79

24.1 Include Custom packages...................................................................79

24.2 Configuration files...............................................................................79

24.2.1 /mnt/local/sysconfig/bos.sh..........................................................79

24.2.2 /mnt/local/sysconfig/epics.sh.......................................................79

24.2.3 /mnt/local/sysconfig/site-1-peers.................................................79

24.2.4 /mnt/local/sysconfig/transient.init.................................................79

24.2.5 /mnt/local/acq400.sh....................................................................80

24.2.6 /mnt/local/acq420_custom...........................................................80

24.2.7 /mnt/local/sysconfig/acq400_streamd.conf.................................80

24.3 Final boot customisation.....................................................................80

25 Reliability Features.....................................................................................81

25.1 Watchdog Timer..................................................................................81

25.1.1 Local Service...............................................................................81

25.1.2 Remote Service............................................................................81

26 Appendix: Install a new firmware release...................................................82

27 Appendix: Brief Guide to EPICS and CSS.................................................83

27.1 What is it and why should I care.........................................................83

27.2 Monitoring the embedded IOC............................................................83

27.3 Client Side Tools..................................................................................83

27.3.1 EPICS Base.................................................................................83

27.3.2 Control System Studio.................................................................84

27.3.3 Other OPI clients..........................................................................84

27.4 Notes on Installing Control System Studio CSS.................................84

27.4.1 Freely available download:..........................................................84

27.4.2 CSS is an extension to Eclipse....................................................84

27.4.3 Create Project and Workspace...................................................85

Rev 15 Page 6 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

27.4.4 Set CSS Preferences...................................................................85

27.4.5 Run the project.............................................................................86

Rev 15 Page 7 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

Copyright and Attribution.

This document and D-TACQ Software comprising platform Linux port, Linux kernel modules and most applications are released under GNU GPL/FDL:

Document:

Copyright (c) 2004-11 Peter Milne, D-TACQ Solutions Ltd.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free

Documentation License, Version 1.2, with no Invariant

Sections, no Front-Cover Texts, and no Back-Cover Texts.

Software:

Copyright (C) 2004-11 Peter Milne, D-TACQ Solutions Ltd.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General

Public License version 2 as published by the Free

Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General

Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,

Suite 330, Boston, MA 02111-1307 USA

Rev 15 Page 8 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

1 Introduction

1.1 What is D-TACQ 4G?

A range of intelligent carriers and modular data acquisition cards, configured together to make a networked data acquisition appliance.

Generically, an “ACQ400 System” comprises a CARRIER and one or more

MODULES. We refer to “ACQ400” as a shorthand for such a system.

The carriers include

ACQ1001 – single site intelligent “shortbread box” unit.

ACQ1002R and ACQ1002S – dual site “Rack” and “Stack” variants

ACQ2006 - 1U x 19” computer unit with 6 sites.

ACQ2106 – 2 U x 19” computer unit with 6 sites and MGT comms links.

and the module range includes

ACQ420FMC – 4 x 2MSPS simultaneous ADC module.

ACQ425ELF – 16 x 2MSPS simultaneous SAR ADC module.

ACQ424ELF-32 -32 x 1 MSPS simultaneous SAR ADC module.

ACQ435ELF – 32 x 128kSPS, 24 bit simultaneous delta-sigma ADC module.

AO424ELF-32 – 32 x 500kSPS, 16 bit DAC module.

The networked system is a highly configurable computer supporting from 4 to

192 channels per chassis.

This document describes how to configure and use the system.

1.2 Intended Audience

End Users

End User developers.

** This Document has 87 Pages. Yes, it's far too long. But, control of your

ACQ2006 system can be VERY SIMPLE. Most of the time, D-TACQ can supply a customised script to make it do what you want. Please don't hesitate to ask us. Don't Panic ! **

1.3 Scope

Describes software system operation.

For hardware specifications, see data sheets 1.5.3

For hardware installation, see hardware installation guides. 1.5.4

Rev 15 Page 9 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

1.4 Glossary

Carrier : a motherboard with embedded computer capable of supporting one or more modules. (up to 6 in the case of D-TACQ

ACQ2006).

Modules: analog input module with specific analog functionality.

FMC – VITA57 standard for FPGA-compatible modules

ELF – D-TACQ extension to FMC standard.

SOC – System on Chip

ZYNQ – Xilinx(r) SOC device comprising a hard ARM core and FPGA logic.

MGT – Multi-Gigabit Transceiver.

1.5 References

1.5.1 EPICS:

Experimental Physics and Industrial Control System http://www.aps.anl.gov/epics/

1.5.2 CSS

Control System Studio : EPICS GUI Client CSS

1.5.3 D-TACQ Data Sheets

Data Sheets

1.5.4 Installation Guide

ACQ1001_Installation_Guide

ACQ2006_Installation_Guide

1.6 Notation

command

: indicates name of a program (command) preformatted text

: literal input or output from terminal session.

Defined Term : some term or acronym specific to this domain (perhaps referenced in the glossary)

Rev 15 Page 10 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

2 Quickstart Guide

This is very much dependent on the combination of modules that is delivered.

The Easy Way – Ask D-TACQ!

Each system will be delivered with a custom configuration script, run the script and see data. If you can describe your requirement to D-TACQ, we can provide a setup that meets the requirement with minimal extra configuration.

2.1 Turnkey capture with live data display

Use the CSS GUI CAPTURE.opi to start a streaming capture, then use a Site

1 LIVE PLOT to view the data immediately.

3 Overview

3.1 ZYNQ SOC

The ACQ2006 carrier features the Xilinx ZYNQ System on Chip. This provides unprecedented system integration, combining

Dual-Core ARM Cortex A9 processor

FPGA fabric

Dual Ethernet and DDRAM controller.

3.2 ACQ2006/ACQ1001 Appliance

The Appliance combines the Zynq SOC in a system that auto-configures the set of modules currently in system, and powers up ready to run. The system may be configured to run turnkey (captures data from power up), or it can be configured using standard TCP/IP networking. All control is via simple text based, script-able commands, no device drivers required. Data is transferred efficiently in binary format, and a large number of transfer mechanisms are

available. The Appliance features an embedded 1.5.1EPICS IOC, this

presents all the Process Variables, for control, monitoring and data on the network. The IOC is responsible for a lot of system logic, for example computing a 64 bit sample count and outputing a sample frequency. These

PV's can be picked up by a remote EPICS client application such as

1.5.2CSS. D-TACQ provides a full function CSS GUI interface to the

appliance. Even users with no interest in EPICS or the embedded IOC can still make use of IOC generated values through the unified command interface.

3.3 ACQ2106 Appliance

This appliance is basically an ACQ2106 with the addition of up to 4 MGT links. The links are physically connected by a “comms mezzanine” CM, currently a single CM is available, MGT482, with 4 x SFP+ sites.

Rev 15 Page 11 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

3.4 Module Sites

The appliances offer from 1 (ACQ1001) to 6 (ACQ2006) FMC/ELF module sites. The sites are numbered 1..6. In addition, there is a System Controller

SC function nominally at “Site 0”, and possibly other system-specific optional functions at logical sites 7-20.

3.5 Unified Command Interface

The Appliance uses the concept of a “Knob” or controllable parameter. In the software, a Knob might be a read-only file (constant or variable value), a writeable file or even an executable command, including a query on an

EPICS PV. The system presents a consistent “getter”, “setter” interface that completely hides the implementation detail.

3.6 Unified Data Interface

The FPGA hardware includes a powerful “aggregator” function, that can combine all the data from any set of modules into a single stream. The data is presented to remote (and local) clients on a single TCP socket from “Site 0” at PORT 4210 nc acq2006_006 4210 > big-raw-file

3.7 Remote Command interface.

Each site is supported by its own TCP server socket at PORT 422+SITE.

PORT 4220 : Site0 Commands

PORT 4221 : Site1 Commands ...

PORT 4226 : Site6 Commands.

It's simple to connect from a remote host and execute sets and queries on the parameters. All that your HOST OS and programming language has to do is support making a TCP/IP client socket connection. In the examples below, we use a Linux Host and the

netcat (nc)

program to make the connection, then we run the sets/queries by typing them. An actual remote program would use any programming language to automate the sequence. D-TACQ recommends using

expect

(TCL) or

pexpect

(Python).

The remote command interface includes

help

: lists the available knobs

help2

: detail for available knobs supports wildcards for queries

prompt on

: enables a prompt. This makes dialogs more clear for the human, maybe more difficult for a computer interaction.

Rev 15 Page 12 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

Set- values are range checked. Parameters may be read-only, and attempts to set them are rejected with an error.

So a typical remote control sequence would be :

- connect to each module site in turn, configure parameters

- connect to the system controller site and start a capture.

Sounds complicated?. It isn't really, the commands are high level. And, in a lot of cases, we can supply a single command to cover an entire configuration.

3.7.1 Ease of Use Vs Security.

Connecting a socket to a well-known port, send a string to execute a command – this is very easy to do, but is it secure?. Well, firstly, it is relatively secure because the server program only allows access to the knobs in the directory. This should be sufficient for a basic level of security.

If a higher level of security is required, clients can be forced to use secure shell and authentication as follows:

- use

tcp-wrappers

to force

inetd

to listen to localhost

anyway.

- external clients can route information to localhost

via an

ssh

tunnel.

3.8 Scripting Local Commands.

All the knobs available to the site servers are available to local scripts using the

set.site

command. There are two styles of usage, pick the one that is more convenient. The “Stream of command style” may be a little faster to execute.

3.8.1 Single command Style

set.site 1 trg 1,1,1 set.site 1 clkdiv 100 set.site 1 hi_res_mode 1 set.site 0 run0 1 set.site 0 soft_trigger

3.8.2 Stream of commands style

set.site 1 << EOF trg 1,1,1 clkdiv 100 hi_res_mode 1

EOF set.site 0 <<EOF run 0 1 soft_trigger

EOF

Rev 15 Page 13 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

4 System software structure

4.1 Bootloader in Flash

The system boots the Xilinx First Stage Bootloader FSBL and regular bootloader u-boot from soldered QSPI flash. The u-boot environment has important information including baseboard model type, serial number and

Ethernet MAC address is also stored in the QSPI. The QSPI is considered to be ROM from the user perspective.

4.2 Embedded Linux system loaded from SD card

The bootloader then selects Linux kernel initial ramdisk and device-tree images from an internal SD card. The images are unzipped into RAM. The device tree enables model specific hardware customisation.

4.3 User Space boot

Once the kernel has booted, it hands over to a boot program contained in the initial ramdisk as normal. First, the boot program does standard things like load the network – the initial ramdisk is a fixed, limited size system. Finally, the boot loaded hands over to the package system. At this stage, the SD card is available as a mounted file system under /mnt.

4.4 System customization by packages.

D-TACQ uses a very simply package mechanism to complete the system boot. Packages are tarballs that are loaded from /mnt/packages/ onto ramdisk. The tarballs have a numeric prefix, to enforce sequence, and after the tarball has been unpacked, an optional init script is run. Certain standard packages are selected by baseboard model. Early in this phase, a system specific package

5-acq1001*tgz

(in the case of ACQ1001), for example will perform FMC module enumaration. A common package

10-acq420*tgz

uses the enumeration to select an FPGA personality, load an appropriate FPGA image and to load the core FMC device driver. Suqsequent packages provide higher level functionality (eg web server, EPICS IOC). It's common to bring in application customization packages towards the end of the sequence.

Packages are described in detail in Package Reference.

Finally, the boot script calls the local boot script:

4.5 Local boot script : /mnt/local/rc.user

This script runs last. It's intended to contain only site-specific customization.

Please note, the entire

/mnt/local/ directory is available for site customization.

4.6 SD Card runtime policy.

D-TACQ considers the ACQ400 system to be a hard real-time system that

Rev 15 Page 14 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

runs from RAM. The system achieves maximum reliability by utilising the large SD card as read-only memory. Ideally, the system unpacks all the code and data it needs from the SD card at boot time, and doesn't touch it again.

That is the most conservative case. It is of course entirely possible to store code and data on the SD card, even during a data capture. The SD card can be used as a simple logging store for low rate variables. However, we ask users to bear in mind that the system will have maximum reliability when operating at high speed, and maximum longevity if the system minimises write activity to the SD card. For intensive data logging, we recommend first and foremost using the Ethernet port, or for isolated systems, fitting a second disk to the USB port.

Rev 15 Page 15 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

5 Power Up Guide

5.1 Serial Console

System console access is provided on a micro-usb port. The usb port appears as a console port in the host OS. Connect to the console port using a terminal emulator, 115200 baud, 8 bit No parity. D-TACQ recommends

Kermit as the terminal emulator.

D-TACQ makes extensive use of low-power, low cost “Raspberry PI” Linux computers as terminal severs. The server is configured to set the port for each ACQ4xx devices by name, and typing the name opens a direct Kermit connection to the correct device. Contact D-TACQ for details.

5.2 Account

The root password is provided on a printed sheet with your shipment. Please do NOT publish the root password.

5.3 Network IP address

5.3.1 Boots DHCP as default

At boot, the default behaviour of Acq4xx is to request an ip-address on ETH0 using DHCP. This is suitable for large installations as it allows central control, and for small installations perhaps booting in a network with a DHCP server on a router. If you do the latter, please make sure the router has gigabit ethernet ports!.

The MAC address is printed on the case of the unit.

5.3.2 Set Static IP address

If DHCP is not available in your configuration, a static IP address is required.

Specify a static IP address from the root console as follows:

set.static_ip PORT IP-ADDRESS # PORT : 0|1 IP-ADDRESS: dotted quad acq1001_004> set.static_ip 0 192.168.1.4

This command writes to the file

/mnt/local/network

. The setting is persistent through power off. More complex network scenarios may be configured by editing this file directly.

5.3.3 Failover to a fixed static address

If the unit is set to boot DHCP by default, but no DHCP address is obtained on boot, after a ten second timeout, the unit will set a fixed static IP address.

The fixed address is approximately :

192.168.0. {SERIAL_NUMBER %200 + 1}.

Rev 15 Page 16 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

The exact fixed address is 192.168.0. {MAC ADDRESS % 200 }.

5.4 Time of Day

ACQ2006 / ACQ1001 does NOT include a battery backed clock. The system is likely to be installed for a very long time, and the battery is a point of failure. It is recommended to set the time of day automatically on boot using ntp.

At boot, it's assumed that the ntp server is the same as the dhcp server. If this is not the case, or if you're using static ip, the ntp server can be specified like this: acq1001_004> set.ntpd 2.pool.ntp.org

This setting is stored in /mnt/local/ntpd.conf, and persists through power off.

If a more complex ntp scenario is required, exit /mnt/local/ntpd.conf directly

5.5 Embedded Web Pages

When the system is powered up and networked, point a web-browser to the

device, and the embedded web pages 7 will be visible.

The web server uses the standard port (Port 80).

5.6 ssh Server

ACQ4xx acts as an ssh server, and it's possible to log in and run commands using ssh.

(on Windows, use Cygwin or PUTTY).

5.7 Site and Data Ports

Are enabled by default. If this is considered a security hazard, use

TCPWRAPPERS to control access. One secure mechanism is to set the server data ports to listen to localhost only, then to access them via ssh portforwarding.

Rev 15 Page 17 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6 Demonstration GUI

ACQ4xx includes an embedded EPICS IOC. Even if you have no plans to use

EPICS, combined with the CSS GUI, it makes a very convenient way to control and use data, and it's recommended at least for initial evaluation.

Install CSS 1.5.2

Download D-TACQ CSS Support: ACQ420FMC-CSS-current.tgz

Run CSS and import the project from the tarball.

IMPORTANT : always run everything from the Launcher!

In edit mode, select acq420_launcher.opi, right-click, open with OPI

RUNTIME

6.1 Launcher

(1)

Select UUT and Serial

(2)

Select

ACQxxxx sys match your system

System OPI's need HOSTNAME

(3)

Select Site

Module OPI's need HOSTNAME AND SITE

Please note: always refer to the UUT using the hostname, this is independent of any DNS facility on the network.

Rev 15 Page 18 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6.2 System OPI's

6.2.1 System Monitor: ACQ2006sys / ACQ1001sys / ACQ1002sys

6.2.2 ACQ2006 Clocktree

Select Front Panel or XCLK input direct clock on d0 derived clock on d1

Rev 15

MCLK Setpoint

Page 19 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6.2.3 ACQ2006 Counters

A comprehensive set of Clock, Trigger, Event and Sync counts, activity and frequency:

Rev 15 Page 20 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6.3 Module OPI's

6.3.1 Plot 8 waveforms x 4096 points

Rev 15 Page 21 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6.3.2 ACQ435 Control

Rev 15 Page 22 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

6.3.3 AO420 AWG OPI

6.3.4 AO421 MUX OPI

Rev 15 Page 23 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

7 Diagnostic Web Pages

Note on reporting: At times D-TACQ will request a diagnostic report of a page.

This can be in the form of a screen shot, but we do prefer plain text please.

Copy/Paste plain text from the pages can be difficult because they are dynamic; to do this, please uncheck the [ ] Refresh? Checkbox at the bottom right. It should then be possible to highlight, copy, paste text in the normal way.

Text is preferred for support because it's easy to search and annotate; however below we show screenshots to give a better feel for the appearance of the pages.

An example is provided at 7.9

7.1 Home Page

Rev 15 Page 24 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

7.2 System Page

7.3 Firmware Page

Rev 15 Page 25 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

7.4 FPGA page

7.4.1 Example: FPGA as text (preferred format for email) :

Uncheck the “Refresh?” check box, cut and paste text in the normal way: load.fpga loaded

/mnt/fpga.d/ACQ2006_TOP_02_02_02_02_ff_40_DMA.bit.gz

eoh_location set 0

Xilinx Bitstream header.

built with tool version : 34 generated from filename : ACQ2006_TOP_02_02_02_02_ff_40_DMA part : 7z020clg484 date : 2014/01/16 time : 20:34:19 bitstream data starts at : 114 bitstream data size : 4045564 load_bitstream(), about to write 4045564 load_bitstream() 4045564 bytes written SUCCESS

Rev 15 Page 26 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

7.5 Temperature Page

7.6 Power Page

Page contents are dynamic – updates shown in blue .

Rev 15 Page 27 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

7.7 Top Page

Top runs the unix top(1) command, shows an interactive display of the most active processes:

7.8 Interrupts Page

Provides a live view of the interrupt system

Rev 15 Page 28 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

7.9 Site Specific Pages

The webserver provides a dynamic view of the register set for each installed site in the system. This information may not be too useful to the user, but is critical for D-TACQ diagnosis. Please be sure to use the text cut and past technique if asked:

MOD_ID.0x00 0x0200000a

ADC_CTRL.0x04 0x00000001

TIM_CTRL.0x08 0x00000000

ADC_HITIDE.0x0c 0x00000000

ADC_FIFO_SAMPLES.0x10 0x00000000

ADC_FIFO_STA.0x14 0x0000000c

ADC_INT_CSR.0x18 0x00000000

ADC_CLK_CTR.0x1c 0x00000000

ADC_SAMPLE_CTR.0x20 0x00000000

ADC_CLKDIV.0x40 0x00000008

Rev 15 Page 29 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

ACQ435_MODE.0x44 0x00000000

8 Remote Reference

The ACQ4xx appliance is divided into sites {1,2 .. 6} with module-specific functions, and site 0, the motherboard. Each site presents a set of “knobs” or controls with simple key=value settings. The “knobs” are designed to be easily scriptable, and are accessible from both locally on the ACQ4xx and remotely using a dedicated socket connection.

8.1 Common Features

Connect to a site control socket 4220+Site number (0= System

Controller)

• nc acq2006_006 4221

This interface is meant to be easy to control by a computer script. For

Humans, it's easier if there is a prompt. The prompt includes the site number prompt on

• acq400.1 0 >

Execute a query – we ask for the mode and it responds on the next line acq400.1 0 >hi_res_mode

1 acq400.1 0 >

Execute a command acq400.1 0 >hi_res_mode=1 acq400.1 0 >

Execute a query again acq400.1 0 >hi_res_mode

0 acq400.1 0 > help : how to tell what options there are on this service acq400.1 0 >help

MANUFACTURER

MODEL

...

hi_res_mode help2 : how to tell what the options do and what are valid parameters.

You can get (query) any parameter (r) and set parameters denoted (w) acq400.1 0 >help2

MANUFACTURER : r manufacturer hi_res_mode : rw

[0|1]

Rev 15 Page 30 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

• wild card queries are supported, eg: acq400.1 0 >SIG*FREQ

SIG:clk_count:FREQ 4.91623e+07

SIG:sample_count:FREQ 48003.5 acq400.1 0 >

HIGH LEVEL and low level commands.

In general, knobs in CAPS are considered to be “high level” commands (they are frequently EPICS PV's), and where a HIGH

LEVEL and a low level knob coexist, it's recommended to use the

HIGH LEVEL command, so that any controller logic is utilised, and to guarantee a consistent view to external clients.

The exception to the above recommendation is for signal setting, where the low level command has a convenient “triplet” structure, mapped to 3 PV's. All signal triplet PV's are “round tripped” so that the

EPICS PV's track the low-level setting automatically. Although script users may prefer the self-description of the 3-PV's method.

Eg set.site 1 trg=1,1,0 equivalent to set.site 1 TRG=EXT set.site 1 TRG:DX=d1 set.site 1 TRG:SENSE=FALLING

Sample listings are given below, but please note, the lists are not complete; for accurate listing, run the help command on your system.

Rev 15 Page 31 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

8.2 System Controller

acq400.0 0 >help2

NCHAN : rw number of channels

SIG:CLK_EXT:COUNT : rwx external clock count

SIG:CLK_EXT:FREQ : rwx external clock frequency

SIG:CLK_MB:COUNT : rwx

MB clock count

SIG:CLK_MB:FREQ : rwx

MB clock frequency

SIG:CLK_S1:COUNT : rwx site 1 clock count

SIG:CLK_S1:FREQ : rwx site 1 clock frequency

SIG:CLK_S2:COUNT : rwx site 2 clock count

SIG:CLK_S2:FREQ : rwx site 2 clock frequency

SIG:CLK_S3:COUNT : rwx site 3 clock count

SIG:CLK_S3:FREQ : rwx site 3 clock frequency

SIG:CLK_S4:COUNT : rwx site 4 clock count

SIG:CLK_S4:FREQ : rwx site 4 clock frequency

SIG:CLK_S5:COUNT : rwx site 5 clock count

SIG:CLK_S5:FREQ : rwx site 5 clock frequency

SIG:CLK_S6:COUNT : rwx site 6 clock count

SIG:CLK_S6:FREQ : rwx site 6 clock frequency

SIG:EVT_EXT:COUNT : rwx external event count

SIG:EVT_EXT:FREQ : rwx external event frequency

SIG:EVT_MB:COUNT : rwx not used

SIG:EVT_MB:FREQ : rwx not used

SIG:EVT_S1:COUNT : rwx site 1 event count

SIG:EVT_S1:FREQ : rwx site 1 event frequency

...

SIG:SYN_EXT:COUNT : rwx external sync count

SIG:SYN_EXT:FREQ : rwx external sync frequency

Rev 15 Page 32 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

SIG:SYN_MB:COUNT : rwx not used

SIG:SYN_MB:FREQ : rwx not used

SIG:SYN_S1:COUNT : rwx site 1 sync count

SIG:SYN_S1:FREQ : rwx site 1 sync frequency

...

SIG:TRG_EXT:COUNT : rwx external trig count

SIG:TRG_EXT:FREQ : rwx external trig frequency

SIG:TRG_MB:COUNT : rwx not used

SIG:TRG_MB:FREQ : rwx not used

SIG:TRG_S1:COUNT : rwx site 1 trig count

SIG:TRG_S1:FREQ : rwx site 1 trig frequency

...

aggregator : rw displays aggregator state, do not set autocap : rwx

[on|off] control autocapture data32 : rw

[0|1] data size 16bit/2byte or 32bit/4byte fpmux : rwx

[fpclk|xclk] control clock source gpg_clk : rw configure Gate Pulse Generator clock source gpg_enable : rw enable GPG gpg_mode : rw set GPG mode One Shot | Loop | Loop/Wait gpg_sync : rw

/usr/share/doc/acq400_help0:gpg_sync EXT,dx,RISING configure

GPG sync with (sample) clock source gpg_top : rw query gpg top address gpg_trg : rw configure GPG start trigger source mb_clk : rwx

[FINKHz FOUTKHz] run0 : rwx aggregate from sites soft_trigger : rwx spad : rw

[0|1] scratchpad enable spad0 : rw

[0x12345678] scratchpad 0 entry (sample count: do not set)

...

Rev 15 Page 33 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

8.3 ACQ435 module site

acq400.1 0 >help2

MANUFACTURER : r manufacturer

MODEL : r device model / type

NCHAN : r number of channels

SAMPLE_SIZE : rw sample size in bytes NCHAN * RESOLUTION / 8

SERIAL : r serial number

SIG:clk_count:COUNT : rwx clock count

SIG:clk_count:FREQ : rwx clock frequency

SIG:sample_count:COUNT : rwx sample count

SIG:sample_count:FREQ : rwx sample frequency bank_mask : rw enabled channels bufferlen : r kernel buffer length clk : rw clk=EXT,dX,edge eg clk=1,0,0 external d0 FALLING, clk=0,0,0 internal clk_count : rw

32 bit clock count clk_counter_src : rw

[d0|d8] clock counter source "d8" is internal clkdiv : rw clock divider data32 : rw

[0|1] data size 16bit/2byte or 32bit/4byte event0 : rw event0=ENABLE,dX,edge event1 : rw event1=ENABLE,dX,edge hi_res_mode : rw

[0|1] modalias : r kernel internal module id module_name : r kernel module name module_type : r fpga type code nbuffers : r number of kernel buffers run : r aggregate from sites sample_count : rw

32 bit sample_count shot : rw

Rev 15 Page 34 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

shot number simulate : rw

[0|1] simulation mode site : r module site number stats : rw reports some driver internals sync : rw sync=EXT,dX,edge sysclkhz : r system clock rate trg : rw trg=EXT,dX,edge help : help help2 :

/usr/share/doc/acq400_help0:help2

Rev 15 Page 35 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

8.4 AO421 MUX site

acq400.5 0 >help2

CH01.01 : rw

[on|off] mux control

CH01.02 : rw

[on|off] mux control

..

CH02.19 : rw

[on|off] mux control

CH02.20 : rw

[on|off] mux control

MANUFACTURER : r manufacturer

MODEL : r device model / type

NCHAN : r number of channels

SERIAL : r serial number bufferlen : r kernel buffer length data32 : rw

[0|1] data size 16bit/2byte or 32bit/4byte modalias : r kernel internal module id module_name : r kernel module name module_type : r fpga type code muxpattern : rwx

[off|on [file] send a sequence to the mux control nbuffers : r number of kernel buffers site : r module site number help : help help2 :

/usr/share/doc/acq400_help0:help2

Rev 15 Page 36 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

8.5 AO420 AWG site

acq400.6 0 >help2

AO_01 : rw

[value]

AO_02 : rw

[value]

AO_03 : rw

[value]

AO_04 : rw

[value]

D1 : rw

[value] numeric=0,32767 awg DC offset AO01

D2 : rw

[value] numeric=0,32767 awg DC offset AO02

D3 : rw

[value] numeric=0,32767 awg DC offset AO03

D4 : rw

[value]

G1 : rw

[value] numeric=-32767,32767 awg GAIN AO01

G2 : rw

[value] numeric=-32768,32767 awg GAIN AO02

G3 : rw

[value] numeric=-32768,32767 awg GAIN AO03

G4 : rw

[value] numeric=-32768,32767 awg GAIN AO04

MANUFACTURER : r manufacturer

MODEL : r device model / type

NCHAN : r number of channels

SERIAL : r serial number

SIG:clk_count:COUNT : rwx clock count

SIG:clk_count:FREQ : rwx clock frequency

SIG:sample_count:COUNT : rwx sample count

SIG:sample_count:FREQ : rwx sample frequency awg : rwx

[off|on [awg-file] control awg with optional custom data file bufferlen : r kernel buffer length clk : rw clk=EXT,dX,edge eg clk=1,0,0 external d0 FALLING, clk=0,0,0 internal clk_count : rw

32 bit clock count clk_counter_src : rw

[d0|d8] clock counter source "d8" is internal clkdiv : rw

Rev 15 Page 37 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

clock divider dac_range_01 : rw

[0|1] range x1|x2 AO01 dac_range_02 : rw

[0|1] range x1|x2 AO02 dac_range_03 : rw

[0|1] range x1|x2 AO03 dac_range_04 : rw

[0|1] range x1|x2 AO04 dac_range_REF : rw

[0|1] REF 5V|2V5 all data32 : rw

[0|1] data size 16bit/2byte or 32bit/4byte event0 : rw event0=ENABLE,dX,edge event1 : rw event1=ENABLE,dX,edge hitide : r fifo hitide setting lotide : r fifo lotide setting modalias : r kernel internal module id module_name : r kernel module name module_type : r fpga type code nbuffers : r number of kernel buffers playloop_cursor : rw awg current position playloop_length : rw

[length] awg pattern length run : r aggregate from sites sample_count : rw

32 bit sample_count shot : rw shot number simulate : rw

[0|1] simulation mode site : r module site number stats : rw reports some driver internals sync : rw sync=EXT,dX,edge sysclkhz : r system clock rate trg : rw trg=EXT,dX,edge

Rev 15 Page 38 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

8.6 CELF2 Service

ACQ1002 comprises ACQ1001 with an expansion module “CELF”. CELF provides an additional ELF site (Site 2). The CELF2 module in addition provides some IO

- 8 DIO

- 4 slow AI

- Temperature.

These functions are accessible at “Site 3”.

Please note, DIO d0..d7 directions IN/OUT have to be pre-configured.

[pgm@hoy3 ~]$ nc acq1001_019 4223 help2 d0 : rw

[0|1] DIO bit 0 d1 : rw

[0|1] DIO bit 1 d2 : rw

[0|1] DIO bit 2 d3 : rw

[0|1] DIO bit 3 d4 : rw

[0|1] DIO bit 4 d5 : rw

[0|1] DIO bit 5 d6 : rw

[0|1] DIO bit 6 d7 : rw

[0|1] DIO bit 7 in1 : r slow AI channel 1 [mV] in2 : r slow AI channel 1 [mV] in3 : r slow AI channel 1 [mV] in4 : r slow AI channel 1 [mV] temp : r temperature [C*1000] help : help help2 :

/usr/share/doc/acq400_help0:help2

Rev 15 Page 39 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

8.7 Accessing other sites from the System Controller.

nc acq2006_006 4220 prompt on acq400.0 0 >get.site 1 MODEL

ACQ435ELF acq400.0 0 >get.site 2 MODEL

ACQ435ELF acq400.0 0 >get.site 5 MODEL

AO421ELF N=40 M=ff acq400.0 0 >get.site 6 MODEL

AO420ELF N=4 M=40 acq400.0 0 >

Rev 15 Page 40 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

9 Package Reference

9.1 What is a package.

A package is code and data that customizes the system.

Active packages are located in

/mnt/packages

.

Packages have a canonical naming structure:

SEQ-NAME-REV.tgz

Where SEQ is a two-digit number that indicates the position in the unpacking sequence (starting from zero)

NAME is the unique package name

REV is a YYMMDDhhmm revision code

.tgz : the package is a zipped tarball.

9.1.1 Package Structure

It's a tarball that will be unpacked into the file system at the root '/'

Optionally it includes a named init file, to be executed after the package has been unpacked.

example: tar tvzf /mnt/packages/05-acq1001-140306181234.tgz | cut -c 52-

./usr/local/bin/acq1001_init_gpio

./usr/local/acq1001.map

./usr/local/init/

./usr/local/init/acq1001.init

- SEQ is 05 : this executes early

- NAME : is acq1001

- REV : is 140306181234 (2014, March 6)

- The init file is acq1001.init

Rev 15 Page 41 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

06

10

20

05

05

05

05

22

33

34

02

03

05

39

40

44

95

96

9.2 Summary of Current Standard Packages

Packages stored in /mnt/packages are install to ramdisk at boot time

All packages NN-package-REV.tgz

Packages install in sequence number NN.

SEQ Name

tcl acq400_common acq1001 acq1002 acq2006 acq2006b acq2106 procServ acq420 httpd inotifytools libute at transient acq400ioc curl ttytools nettools

Description

TCL / Expect scripting language common utils for board boot acq1001 board boot acq1001 board boot acq2006 board boot acq2006b board boot acq2106 board boot procServ process server module enumeration and device driver web server file tools general tools at : scheduled start times “VCR” mode transient/faultmonitor capture control.

EPICS IOC

curl network access tool serial port access utils netperf, netserver, ethtool

9.3 Summary of Current Optional Packages

Packages stored in /mnt/packages.opt are held in reserve.

To enable a package, mv it to /mnt/packages and reboot.

04

15

21

33

SEQ Name

custom_pmod custom_sshkeys custom_wdt ao421

Description

support for PMOD customize ssh keys watchdog timer support AO421FMC hardware

Rev 15 Page 42 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

38

39

70

80

90

98

SEQ

98

98

99

99

99

99

99

99

99

Name

custom_8pps kmux mdsshell custom-cifs

WGM201 awg custom_mag custom_sos custom_sync autocapture custom_awg custom_bolo custom_hil custom_mb custom_sjo

Description

Gate Pulse Generator+8pps example support Keithley Mux mdsplus thin client cifs (Windows) file share client remote control for WGM signal gen special Arbitrary Waveform

Generator, block load, with gain and offset control customer specific

Simple One Shot : transient capture with local demux.

DEPRECATED

Configures multi-box sync feature autocapture: turnkey capture on start standard Arbitrary Waveform generator, with load-by channel capability.

support for BOLO8 hardware.

hardware in the loop support customer specific customer specific

9.4 Including an Optional Package in the boot

mv /mnt/packages.opt/PACKAGE /mnt/packages

9.5 Modify and Re-package a package

You might want to add some customization?.

Untar in a safe place, tar it back up, give it a new name.

Stash the old package in

/mnt/packages.opt.

Remember, the NAME must be unique in

/mnt/packages.

Rev 15 Page 43 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

10 Data Capture

10.1 Concept

The ACQ400 FPGA implements an AGGREGATOR function that fetches data from each participating module in turn and makes it available for DMA. The software implements a streaming dma function. To capture data, it's always necessary to “set up a stream”. The streamed data could go to the network .. a “Streaming Data” or to local DRAM “Transient Data”. The full rate data can even be discarded, using the EPICS waveform display as a diagnostic indicator.

Raw data is streamed continuously to Ethernet. This is valid at rates up to low

20's Mbytes/second

10.2 Preparation

10.2.1 Define capture conditions

Clock and Trigger definition. It's not necessary to set this up since sensible defaults are provided.

set.site

1 clk=CLK

set.site

1 trg=TRG

10.2.2 Define the AGGREGATOR set

The

run0

command configures the set of modules that are participating in the capture, eg to include modules in sites 1,2,3,4:

run0

1,2,3,4

The system is now primed and ready to go. All we have to do is “start the stream”.

10.2.3 Port 4210 : Aggregator data port

To start the stream, connect a socket to port 4210 and read data. In the simplest case, run streamtonowhere nc localhost 4210 > /dev/null

Or, with a rate indicator: nc localhost 4210 | pv > /dev/null

Rev 15 Page 44 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

10.3 Network Streaming data capture

Stream data over Ethernet. Effective into the low 20's MB/s (suitable for

ACQ435, and ACQ420/ACQ425 in low channel count or low rates) :

# from another host nc UUT 4210 | pv > mybigdatafile

Of course, all

nc

does is open a TCP socket and read data. Your host side software may not be

nc

, but it will do the same thing – open a socket and read.

This is rate limited by the ZYNQ TCP/IP capability. For full rate streaming, we recommend using ACQ2106 and PCI-Express or SFP fiber optic.

10.3.1 Repeating Gate Mode

Repeating Gate Mode RGM is frequently superimposed on streaming data.

With RGM, the capture proceeds indefinately, but is broken into bursts by a hardware GATE signal. This keeps the data stream in sync with some external event, and it may also reduce the data rate on the wire. There are 3 ways to operate:

RGM: GATE ACTIVE starts data flow, GATE INACTIVE stops flow.

RTM : Repeating Transient mode: Trigger to start, captures a programmable burst length and stops.

SRTM : As RTM, but resyncs the sample clock to the Trigger every trigger edge. This feature is only available on oversampling digitizers like ACQ435ELF.

10.4 Transient Data Capture

This is “SHOT BASED” data acquisition. The unit allocates 512MB memory for shot data. Capture starts on trigger and ends after a pre-programmed number of samples. Data is then available for upload.

Transient capture uses a ZERO-COPY mechanism to store the data in a series of 512, 1MB buffers. After the shot, the data may be be access raw

(fastest, but most complex for applications) or de-muxed in place. The demux data is presented as a set of virtual files:

/dev/acq400/data/$site/??

The simplest way to access these files is to install the “channel server” :

make-ch-server

Do this AFTER running “

run0

”. Now each channel's data is presented per channel on sockets

53000+CC

. Simply connect to the required port and read the data.

Rev 15 Page 45 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

10.4.1 Configure a Transient Capture.

Transient capture may be configured programmatically as follows:

transient [PRELEN=N] [POSTLEN=N] [OSAM=1] [SOFT_TRIGGER=1]

Then run

set_arm

With SOFT_TRIGGER=1 set, the capture will start immediately.

Monitor the capture using

acq4xx-transient-console

.

Note that a CSS OPI provides the same functionality as a remote-able GUI.

The transient and set_arm commands are available on the command line to local scripts, they are also available as knobs on site 0 : set.site 0 transient POST=1000 SOFT_TRIGGER=1 set_arm transient_state

0 0 0 0

10.4.2 Transient Upload Methods

There are many possible ways to access the data, here are some examples.

Load from well known port e.g. 53000+CC

• use

scp

(slow).

The multi-purpose

curl

client is included.

The files could be saved to an NFS mount.

The files can be saved to a CIFS (Windows) file share eg perhaps from a NAS box.

Direct upload to MDSplus is supported, please see 18.

Save files to load USB disk.

Rev 15 Page 46 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

11 Streaming Data format

By default, raw data is streamed to the streaming output port. ACQ400 also offers a variety of hardware-generated frame structures to aid in decoding this data over a long period.

11.1 ACQ435, default coding of spare bits

ACQ435 data, with 24 data bits in a 32 bit field, imposes a module/channel encoding on the unused bits as an aide to checking channel alignment:

• d7-d5 : SITE SSS {1..6} d4-d0 : CHANNEl {0..31}

d31-d08

CH00 data 0xaabbcc

CH01 data 0xaabbcc

...

CH31 data 0xaabbcc

SSS

SSS

...

SSS

d7-d5 d4-d0

00000

00001

...

11111

11.2 ACQ435, Embedded bits

Enable as follows:

# set.site N bitslice_frame=1

With Embedded bits enabled, bits d7.d5 become dynamic, with values inserted by the FPGA. With a 32 channel sample, a 3 x 32 bit words of signaling information are available.

• d7 : SC : Sample Count, inserted by hardware d6 : SEW0 : Software Embedded Word 0, inserted by software. A typical use of this is PPS: a latched sample count on external PPS signal.

d5 : SEW1 : Software Embedded Word 1, inserted by software. A typical use of this is to embed an NMEA string from an external GPS, 3 chars at a time. The 4 th

char is typically an index value; this is necessary because the SEW is updated asynchronously at a slow rate relative to the sample rate, and a decoder needs to see the index value change to detect a new data word.

Rev 15 Page 47 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

11.3 Generic Frame Word

Optional single 32 bit tag word, inserted at the start of a sample. Multiple tag words over multiple samples make up a frame. Currently, a 4-sample frame is defined:

FrameID : 4 bits, valid 0, 1, 2, 3 : identifies part of frame

DI4 : 4 bits, DI4 data, full rate.

META1: 32 bits, 8 bits per sample, sequence 0xaabbccdd

META2: 32 bits, 8 bits per sample, sequence 0xaabbccdd

SC : 32 bits, Sample Count, 8 bits per sample, sequence 0xaabbccdd

Function

BITS

MASK

LABEL

SC

d31:d24

0xff

SCaa

SCbb

SCcc

SCdd

META2

d23:d16

0xff

SW2aa

SW2bb

SW2cc

SC2dd

META1

d16:d8

DI4

d7:d4

0xff 0xf

SW1aa DI4 3:0

SW1bb DI4 3:0

SW1cc DI4 3:0

SW1dd DI4 3:0

FrameID

d3:d0

0xf

0x1

0x2

0x3

0x4

0x5..0xf undefined

11.3.1 Meta Modes

MODE

MODE1

MODE2

MODE3

MODE4

META1 META2

SW REG 1 SW REG 2

LATCH COUNT SW REG 2

DI15-DI08 DI07:DI00

ENCODER1 ENCODER2

Description

Software inserted values

Event Latch / SW value

DIO input word (when fitted)

Shaft encoder input

NB: there's no indication of MODE in the stream. Application software is responsible for setting mode before the stream starts. It's anticipated that

STREAM_DATA_MODE will be a 2 bit field in a Site 0 reg.

NB: DI32 data? Not supported in the GFW. If full rate, full width DI data required, then then should be as part of a site-specific FIFO. That's more expandable, as it will then support multiple DI32 ports

11.3.2 Data Rates:

Example: ACQ420FMC-4-2000 : 4 x 2 bytes + 4 bytes tag = 12 bytes/sample.

Running at 2MSPS, data rate is 24MBytes/sec.

Rev 15 Page 48 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

0

1

2

3

4

5

6

7

11.4 Scratchpad

Valid for all data type (16 or 32 bit).

Extended 8 x 32 bit tag, inserted every sample.

The scratchpad is encoded as follows.

SC : Sample Count inserted by hardware

SEW[1-7] : Status words inserted by software.

Word Function

SC Sample Count

SEW1

SEW2

SEW3

SEW4

SEW5

SEW6

SEW7

11.5 Example Package

The “CUSTOM_TUNA” package shows how to use the bitslice frame to embed both a timestamp (relative to a GPS ONEPPS edge) and low rate

GPS NMEA data in the data stream.

Rev 15 Page 49 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

12 Synchronisation

12.1 Between modules on a carrier

Carriers include a synchronization bus to allow multiple modules to share clock, trigger and index signals if required.

12.2 Between carriers

Carriers implement a simple timing daisy-chain based on standard, low cost

HDMI cables. Each carrier has an IN and an OUT HDMI connector.

With multiple units, the units are connected by a daisy chain of HDMI cables, the first unit in the chain is defined as the MASTER and all downstream units are SLAVES. Definition of MASTER and SLAVE is automatic. The MASTER has the plant TRG signal on the front panel. The MASTER enables the TRG to itself and all the SLAVEs only after it has been armed. So, to ensure simultaneous capture on all boxes, user HOST software should first connect the data path on all the SLAVE boxes, lastly, connect to the MASTER, and data flows on the next TRG edge.

The optional package 98-custom_sync configures a common

MASTER/SLAVE setting.

12.2.1 Custom_Sync Example

Master (trigger on front panel)

• set.sync.role MASTER clock-hz

Slave set.sync.role SLAVE clock-hz

Soft Trigger Master (self generates trigger)

set.sync.role SOFT_TRIG_MASTER clock-hz nb: Slave needs to know clock-hz in for delta-sigma converters in order to select the correct mode.

12.2.2 Gate Pulse Generator GPG

Generates a series of pulses on trigger.

Include optional package 38-custom_8pps, use command load.pulse_def to configure a pulse train. Load.pulse def configures a sensible default, many other options are possible. It's a TCL script, intended for site localisation.

Multi-box sync is enabled with the GPG via this command: set.master-slave-hdmi.role {AI64M, AI64S} PPS SR TRANSLEN

Where AI64M is the master box, AI64S each slave box. PPS is pulses per second, triggered by an external ONEPPS (eg from a GPS unit) and

TRANSLEN is the pulse capture length in samples

Rev 15 Page 50 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

13 DSP Features

13.1 Oversampling filter

Accumulate/Decimate filter. Accumulate NACC samples, then output one value. Allows for data reduction with improved SNR and aliasing reduction due to oversampling.

Feature available only for 32 bit data (data32=1).

set.site N nacc=NACC,SHR

NACC=1,2,3,4..32

SHR=1,2,3,4,5

14 AWG Feature / Wavegen

Works with both AO424ELF and AO420FMC

Package 99-custom_awg. Configures an ftp server at port 21 to allow binary waveform upgrade as well as a “channel service” that allows a simple TCP client to connect to socket 5400+CHANNEL to upload data.

Channel is numbered 1..N for the first AO card in the lowest site, and continues for other AO cards in higher sites.

Example:

AO424ELF-32 in site 1 : Ports 5401 .. 5432

AO420ELF-4 in site 2 : Ports 5433 .. 5436

Both the ftp server and the channel server leave user binary files in

/usr/local/awgdata.

The wavegen command is used to load the waveform eg

# one shot, 1..36 channels wavegen 1:36=ch/ch%02d

# one shot, repeating trigger, canned waveform, same all channels wavegen -s 1 -R 1 1:32=/mnt/local/sinfs.dat

# run continuously in a site-relative mode wavegen -s 5 -l 1 1=sin.dat

Rev 15 Page 51 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

15 ACQ480 Special Features

ACQ480 runs significantly faster than the other ACQ400 series modules. It uses a different bus structure and a different DMA engine. The ADS6294 device also has a number of DSP features, and there may be switchable 50R termination.

15.1 Switched 50R termination

Control per channel

T50R_1

T50R_2

T50R_3

T50R_4

T50R_5

T50R_6

T50R_7

T50R_8

15.2 Source Synchronous Clocking

The ADS5294 provides data on LVDS lanes that need to be individually trained. The ACQ400 software autodetects when training is required and runs a training cycle (about 1s per site) on ARM. The firmware will detect and error out if the training is lost during the capture.

Training is lost when the clock is interrupted or modified.

ACQ480FMC for use on ACQ1001 also features a “jitter cleaner” chip, this is also auto configured at start of capture. ACQ2106 has a more advanced clock and so does not need the jitter cleaner; however if the jitter cleaner is present, it will be set correctly.

15.3 Valid Clock Rates.

Minimum clock rate for ADS5294 : 10MHz. Maximum clock rate on ACQ2106 :

50MHz; ACQ1001FMC will be able to support an 80 MHz clock rate. Note that the wire clock rate is the sample clock divided by any decimation enabled on the ADS5294.

15.4 AXI DMA : Segmented Capture

To cope with the higher data rate, ACQ400 uses and AXI-64 memory port and the Xilinx AXI DMAC. A feature of the AXI DMAC is that it uses conventional DMA chains, and this makes it feasible to offer a

“segmented capture” technique.

Block size = 4MB, 0x400000/16bytes = 262144.

Rev 15 Page 52 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

Method

1. Define the segments.

Segments are 4MB blocks, there are 128 "real" blocks.

(160 in an optimised system). sample segment definition file: acq1001_080> cat /mnt/local/segments2

+1

-5 loop to=0 count=4

+4

-10

+999

Rules:

+N : store N segments

-N : dump N segments worth of data loop to=STEP count=COUNT : repeat sequence from STEP, COUNT times.

In the example, repeat {+1, -5} 4 times

+999 : store to the end (any big enough number will do).

Load the segments

This MUST happen before the first capture. Then the segment list persists for the life of the machine (reboot to change).

This could happen in the boot script /mnt/local/rc.user eg cat /mnt/local/segments2 >/proc/driver/acq400/0/SEGMENTS

And you can review the expanded list, note the sequence {+1,-5} x 4 acq1001_080> cat /proc/driver/acq400/0/SEGMENTS

# DMA SEGMENTS

+001

-005

+001

-005

+001

-005

+001

-005

Rev 15 Page 53 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

+001

-005

+004

-010

+999

The sequence could have been defined long-hand, of course, the loop construct is simply a shorthand.

Run a shot. The DMA chain looks like this:

Rev 15 Page 54 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

acq1001_080> cat /proc/driver/acq400/0/AXIDESCR

# AXI DESCRIPTORS 162/1043

# b: buffer pa, l: length '+' :: STORE, '-' :: DUMP i:080ac000,000, n:0x080ac040,001 b:29c00000 l:00400000 + i:080ac040,001, n:0x080ac080,002 b:09800000 l:00400000 - i:080ac080,002, n:0x080ac0c0,003 b:09800000 l:00400000 - i:080ac0c0,003, n:0x080ac100,004 b:09800000 l:00400000 - i:080ac100,004, n:0x080ac140,005 b:09800000 l:00400000 - i:080ac140,005, n:0x080ac18,006 b:09800000 l:00400000 - i:080ac180,006, n:0x080ac1c0,007 b:29800000 l:00400000 + i:080ac1c0,007, n:0x080ac200,008 b:09800000 l:00400000 - i:080ac200,008, n:0x080ac240,009 b:09800000 l:00400000 - i:080ac240,009, n:0x080ac280,010 b:09800000 l:00400000 - i:080ac280,010, n:0x080ac2c0,011 b:09800000 l:00400000 - i:080ac2c0,011, n:0x080ac300,012 b:09800000 l:00400000 - i:080ac300,012, n:0x080ac340,013 b:29400000 l:00400000 + i:080ac340,013, n:0x080ac380,014 b:09800000 l:00400000 - i:080ac380,014, n:0x080ac3c0,015 b:09800000 l:00400000 - i:080ac3c0,015, n:0x080ac400,016 b:09800000 l:00400000 - i:080ac400,016, n:0x080ac440,017 b:09800000 l:00400000 - i:080ac440,017, n:0x080ac480,018 b:09800000 l:00400000 - i:080ac480,018, n:0x080ac4c0,019 b:29000000 l:00400000 + i:080ac4c0,019, n:0x080ac500,020 b:09800000 l:00400000 -

...

i:080acf00,060, n:0x080acf40,061 b:23800000 l:00400000 + i:080acf40,061, n:0x080acf80,062 b:23400000 l:00400000 + i:080acf80,062, n:0x080ae000,063 b:23000000 l:00400000 + i:080ae000,063, n:0x080ae040,064 b:22c00000 l:00400000 + i:080ae040,064, n:0x080ae080,065 b:22800000 l:00400000 + i:080ae080,065, n:0x080ae0c0,066 b:22400000 l:00400000 + i:080ae0c0,066, n:0x080ae100,067 b:22000000 l:00400000 + i:080ae100,067, n:0x080ae140,068 b:21c00000 l:00400000 + i:080ae300,075, n:0x080ae340,076 b:1f400000 l:00400000 + i:080ae340,076, n:0x080ae380,077 b:1f000000 l:00400000 +

... i:088c7800,158, n:0x088c7840,159 b:0a800000 l:00400000 + i:088c7840,159, n:0x088c7880,160 b:0a400000 l:00400000 + i:088c7880,160, n:0x088c78c0,161 b:0a000000 l:00400000 + i:088c78c0,161, n:0x080ac000,000 b:09c00000 l:00400000 +

15.5 DSP Features

15.5.1 FIR Filter

ADS5294 has a number of FIR filter settings.

Please note ALL channels in a system should be set to have the SAME FIR filter (or at least, the same DECIMATION) acq480_setDecimationFilter

Rev 15 Page 55 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

15.5.2 Other Filters

acq480_setHiPassFilter acq480_setLFNS

15.5.3 Gain Controls

ACQ480:GAIN:01

ACQ480:GAIN:02

ACQ480:GAIN:03

ACQ480:GAIN:04

ACQ480:GAIN:05

ACQ480:GAIN:06

ACQ480:GAIN:07

ACQ480:GAIN:08 acq480_setInvert

Rev 15 Page 56 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

16 DIO432 Special features

Byte programmable directions set.site N byte_is_output X1,X2,X3,X4 where N is the location of the module and

X is 1 for output and 0 for input

X1 represents bits 0..7, X2: 8..15, X3: 16..23, X4: 24..31

example: set.site 5 byte_is_output 1,1,0,0

# set two output, two input bytes on module in site 5

Select Clocked or immediate mode set.site N mode M where N is the location of the module and

M is 1 for IMMEDIATE and 2 for CLOCKED.

example set.site 5 mode 2

# set module in site 5 to CLOCKED mode.

In immediate mode, write to DO32, read from DI32 set.site N DO32 hexval get.site N DI32 hexval

Rev 15 Page 57 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

17 Server Port Reference

Commonly used ports in BOLD.

17.1 Peers and Groups

With a multiple board set, it may be tedious to control the same knobs on each site in turn. Systems that ship with multiple modules of the same type, include a PEER group where commonly used knobs are set on site 1 and the change is automatically copied across all sites.

Similarly, modules like ACQ435 have a large number of similar knobs in the same site (Gain control for each channel). Collecting all the channel gain controls into a GROUP allows a single group knob to make the same setting on all the channel knobs.

17.2 Standard Server Ports

2222/tcp

2223/tcp

acq4xx-epics-console

acq4xx-aimonitor-console

2224/tcp acq4xx-mdsshell-console

2225/tcp acq4xx-transient-console

2226/tcp acq4xx-nowhere-console

2235/tcp acq4xx-transient-log-console

4210/tcp

stream from aggregator

4211/tcp

4212/tcp stream direct site 1 (deprecated) stream direct site 2 (deprecated)

4213/tcp stream direct site 3 (deprecated)

4214/tcp stream direct site 4 (deprecated)

4215/tcp

4216/tcp stream direct site 5 (deprecated) stream direct site 6 (deprecated)

4220/tcp

site 0 knobs

4221/tcp

site 1 knobs

4222/tcp

4223/tcp

site 2 knobs site 3 knobs

4224/tcp

4225/tcp

4226/tcp

site 4 knobs site 5 knobs site 6 knobs

Rev 15 Page 58 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

4236/tcp site 16 knobs (special case)

4240/tcp bos : Big One Shot : high speed raw transient

4241/tcp crb : Concatenate Raw Buffers: output all raw data

Rev 15 Page 59 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

17.3 Channel Data Server Ports

Read channelized capture data direct from 53000+CH, example 32 channels.

53000/tcp run.transient.service/gash (deprecated)

53001/tcp cat dev/shm/transient/ch/01

53002/tcp cat dev/shm/transient/ch/02

53003/tcp cat dev/shm/transient/ch/03

53004/tcp cat dev/shm/transient/ch/04

53005/tcp cat dev/shm/transient/ch/05

...

53032/tcp cat dev/shm/transient/ch/28

17.4 Custom_awg Server Ports

Send channelized raw AWG data direct to these ports:

54001/tcp

54002/tcp

54003/tcp

54004/tcp stdin2file /usr/local/awgdata/ch/ch01 stdin2file /usr/local/awgdata/ch/ch02 stdin2file /usr/local/awgdata/ch/ch03 stdin2file /usr/local/awgdata/ch/ch04

Rev 15 Page 60 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

18 MDSplus Thin Client Example

The MDSplus and thin client is an effective way to send data to an MDSplus server.

18.1 Pre-requisites

18.1.1 Configure MDSplus tree on host

Tree creates using make_acqtree. Example structure for tree name

“ACQ1001” : make_acqtree acq1001 A017_1,4

18.1.2 Install firmware

Valid from this release: http://www.d-tacq.com/swrel/acq4xx-227-20140505214450.tgz

Update in the normal way: copy to host:/tmp

/mnt/bin/update_release /tmp/acq4xx*

18.1.3 Customise firmware

mv /mnt/packages.opt/70-mdsshell* /mnt/packages mv /mnt/packages.opt/99-custom_awg-1404301628.tgz /mnt/packages

Rev 15 Page 61 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

18.1.4 Review post-shot script

cp /usr/local/CARE/mdsputch-postshot-example /mnt/local/postshot acq1001_017> cat /mnt/local/postshot

#!/bin/sh

# example postshot script

# to activate, copy to /mnt/local/postshot mdsConnect andros mdsOpen acq1001 mdsPutCh --site=1 --field=A017_1.CH%02d -D=/dev/acq400/data/1/%02d

-v 1 --expr %calsig 1:4 mdsValue setEvent\(\'acq1001done\',42ub\) mdsClose

18.2 Run The Shot

For example, we configure an AO420FMC AWG in SITE2 to loopback to an

ACQ420FMC digitizer in SITE1. Add this to

/mnt/local/rc.user

to make a turnkey system: acq1001_017> cat /mnt/local/rc.user

cp /usr/local/CARE/acq400_streamd.0.conf-soft_trigger

/etc/sysconfig/acq400_streamd.0.conf

# mdsplus demo

# site 2 has an AO420FMC : else use a signal generator

## set the AWG to trigger on soft trigger, use default clocking set.site 2 trg=1,1,1

## specify some waveforms set.site 2 wavegen --loop 1 1=sin.dat 2=saw.dat 3=pulse1.dat

4=pulse2.dat

# site 1 has an ACQ420FMC digitizer

## set to trigger off soft trigger, use default clocking set.site 1 trg=1,1,1

# configure the capture globally set.site 0 run0=1 set.site 0 soft_transient 20000

# repeat the final command to run another shot.

Rev 15 Page 62 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

18.3 Plot the data

Rev 15 Page 63 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

19 Big One Shot example

Example for 4xACQ425 System cat /mnt/local/rc.user

# tweak up the analog rails to +/-13V set.sys /dev/acq2006/vap 18 set.sys /dev/acq2006/van 18

# cat - >/etc/acq400/1/peers <<EOF

PEERS=1,2,3,4

KNOBS=clkdiv,trg,rgm

EOF set.site 1 trg=1,1,1 set.site 1 clkdiv=100 run0 1,2,3,4 transient POST=1000000 SOFT_TRIGGER=1

• clkdiv=100 :: 100MHz clock / 100 = 1MSPS sample clock trg=1,1,1 :: SOFT TRIGGER, PEER mechanism copies all sites.

run0 1,2,3,4:: aggregate data from all 4 modules transient POST=1000000 SOFT_TRIGGER=1

â—¦

equivalent to "acqcmd setMode SOFT_TRANSIENT 1000000".

We don't have an explicit “setArm”, instead connect a socket to port 4240 and read status: nc acq2006_013 4240

0 0 0 0

1 0 0 0

3 0 0 0

3 0 8192 8192

3 0 16384 16384

3 0 32768 32768

...

3 0 999424 999424

4 0 1000000 1007616

0 0 1000000 1007616

nc

connects to a TCP socket at port 4240 and listens

This is a combined "setArm" and "getNumSamples".

Because we set SOFT_TRIGGER=1, the system triggers automatically.

The fields are:

3 0 8192 8192

STATE PRE POST ELAPSED

Where

Rev 15 Page 64 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

STATE: 0:STOP, 1:ARM, 2:RUN_PRE, 3:RUN_POST, 4:POSTPROCESS

PRE : only PRE=0 is supported at this time

POST : number of POST trigger samples so far

ELAPSED : total number of samples so far

After the shot, pull raw data from the host as follows: nc acq2006_013 4241 | pv > bigfoot1M4

What happens here?

nc

connects a TCP socket to port 4241 and reads data

pv

is a convenience program to show upload state/speed

The raw data on disk can be demuxed and stored or displayed.

eg acq_demux -a ../acq2006-4x425.def bigfoot1M4

Where the definition file is ..

[pgm@ahoy BOS]$ cat ../acq2006-4x425.def

ACQ=acq196

WORD_SIZE=2

AICHAN=64

Rev 15 Page 65 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20 Fault-monitor example

Typical example:

1. ACQ1002R + 2 x ACQ435ELF-32 : 64 channels, 128kSPS, 24 bit

2. ACQ1001Q + 1 x ACQ430ELF-8 : 8 channels, 128ksSPS, 24 bit.

20.1 Features

1. Unit is a networked EPICS IOC

2. Capture runs continuously at full rate to local DRAM configured as a circular buffer.

3. During the capture, subrate data is published as an AI record per channel, typically at 10Hz.

4. During the capture, snapshots of full rate data are published as waveform (WF) records.

5. The use can specify a trigger condition (currently, this is a front panel digital input), PRE samples and POST samples.

6. The system continuously monitors the trigger input, and once the trigger occurs, continues for POST samples, then stops, publishing the

PRE+POST data as a full-rate WF records.

Rev 15 Page 66 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.2 Example CSS GUI

20.2.1 Launcher

Always use the Launcher to run other .opi's. The Launcher allows you to specify the UUT (eg acq1001_041) and, where required, the module

SITE number.

1

2

4

5

3

6

Select UUT : model and serial to create unique PV prefix

1

Select SITE to use with module-specific OPI's in dark green

Control Fault Monitor from the Transient OPI

Live full-rate snapshot/scope plot

4

3

2

Post shot full-rate pre/post scope display.

Live monitors for subrate data.

6

5

Subrate data best shown on a stripchart (user must create .plt stripchart directly.

Rev 15 Page 67 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.2.2 Typical Multi-opi display

1

2

5

4

3

3

4

1

2

5

6

Transient controller showing status

Subrate Strip-chart

Subrate text display

Subrate tank display (good for wiring check)

Full rate live-scope

Full rate pre-post post-mortem (from previous shot).

6

Rev 15 Page 68 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.2.3 Transient GUI

Press “Default” to set sensible values.

Optionally, modify PRE, POST (PRE+POST <= 16384) and

SOFT_TRIG.

Press “setMode” to commit to the unit

Press ARM to start, setAbort to abort.

Live status update during capture:

Rev 15 Page 69 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.2.4 Slow rate strip plot, with scope and post-shot display

20.2.5 New Autorepeat function

Rev 15 Page 70 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.3 EPICS record reference

PV NAME

${UUT}:${SITE}:AI:CH:${CH} acq1001_041:2:AI:CH:01

${UUT}:${SITE}:AI:WF:${CH}:V acq1001_041:1:AI:WF:01:V

${UUT}:${SITE}:AI:TW:${CH}:V acq1001_041:1:AI:TW:01:V

Type

AI

WF

WF

FUNCTION

Single channel Subrate data, scalar value updated at 10Hz

Single Channel Live

Snapshot waveform in volts

Single Channel Transient

Waveform in VOLTS

${UUT}:MODE:TRANSIENT:PRE

${UUT}:MODE:TRANSIENT:POST

${UUT}:MODE:TRANSIENT:OSAM

${UUT}: longout longout longout longout

Specify PRE samples

Specify POST samples

Set !=0 for subrate data

Set ==1 for soft trigger

MODE:TRANSIENT:SOFT_TRIGGER

${UUT}:MODE:TRANSIENT longout

Set to commit above values

${UUT}:MODE:TRANSIENT:SET_ARM longout Start a capture

${UUT}:MODE:TRANSIENT:SET_ABORT longout

Abort a capture

${UUT}:MODE:TRANS_ACT:PRE longin

Monitor PRE sample actual

${UUT}:MODE:TRANS_ACT:POST longin Monitor POST sample actual

${UUT}:MODE:TRANS_ACT:TOTSAM longin

${UUT}:MODE:TRANS_ACT:STATE mbbi

Monitor elapsec sample actual

Monitor state actual

${UUT}:0:SIG:CLK_S1:FREQ

${UUT}:0:SIG:SYN_S1:FREQ longin longin

Site 1 source clock Hz

Site 1 sample clock Hz

Rev 15 Page 71 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

20.4 Data Still Available outside EPICS.

20.4.1 Subrate

Binary raw channel vector update at subrate: ls -l /dev/shm/subrate

.. 256 Sep 21 11:38 /dev/shm/subrate

20.4.2 Snapshot

Binary channelized data, presented one file per channel, at about 1Hz: acq1001_041> ls /dev/shm/AI.1.wf

CH01 CH04 CH07 CH10 CH13 CH16 CH19 CH22 CH25 CH28 CH31

CH02 CH05 CH08 CH11 CH14 CH17 CH20 CH23 CH26 CH29 CH32

CH03 CH06 CH09 CH12 CH15 CH18 CH21 CH24 CH27 CH30

This could be in “Dirfile Format” for direct plot by kst. eg from an NFS or

SAMBA mount.

20.4.3 Post Shot

Post shot data is held at /dev/acq400/data/.

NB: this is a virtual file system mapping onto kernel buffers. This allows large files (because it doesn't take additional space eg on a RAMDISK), but it also means the data is erased immediately on the next shot.

acq1001_041> ls -l /dev/acq400/data/ total 0 drw-r--r-- 1 root root 0 Sep 21 10:35 0 drw-r--r-- 1 root root 0 Sep 21 10:35 1 drw-r--r-- 1 root root 0 Sep 21 10:35 2 drw-r--r-- 1 root root 0 Sep 21 10:35 raw acq1001_041> ls -l /dev/acq400/data/1/ total 0

-rw-r--r-- 1 root root 65536 Sep 21 11:30 01

-rw-r--r-- 1 root root 65536 Sep 21 11:30 02

-rw-r--r-- 1 root root 65536 Sep 21 11:30 03

-rw-r--r-- 1 root root 65536 Sep 21 11:30 04

-rw-r--r-- 1 root root 65536 Sep 21 11:30 05

/dev/acq400/data/0 : channelised mappings for all data in set (not used)

/dev/acq400/data/[12] : channelised mappings per channel.

/dev/acq400/data/raw : view of raw data (not valid after channelise process)

Rev 15 Page 72 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

21 Capture With ACQ425ELF

21.1 One Shot transient with auto-repeat

Configure a one-shot capture at up to 2MSPS with up to 8MS in memory, plot up to 100K points in CSS. nb: do not use with “external stream”.

1

2

1

First, press

Default..

, optionally change

NSAM

, then press

SetMode

Then Control

Arm/Stop CLK

,

Samples

,

Trigger

.

Repeat

=-1 means autorepeat forever.

2

3

Plots 8x 100K points, post shot

To see the other 8 channel, select “

Post Shot Volts 09..16

” and arrange layout to suit.

After the shot, channelized data is available at ports 53001..53016.

Select gain per channel.

3

Rev 15 Page 73 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

21.2 Streaming capture to Ethernet with CSS Scope

2

3

1

Stream to a remote computer at 16c x 1MSPS, control and view from CSS

1

Stream continuously, Linux or Windows (cygwin)

nc UUT 4210 | pv > /dev/null

# discard

nc

UUT 4210 | pv > bigrawfile

# raw to disk

2

Transient controls unused, apart from CLK rate.

Do NOT press “

Arm

3

Live Plot Volts: shows a scope display snapshot of data at full rate.

Press “

Live Plot Volts 01..08

” or “

Live Plot Volts 09..16

Rev 15 Page 74 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

22 Full Rate streaming with ACQ2106

ACQ2106 features 4 MGT ports. Currently, two ports are supported.

The ports are rated at 5Gbps, with an achievable capacity of 250MBytes/s each. Each port is separated by a full-duplex bi-directional DMA channel.

DMA processes can be configured for:

1. FARM: the SAME data is sent to each channel for distribution on fiberoptic.

2. SPLIT: data can be split between fiber optic channels. This is useful for connecting to the previous-generation AFHBA card, to increase data throughput.

The DMA channels can operate in

1. PUSH : Analog Input to HOST and

2. PULL : fetch Analog Output from HOST.

Note also that the FPGA-> A9 -> DRAM path is still active. The full data rate can be too high for the A9 to handle, so this path includes programmable decimation. A fully loaded system is then able to stream full rate data out of the MGT ports, while collecting sub-rate data in the A9 system for presentation on Ethernet.

22.1 Host Side Driver

Install host-side driver on HOST OS. We recommend linux-rt 3.10

22.2 Example Test procedure

TBA

22.3 Web Diagnostic

TBA

22.4 CSS Diagnostic

TBA

Rev 15 Page 75 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

23 Timed Captures: VCR mode

ACQ1001 can be configured with one or two USB disks.

The system can be configured to duplicate raw capture data to each disk.

The capture can be scheduled to start at a given time.

23.1 Packages

/mnt/packages/39-transient-1502192115.tgz

/mnt/packages/34-at-1502112135.tgz

23.2 Custom Configuration

ls /mnt acq1001_044> cat /mnt/local/sysconfig/transient.init

TCON=/usr/local/bin/stream2disks

MB=32000

VERBOSE=1

23.3 Scheduled start:

acq1001_044> echo set_arm | at 01:33 job 4 at Fri Feb 20 01:33:00 2015

23.4 Capture Log:

Feb 20 01:33:00 (none) user.notice stream2disks: start shot:5 MB:32000

/diska /diskb

Feb 20 01:33:00 (none) user.notice acq400_streamd: data_engine_0

0xf3004001 sites=none aggregator=1 on

Feb 20 01:33:00 (none) user.notice acq400_streamd: site0 sites=1

Feb 20 01:33:00 (none) user.debug acq400_stream[16387]: hello world

B1004

Feb 20 01:33:00 (none) user.debug acq400_stream[16389]:

G_aggsem:0xb6f42000

Feb 20 01:33:01 (none) user.notice soft_trigger: trigger start

Feb 20 02:58:35 (none) user.notice stream2disks: finished

Rev 15 Page 76 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

23.5 Result

acq1001_044> df

/dev/sda1 31250016 31250016 0 100% /diska

/dev/sdb1 31250016 31250016 0 100% /diskb acq1001_044> find /diska/ | head

/diska/

/diska/000

/diska/000/000000

/diska/000/000001

/diska/000/000002

/diska/000/000003

/diska/000/000004

/diska/000/000005

/diska/000/000006

/diska/000/000007 acq1001_044> find /diska/ | tail

/diska/305/030590

/diska/305/030591

/diska/305/030592

/diska/305/030593

/diska/305/030594

/diska/305/030595

/diska/305/030596

/diska/305/030597

/diska/305/030598

/diska/305/030599 ie 30500 x 1MB files on disk.

Offload the data using the network (rather than remove the USB sticks ..

ftp server on acq1001 and recursive wget on the host..

Rev 15 Page 77 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

23.6 Offload

acq1001_044> tcpsvd -vE 0.0.0.0 21 ftpd /diska time wget -r ftp://root:password@acq1001_044

...

--2015-02-20 10:17:39-- ftp://root:*password*@acq1001_044/305/030599

=> \u201cacq1001_044/305/030599\u201d

==> CWD not required.

==> SIZE 030599 ... done.

==> PASV ... done. ==> RETR 030599 ... done.

[ <=> ] 0 --.-K/s in 0s

2015-02-20 10:17:39 (0.00 B/s) - \u201cacq1001_044/305/030599\u201d saved [0]

FINISHED --2015-02-20 10:17:39--

Downloaded: 30600 files, 30G in 34m 37s (14.7 MB/s)

23.7 Suggestion for improved accuracy

In VCR mode, with good NTP performance, the system will soft-trigger, with a jitter of about 1s.

D-TACQ recommends using a local GPS with a ONE PPS output. First, the

GPS conditions NTP to ensure it's accurate (and works off the Net).

Second, the ONE PPS signal should be used as a hardware trigger.

Software enables the capture during the second before the scheduled start: the capture then starts at the start of the designated second, with microsecond jitter.

Rev 15 Page 78 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

24 Boot time Customization.

24.1 Include Custom packages

Move optional packages from /mnt/packages.opt to /mnt/packages.

24.2 Configuration files

24.2.1 /mnt/local/sysconfig/bos.sh

Provides limits to transient captures

PREMAX=0

POSTMAX=4000000

24.2.2 /mnt/local/sysconfig/epics.sh

Customisation for local EPICS IOC: standard EPICS environment variables and custom D-TACQ changes

# standard EPICS vars eg large arrays export EPICS_CA_MAX_ARRAY_BYTES=500000

# set an alias prefix to alias every record

#export IOC_GLOBAL_ALIAS_PFX=bl22b-di-adc-01

# set a script to source BEFORE iocInit()

#export IOC_PREINIT=/mnt/local/epics-custom

# set a script to source AFTER iocInit()

#export IOC_POSTINIT=/mnt/local/epics-custom

24.2.3 /mnt/local/sysconfig/site-1-peers

Sets “peer knobs” on slave sites to be controlled by the site 1 knob.

eg

PEERS=1,2

KNOBS=gain,clkdiv,clk,trg,sync,rgm,event0,gx

24.2.4 /mnt/local/sysconfig/transient.init

Customisation for transient capture. eg

COOKED=1 NSAMPLES=32768 NCHAN=64 TYPE=LONG echo /mnt/local/sysconfig/transient.init set up soft_trigger, two sites set.site 1 trg=1,1,1 run0 1

Rev 15 Page 79 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

24.2.5 /mnt/local/acq400.sh

Optional file

REBOOT_KNOB=y

Creates a site 0 knob, and EPICS PV to allow external reboot.

24.2.6 /mnt/local/acq420_custom

Optional File

DRVR_CUSTOM=data_32b=1

BLEN=4194304 NBUF=128

DRVR_CUSTOM=data_32b=1 : force device driver to load with 32 bit data.

Custom buffer settings, recommended for high throughput, eg ACQ425-16-2000, ACQ424-32-1000

BLEN: Buffer length, default = 1M, recommend 4M (must be power of 2)

NBUF: number of buffers. Total 512MB is safe, higher counts may be possible, only useful for transient capture.

24.2.7 /mnt/local/sysconfig/acq400_streamd.conf

Streaming options:

--subset=[start-channel,]length : reduce output channel count to length, starting from start-channel [1]

--sum=[start-channel,]length : sum over length channels, starting from start-channel [1] sum output as stream of int32 from port 4270

STREAM_OPTS="--subset=8 –sum=4"

24.3 Final boot customisation

store final adjustments in /mnt/local/rc.user

# for soft trigger on streaming connect - most systems do this cp /usr/local/CARE/acq400_streamd.0.conf-soft_trigger \

/etc/sysconfig/acq400_streamd.0.conf

Rev 15 Page 80 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

25 Reliability Features

25.1 Watchdog Timer

The ZYNQ SOC includes a hardware watchdog timer wdt. This is a failsafe feature, once enabled by software, software has to service the wdt at a regular interval. If it's not serviced, the wdt will reboot the unit.

25.1.1 Local Service

The wdt may be serviced locally by running the watchdog daemon: watchdog /dev/watchdog0

This may be of limited use, since the software process will only stop if the entire OS is locked up. It's possible that the system may lose functionality, but not reset..

25.1.2 Remote Service

With Remote Service, the watchdog is serviced by some outside agent on the network. Eg the HOST PC. Now the HOST can decide “is the unit functioning normally” - if so, it will keep servicing the wdt. But, if the HOST decided the unit is not functioning normally, it can stop servicing the wdt, forcing the UUT to reboot, no matter what state it's in.

To enabled this feature, first enable the custom_wdt optional package.

The remote service is then activated and serviced via http: connect browser to: http://acq2106_020/cgi-bin/watchdog.cgi?WDT_RESTART

Now keep pressing “refresh”. If we don't refresh, the UUT will reboot.

This can be automated easily eg: eigg> while [ 1 ]; do wget http://acq2106_020/cgi-bin/watchdog.cgi?WDT_RESTART

sleep 10 done

It can actually be self hosted (for test purposes, this is really equivalent to the “watchdog” daemon: acq2106_020> while [ 1 ]; do wget http://acq2106_020/cgi-bin/watchdog.cgi?WDT_RESTART sleep 10 done

Rev 15 Page 81 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

26 Appendix: Install a new firmware release

acq2006_006> /mnt/bin/update_release /tmp/acq4xx-198-

20140207104747.tg z processing release acq4xx-198-20140207104747

./

./bin/

./bin/backup_sd

./bin/check_version

...

./local/

RELEASE : /tmp/release.md5

CURRENT : /tmp/current.md5

--- /tmp/release.md5

+++ /tmp/current.md5

@@ -21,15 +21,16 @@

11f9bc5407027d413a2f747dfb2efce1 ./packages/05-acq1002-

140126164551.tgz

cc0bc2bdb6a4da78170b8fe7379b126b ./packages/05-acq2006-

...

59e4cacb0b51300a03e86e46f68b3f03 ./packages.opt/99-autocapture-

1312161154.tgz

12585da898c8c8a51a46c34846d03018 ./uImage

7b74c1b85a36b207276539171d6cac71 ./uramdisk.image.gz

Warning, patching detected

WARNING: you have a patched image.

Are you sure you want to continue \? enter y/n:y

RELEASE : /tmp/release.md5

CURRENT : /tmp/current.md5

VALID RELEASE

OK to proceed:

./

./bin/

./bin/backup_sd

...

./fpga.d/ACQ2006_TOP_02_02_02_02_ff_40_DMA.bit.gz

./acq1002.dtb

./local/ post-copy version check:

RELEASE : /tmp/release.md5

CURRENT : /tmp/current.md5

RELEASE acq4xx-198-20140207104747

Clean Release Installed

ALL GOOD sync;sync;reboot acq2006_006> ls /mnt/local/ acq420fmc.ko

acq2006_006> rm /mnt/local/*.ko

Possibly run installation-specific customiser eg

/mnt/local/custom_mag_config_new_release

Depending on specific requirement.

Rev 15 Page 82 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

27 Appendix: Brief Guide to EPICS and CSS

27.1 What is it and why should I care

The D-TACQ ACQ400 series intelligent controllers all include an EPICS IOC to manage run time logic and present data values. CSS screens are provided to monitor and manage the system remotely.

EPICS is an industrial strength control system used in many large scientific installations eg accelerators, light sources and ITER.

The core is an IO Controller (IOC). There may be many IOC's running on many embedded computers. The IOC contains a database of Process

Variables PV's. The PV's are visible to networked clients using Channel

Access (CA). Each PV represents a control point in the system controlled by the IOC. PV's may be scalars – eg control knobs “Start|Stop” or scalar outputs “TEMPERATURE”, or they can be waveform vectors eg CH01 Volts.

The IOC database may include logic to control generation and presentation of the PV's – for example, scaling raw analog to volts. The IOC can be controlled and monitored on the network from a Channel Access client. There are simple clients, and there are graphical clients such as Control System

Studio CSS, which enables highly functional cross-platform Operator

Interfaces - OPI.

NB: you don't have to use CSS/EPICS. But it does provide a good way to control and view the system. And even non-EPICS clients are able to use selected EPICS PV's transparently through the site service interface.

27.2 Monitoring the embedded IOC

If you're familiar with IOC's, the IOC console is available through the command acq1001_048> acq4xx-epics-console

@@@ Welcome to procServ (procServ Process Server 2.6.0)

...

epics> dbgrep * dbgrep * acq1001_048:1:AI:CH:01 acq1001_048:1:AI:CH:02

...

It's worth trying this command to at least see what is available eg “epics> dbgrep *” will list all the PV's.

27.3 Client Side Tools

27.3.1 EPICS Base

This isn't strictly necessary at all. However, if you're familiar with EPICS and have it pre-installed, you have instant access to all PV's using the text-based

CA commands. eg it's possible to log waveforms using the camonitor

Rev 15 Page 83 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

command.

27.3.2 Control System Studio

This is strongly recommended, not least because all the D-TACQ supplied

OPI's are specific to this tool

27.3.3 Other OPI clients

Several other OPI clients are available for EPICS CA, including motif: medm, edm and qt: epicsQt.

These tools are NOT considered here.

27.4 Notes on Installing Control System Studio CSS

27.4.1 Freely available download:

General information ORNL CSS Site

Product Download Product Download

Choose latest version of Basic EPICS , select your platform, choice of

Windows, 32 bit or 64 bit

Linux, 32 bit or 64 bit

Mac OSX, 64 bit.

Download the file, unzip and run the “css” program.

27.4.2 CSS is an extension to Eclipse

Eclipse is the well-known IDE for software development. CSS use the Eclipse

“Rich Client” interface to control its display. So CSS is both a design environment and a run-time enviroment.

We already did the design, but so far we haven't succeeded in providing just a run-time executable, so it's a little more complex than it really needs to be, but still isn't difficult to set up.

Eclipse has a concept of a PROJECT and a WORKSPACE

PROJECT : is the set of OPI's downloaded from D-TACQ

WORKSPACE : holds your local settings.

If you have many UUT's, you might have the one PROJECT and many

WORKSPACES. Each WORKSPACE would reference the same PROJECT, but may save local settings, eg HOST ID (UUT) and window configuration

Eclipse includes a window manager with MDI control, and NSEW docking, you can use this to set up your screen the way it's best for you.

Rev 15 Page 84 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

27.4.3 Create Project and Workspace

• unzip PROJECT

Launche CSS and accept default workspace

Import PROJECT

27.4.4 Set CSS Preferences.

Menu | Edit | Preferences

PV type : select utility_pv,

Rev 15 Page 85 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

Set max_array_bytes = 500000 auto_addr_list should be set, but if PV discovery doesn't work, entering actual UUT IP address here can help. along with initially disabling local firewall

Restart, shortcute: Menu|File|Restart CSS

27.4.5 Run the project

Open in design mode, select the launcher – always run the launcher

Close the navigate, console, properties windows

Select “Compact Mode” F8

Select a UUT, (name and number).

Rev 15 Page 86 of 87 Date: 1 October 2016

D-TACQ Solutions Ltd

Select the Launcher OPI – ALWAYS USE THE LAUNCHER!

Select UUT type, name, optional site ..

Now press a button to launch an OPI (eg counters, check it connects), then pick screens and arrange as required

Rev 15 Page 87 of 87 Date: 1 October 2016

advertisement

Related manuals

advertisement

Table of contents