RJ Gross - Portfolio -
  • Home
  • About
  • Portfolio
  • Curriculum Vitae​
  • Blog

DAQ - A Test to Scale

5/11/2022

0 Comments

 

Finding the right DAQ

Picture
Our team has been investigating Data Acquisition (DAQ) devices to support our 20+ sensors and thermocouples that we want to collect data with. Our idea is to use an external analog input device instead of a PLC card. With an external device we can get a better resolution for our data collection. 

Right now our top contender is the LabJack T7 DAQ, its a Modbus TCP/IP compatible unit that can run on the same local network as the PLC. It only has 14 analog inputs, however it does have the ability to expand to 80 with a MUX board. The other attractive attribute of this device is that it has a well vetted LabVIEW driver and library. This will make the integration of the datalogging program fairly seamless with the fire control system state machine. 

The ​LabJack U3-HV

I was lucky that one of the guys on the team had a LabJack U3-HV that I could test out with LabVIEW. The following describes the install of the software and a simple compatibility test. The goal is to determine if this DAQ works with LabVIEW therefore when we scale for the larger device we should have confidence in the purchase. 

In order to use LabVIEW both the LabJack Driver and the Library needs to be downloaded. Follow these instruction here to get setup, its pretty straight forward. After install I opened the example program "U3 Multiple IO Example.vi." I then simply plugged in the U3-HV into my PC and ran the program. The DAQ connected with program and displayed open input floating data on the front panel. To validate it was actually working I stopped the program, unplugged the USB and ran the program again. The "Error Out" displayed a connection error, this gave me the confidence that LabVIEW is actually communicating with the Device. 
Picture
0 Comments

The Humble State Machine

5/8/2022

1 Comment

 
Definition: "A state machine reads a set of inputs and changes to a different states based on those inputs." 

Building the Foundation

There are usually two schools of when it comes to programing: The Linear Execution or The state machine. 

The Linear Execution: An example is the small code snippets that I discussed about coils. They serially operate code once in order then stop.

The State Machine: Is a continuous loop that runs linear executions based on the input and reacts based on the results. 

Probably one of the most enjoyable things that I enjoy about LabVIEW is how easy it is to build state machines.

The States 

The point of this project is to safely execute a series of commands to hot fire lots of expensive hardware. Here is a list of states that I would like to incorporate so far: 

​0 - MAIN/WAIT 
1 - INITALIZE
2 - SYSTEMS CHECKS
3 - MANUAL CONTROL
4 - EDIT CAMPAIGNS
5 - ABORT SYSTEM
6 - DATA STORAGE
7 - ARM 
8 - START AUTO SEQUENCES 
9 - HOLD AUTO SEQUENCE
10 - SAFE STAND
Picture
Typically I like to build my state machines with the first state or default state as the Main or Wait state. This means all Inputs originate or wait at the Main and then cascade out to the other sates. Note: State 1 does not have a human input. This state in actuality is the first state that runs (typically once), this state re-initializes and nulls inputs. This state can be run again however only in special circumstances. 
Picture
In LabVIEW tools, a state machine is simply a while loop with a shift register and a case structure. I personally like to add the use of a Event Structure coupled with the "Select" comparison tool to make the execution of the (Human controls) more stream lined. 

I also like to use "Enumerated Constants" this give a selectable string value to a numeric constant. This is helpful for code debugging and visuals, cuts down on the amount of labels. However, if more states needed to be added they all should be replaced to have the most current list. 

Executing the State 

The code snippet above shows the Abort sequence execution after the human control input is selected. When a change in Input value occurs state 5 is executed.

Shown below: The linear execution code then runs turns off all coils, read the coils, and then gray & disable the test stand fire control inputs. This abort sequence will eventually get more tailored based on actual hardware, but for now helps me debug the states. After all code is executed in state 5 the "enum constant" returns the code to 0 to wait for the next input. 
Picture
Future posts will discus the states in more detail when hardware is finalized. 
1 Comment

    Rocket Test Stand Controller Project

    This blog will cover the development of my hybrid LabVIEW & PLC rocket engine controller. 

    Archives

    May 2022
    April 2022

    Categories

    All

    RSS Feed

Proudly powered by Weebly
  • Home
  • About
  • Portfolio
  • Curriculum Vitae​
  • Blog