Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 1 Introducing DAQFactory

1.4 DAQFactory's Internal Objects

Scroll Prev Top Next More

DAQFactory is made up of different objects that can be set up in many different ways to create your custom data acquisition solution:

Channels:

A channel typically is a single I/O location, be it analog to digital, digital to analog, digital out, digital in, counters, a spectrum, an image, or any other type of data. For those in the automation world, a channel is equivalent to a tag.  There can also be channels that contain calculated values such as results from analysis functions, or even calculated formulas.  These are discussed a bit more in virtual channels.  To make life easier, the details of which I/O channel number and device correspond to what channel only need by entered once.  Each channel is given a name, and after defining the I/O associated with that name, only this name is required throughout the rest of the program.  There is no need to remember that ambient_temperature channel is attached to Acme I/O board, device #3, channel #2!  

Channels have a history.  This is a list of values with time tagged to each value.  The most recent values are always the first values in the history progressing back in time.

Virtual Channels:

Virtual channels provide a location for storing values that do not have an I/O associated with them.  This can be calculated expressions, or values set from a sequence.   They are called virtual channels because they can be used anywhere a channel is used within the DAQFactory program and contain a history like a channel.  Virtual channel's usefulness has decreased as DAQFactory has moved forward.  Typically you will want to use regular channels and the AddValue() function to store historical values, or variables to store scalar values.

Variables:

Variables are simply locations in memory for storing values.  They are not associated with any I/O and do not have a history, though they can be an array of values.  Variables are typically used in sequences, but can also be used as state flags or anything else you may come up with.  They come in three types, numeric, string (alphanumeric) and object references (advanced).

Conversions:

Most I/O devices output their values in rather abstract units, such as a number between 0 and 65535, 0 to 10 volts, or 4 to 20mA.  Conversions provide a way to convert these arbitrary units into something more tangible and appropriate.  For example, you may have a pressure transducer that has a range of 0 to 500 psi which corresponds to 0 to 10V output.  Your A/D channel outputs 0 to 4096 corresponding to 0 to 10V.  You could create a conversion to convert that 0 to 4096 value into a 0 to 500 psi value.  The conversion would look something like this:

Value/4096*500

This is an example of a simple conversion.  You can make much more complicated conversions to take into account calibration curves etc.  Because you will often have multiple channels reading similar devices (multiple identical pressure transducers in this example), the conversions are kept in a list by name, and when you need to apply a conversion to a channel, you simply select the name instead of having to retype the formula multiple times.

Conversions are especially useful on output channels.  They allow you to specify your output value in useful units rather than the units required by the output channel.  Here the conversion expression is actually reversed.  The expression should convert useful units to I/O units.

Expressions:

Conversions are not the only place you can enter in calculations.  In fact, conversions are typically only used to get things into proper units.  While not really an object, expressions are calculations that you can use in various places throughout DAQFactory.  In fact, the formula you enter in a conversion is actually an expression.  Expressions can be as simple as a constant or as complex as you need, acting on single data points or arrays of points.  

When entering expressions, DAQFactory provides syntax coloring and an intelligent drop down box that displays channels, formulas and other things you may want use in your expression so you don't have to remember everything.  Any edit box within DAQFactory that displays in color can take an expression.  Expressions are used to display calculated values, to graph calculations, to set ranges, to control data logging and in many other locations.  When entering an expression you can press F6 to popup a bigger window to allow you to see your entire expression.

Sequences:

Sequences provide a powerful scripting language to automate your project.  Sequences have many uses including performing automatic calibrations, monitoring your system for certain conditions and performing actions based on those conditions, or even replacing programmable logic controllers or other hardware devices with software control.  Sequences are easy to setup and maintain.  Multiple sequences can be run at multiple times, and simultaneously.  Sequences can also be used as user functions in expressions.  Sequences can even be setup to start automatically when the DAQFactory starts, creating a completely automated system!

PID Loops:

PID is an effective algorithm for controlling closed loop systems.  The algorithm attempts to keep a "Process Variable" (PV), such as temperature, at a particular "Set Point" (SP) by controlling an "Output Variable" (OV).  The algorithm uses three parameters: proportion (P), integral (I), and derivitive (D).  DAQFactory includes an autotuning mechanism to help you determine the best P, I and D parameters for your system.  You can create as many PID loops as your computer will allow, all of which can run simultaneously.

Logging Sets:

Logging sets provide the mechanism for logging your data to disk.  You can create multiple logging sets to log all or part of your data in several different formats with different options.  Logging sets can be started and stopped at any time and can be run simultaneously.  Currently, DAQFactory supports logging to delimited ASCII, ODBC database, and 3 binary modes.  Delimited ASCII mode is easily read by most other programs such as Excel and the recommended format unless you have a back-end SQL database.

Export Sets:

Export sets are similar to logging sets but do not run continuously.  While logging sets log channels directly (or calculated values through a manual mechanism), export sets log the results of expressions.  The options for export sets are very similar to logging sets.  Logging sets are typically used for continuous logging.  Export sets are used when you want to conditionally log one line at a time, or you want to log data that has already been acquired.

Note: in addition to Logging and Export sets, you can always use script functions to log to a file or database.  This gives you total control over the format of the data.

Alarms:

Alarms provide a way for you to detect out of boundary conditions in your system even if your system returns to normal.  For example, if you want to know if your system gets above 100°C, you can use an alarm to monitor the temperature and it will trigger if the system goes above 100°C even if it then immediately returns under 100°C.  Alarms display until manually acknowledged and can be logged in an ASCII file or ODBC database.  You can have multiple alarms watching for any number of events in your system.

Pages:

Within the DAQFactory program you can have multiple screens containing graphs, images, values, and other screen components that provide the user interface for your device.  Each screen is in a basic way considered a page.  Pages, however are more like overlays than a simple screen.  You can easily display multiple pages overlaid on top of each other on a single screen.  This is most useful when you have certain data you always want to be visible, or a common menu.  You can place this data on a page and have that page overlaid on top of all the other pages.  Pages can also be made to popup in a separate window.  The window can either be modal, meaning the user cannot access any other window until the popup is closed, or modeless, a floating window that allows access to the rest of DAQFactory.  Modeless popup pages are a useful alternative to overlaid pages.

One very powerful feature of DAQFactory is the ability to design your Pages while your application is running.  No quitting your experiment or process halfway though when you realize that you need just one more graph.  You can add, remove, or change any component at any time!

Components:

Components are the windows to your data.  There are many components available that allow you to create a completely custom user interface for your application. Components can be placed anywhere on pages enabling you to create any screen design you would like, from a simple summary of your data, to a complete virtual instrument or factory.  All the components have many options that control how the component displays itself and what action is performed when you click on the component.