# Presentation: 418885

## Farewell Progress Report

- Did I do that???
- Eugene Lorman
- 10.19.2005
- Accelerator Division/Weekly Instrumentation Seminar

## Working Hard (on the train)

## But Seriously

- Projects I’ve worked on
- Beam Line Tuners
- Synchrotron Light Monitor
- Flying Wire Monitors
- Ionization Profile Monitors
- LabVIEW based test systems

- Skills I’ve developed
- LabVIEW programming
- Setting up LabVIEW based Front Ends
- Setting up PCs to act as Front Ends
- Creating Devices in ACNET
- Communicating with Devices on different busses

## LabVIEW key concepts

- LabVIEW runs using a data-flow model.
- VI’s that are not “linked” by wires will run in an indeterminate order (in parallel)
- Recursion is IMPOSSIBLE, not that you really need it
- Code can get very messy, it’s easy to create VI’s with too many inputs.
- Use divide and conquer. Create sub VI’s to make code look cleaner.
- If all else fails, bundle inputs into clusters to keep code clean.
- Dataflow lends itself well to State Machine type programming.
- Big loop with a case structure inside, which itself determines what step to go to next
- You can have more than one running in parallel. (GUI and DAQ)

## LabVIEW key concepts II

- Easy to write different parts and then incorporate them into an FMS
- One can test analysis without having the DAQ finished.
- Making each piece independent lends to easy debugging and test stand applications.
- Designing for flexibility is hard work upfront, but might pay off at the end.
- Have to really think of how similar the systems really are. Sometimes it’s just not worth it.
- Is generally good, can keep one system as T&D while others are running “compiled” code.
- Compiling executables is fun.
- Very useful for test applications. Conserves LabVIEW licenses.
- Not that useful on Front Ends when changes to code are often requested.

## Setting up Front Ends

- FE does not have to be behind the firewall. Desktop PC’s can be FEs.
- Very nice for testing systems or playing with ACNET interface.
- Brian Hendricks is your man. (this goes for many things)
- Provide him with a similar FE, and your IP.
- The IP and ACNET node names should be the same (this is nice, not required)
- LabVIEW uses locally stored files to find out which devices it controls.
- TAB delimited text files with all the necessary info
- These can also be used to automatically create a command file to DABBEL to add/modify the devices in the ACNET DB.

## Sample ACNET device file

- !  FILE : C:\Documents and Settings\lorman\Desktop\ZFW.dab
- !  FROM : 4/5/2001	MFW	V 2.3										W. Blokland
- !  Created by LV converter 3.1
- MOD Z:FWCOMM ('ZFW Command Register', MFWDVL)
- SSDNHX READNG (0000/0064/0000/0000)
- SSDNHX SETTNG (0000/0064/0000/0000)
- PRO READNG (4,40,60)
- PRO SETTNG (4,40,60)
- PDB READNG ('unit','unit',10,0,4,0,0,0)
- PDB SETTNG ('unit','unit',10,0,4,0,0,0)
- MOD Z:FWCOMR ('ZFW Command Result Reg', MFWDVL)
- SSDNHX READNG (0000/0065/0000/0000)
- SSDNHX SETTNG (0000/0065/0000/0000)
- PRO READNG (4,44,60)
- PRO SETTNG (4,44,60)
- PDB READNG ('unit','unit',10,0,4,0,0,0)
- PDB SETTNG ('unit','unit',10,0,4,0,0,0)

## Setting up PC for FE

- Nino Strothman has images which he can put on any machine in 10 minutes.
- Install all of the hardware drivers needed for the custom hardware you are using.
- Make sure that the system is fully patched before connecting to the network. (images are)
- It’s nice to keep an IP address which you can use to bring up computers that you don’t care if it gets shut off for some time.
- Set up user names.  Localadmin and Instrumentation are standard.
- Systems will need to be periodically logged into and patches and reboots managed.

## Setting up PCs II

- All Instrumentation Front Ends will reside on the Fermi Domain.
- There is a policy that can be fed down to disable the Notification window before a user can log on, and make that window the desktop image.
- The Notification must also be removed from registry the key is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system. Clear legalnoticecaptoin and legalnoticetext.
- Using Tweak UI, from Microsoft Windows PowerToys one can set up the machine to automatically log into a local account.
- All domain services can be accessed using a “service” account created for the Instrumentation Group. BD-SRV-INST.  Password is “semi public” and never expires.
- Having the machine on the domain allows for patches to be pushed to the Front End. As well as make them easy to manage on a “global” scale.
- All systems must reside in the Critical System list so that they will not be automatically rebooted.
- Sam Jorocki, Ryan Heath and Nino Strothman are good resources.

## Adding Devices to ACNET

- Page D80 can be used to edit a few devices, for batch processing use DABBEL, which is a database editing tool.
- Once a spreadsheet of the devices exists for LabVIEW to use, run MakeDabbel from the Y:\lorman\ACNET directory and it will create the batch file for you to use.
- Using FileZilla (kerberized FTP) transfer the files to your ADCALC directory.
- Run DecTerm under ACNET menu in Windows and use the DABBEL filename SYNTAX or MODIFY.
- Command would look like DABBEL sl3.dab MODIFY
- It will write an sl3.lis file if there were any errors during the process. These are usually self explanatory.
- Brian Hendricks is your man here also.

## Communication over different busses.

- VME
- Using National Instruments MXI-II standard with a VME/VXI controller that mates to a PCI controller in the PC.
- GPIB
- Using a GPIB-PCI, GPIB-USB or GPIB-Ethernet controller to gain access to the instrument.
- Charlie Briegel manages the GPIB front end in the Controls System.  These can be assigned an address and communicated with using Console Applications. (Tevatron Oscilloscope based BLT)
- Vision
- Using National Instruments IMAQ hardware and software
- There is a “Vision Analysis” package one can get for LabVIEW to aid in image processing.
- Motion
- Using National Instruments Servo or Stepper Controller and a PCI card to communicate to it.
- LabVIEW software is included in the drivers that come with the Hardware and can also be found on the NI.com website.

## Device Summaries

| System | IP Name | Keeper | Backup | Platform | LV version | Work needed |
| --- | --- | --- | --- | --- | --- | --- |
| miblt | miblt2 | Vic | Duane | PC | 6.1 | Upgrade to 7.1 |
| tevblt | tvblt2 | Vic | Duane | PC | 7.1 | none |
| tevblt | None | Vic | Duane | Scope | None | none |
| SyncLight | SL3 | Randy | Bob | PC | 7.1 | none |
| tevFW | TFW | Jim | Bob | Mac | 4.1 | Upgrade to 7.1 |
| miFW | MFW | Jim | Bob | Mac | 4.1 | Upgrade to 7.1 |
| PbarFW | PFW | Jim | Bob | PC | 6.1 | Upgrade to 7.1 |
| RRFW | RFW | Jim | Bob | PC | 6.1 | Upgrade to 7.1 |
| MIIPM | 3 of ‘em | Jim | None | PC | 6.1(exe) | Upgrade to 7.1? |
| Tev Chrom | INSTSCOPE | Vahid | None | Scope | 6.1 | ??? |
| Tev Abort | None | Vic | None | Scope | 7.1 | Install |
| Booster | ???? | Steimel | None | Scope | 7.1 | Install |

## Other Projects

- LabVIEW-ACNET interface
- Duane Voy and Bob Flora
- Working well, missing Alarm Capabilities
- Rapid Transfer hardware Test code.
- Completed, will have to be slightly modified for testing other similar systems.
- Fellenz HV module test code and other test code
- Should be easy to adapt to any other type of system

## THANK YOU