• Content Count

  • Joined

  • Last visited

Everything posted by AzeoTech

  1. Email capability is now included with DAQFactory Express as of release 5.30. All licensed users of Express can download a free upgrade at
  2. AzeoTech

    DAQFactory express upgrade?

    Upgrades are available at They are free for all licensed users of DAQFactory Express.
  3. AzeoTech

    DAQfactory express

    No. You should use the channel persist feature now available in 5.30
  4. AzeoTech

    Reading NMEA Output

    This is actually a different question, as NMEA from a GPS is much different then CAN. You may be able to do it using a UE9, but I would consider it a serious waste of time. If the GPS puts out NMEA, its going to be on a standard RS232 connection which you can simply connect into your RS232 port (or through a Serial to USB adapter, which costs about $20). The trick, though is that DAQFactory-Express only supports the LabJack products. If you want to use the serial functionality of DAQFactory, which is quite powerful, you will have to purchase a regular version, which starts at $199. As I said, you can probably pull off doing RS232 on the LabJack, but I'm sure you will waste more than $199 worth of your time trying to do so. Plus, you'll get 35 new components, 16 more channels, the ability to communicate with all the DAQFactory devices, including serial and ethernet, the ability to call external DLL's, and more for that price. Check out the other versions as well that offer even more.
  5. AzeoTech

    Email sending

    I'm assuming you are using Pro. You'll need to somehow identify when the machine is off, say a digital input or something, then you can either include that in the alarm statement: (Temperature[0] > 100) && (MachineOn) or put it in the onfired event as an if statement: if (MachineOn) beginseq(sendemail) endif
  6. Logging is done with a logging set. I recommend going through the guided tour in the help file as this shows you how to do basic logging.
  7. Actually, its not even cutting it close, but rather is impossible with the U12 using software polling. The pulses are at 27 hz, but in order to count them you have to sample at at least twice the frequency so that you see both the high and the low of the pulse (think nyquist). This means you have to sample at 54 hz which is too fast for the U12. The streaming mode mentioned would work, but processing it would be more difficult. As mentioned, your best bet is to get a U3, or another U12. You can use the counter on the U12 for this, but there is only one per, while the U3 has several. Now assuming you do use a counter I recommend NOT resetting the counter, except perhaps when you application loads. The reason is that during the reset period, which is rather short, there is a possibility that you will miss a count. With a slower pulse rate like you have, this is rare, but probably would happen 1 out of ever 1000 resets. At higher rates, this goes way up. So instead, you should record the difference between consequtive counts. To do this in DAQFactory is pretty easy: 1) Create two channels, one called RawCount and one called ActualCount. The RawCount channel should specify the counter to be read with the appropriate timing information. The ActualCount channel should be a non-existant counter number (say 10), and have a timing of 0. 2) In the event of RawCount put: ActualCount.AddValue(RawCount[0] - RawCount[1]) That's it. From then on, use ActualCount for display and logging. The event code gets called with every reading of RawCount. The code simply takes the difference between the most recent point ([0]) and the next most recent point ([1]) and puts it into ActualCount. As to how to log it, I recommend going through the guided tour as that will walk you through basic logging. If Excel is putting time and force in the same column then you are probably importing the file incorrectly. Make sure you specify in Excel the delimiter as comma instead of the default of tab.
  8. AzeoTech

    resolution and voltage range

    Depends on how you have it wired. It should read 0 when pulled to ground, and 1 when at 3.3 or 5V. Note that with an open switch, the input technically is floating and could read either 0 or 1 (or any valid value for analogs). You'll need to put a pull up or pull down resistor, or use a double pole switch to avoid the float. The digital ins may already have the pull up. I'll let the LabJack guys address that.
  9. AzeoTech

    resolution and voltage range

    I would need to see what you are doing. Can you attach it?
  10. AzeoTech

    resolution and voltage range

    The problem is that your variables are initialized to invalid values for the call. The functions follow the functions described in the LabJack UD manual almost exactly, except that strings are provided instead of the declared constants (i.e. "LJ_ioPUT_AIN_RANGE" instead of just LJ_ioPUT_AIN_RANGE in other languages). Device.LabJack.AddRequest(0,"LJ_ioPUT_AIN_RANGE",Var.Channel_Number,Var.Voltage_Range,0,0) In general, the first parameter (0) is the device number, or 0 for first found. The second parameter is a particular command, in this case setting the Analog range. The third parameter varies depending on the command. In this case it is the channel number to set the range of. The forth parameter also varies, in this case it is the range value to set to. You have to look up the range in the UD header file. The other parameters are mostly not used except for certain rather special commands. With the latest DAQFactory driver, you should be able to specify range and resolution using the device configuration among many other parameters, and avoid programming altogether. If you are using DF-Express, go to to update to the latest. Simply install that over top of your existing installation. You must have Express already installed for the updater to work. If you are using a regular version of DAQFactory, go to and get the latest beta of 5.30 which includes the latest DAQFactory LabJack driver.
  11. AzeoTech

    Win 98

    No it will not work under Windows 98. Windows 98 is a completely different operating system then 2000 and XP with a different core and a different way of multitasking. It is also notoriously unreliable, and with a data acquisition application where reliability is usually very important, windows 98 (and Me) are completely inadequate. I strongly recommend you upgrade to Win2000 or XP even if you plan on using a different DAQ application or coding your own. You can buy Win2000 for around $100. I'm not sure what the upgrade cost is.
  12. AzeoTech

    logging time

    You can't modify it while DAQFactory is using it. So you either need to quit DAQFactory, or set the logging set file to a different file so DAQFactory releases the file. DAQFactory can't let you open it while it is editing for optimization reasons.
  13. AzeoTech

    logging time

    I'm not sure what you are doing wrong. Do the three columns end up in different columns (different cells) in Excel? If not, then you are importing it wrong (perhaps selecting tab delimited instead of comma). I attached a sample showing it working. I simply typed in the first two rows of numbers you posted and then clicked on the column header for A (which highlighted the whole column) and selected Format-Cells, then picked Date from category and one of the date types.
  14. AzeoTech

    logging time

    In Excel: Just select the column (by clicking on the column header), then go to Cells-Format and select your desired date/time format.
  15. AzeoTech

    0 - 5Volt Fader

    Is there any data in the graph? If there isn't, or only a scaler value, then the graph will scale weird because it doesn't have anything to scale. Are you sure it is thawed? There should be green lines at the top and bottom when you left-click on the graph. Are you able to autoscale the y axis and have the scale change? What is your Y expression?
  16. AzeoTech

    0 - 5Volt Fader

    No, none of the LabJack units can act as standalone systems. The 2D graph is probably frozen. When you click on it, it probably has a purple box around it indicating it is frozen. Just right click, select Freeze/Thaw and then Thaw all axes. Angular gauges aren't included in DF-Express, which I assume you are using. You'd have to upgrade to at least DF-Lite for $199 to get gauges. I'm not sure what you want to display on the gauge, but a gauge can display any scaler value, so whatever you want should work.
  17. AzeoTech

    0 - 5Volt Fader

    Is the code you just sent in the channel event? If so, you really shouldn't put a delay() inside a channel event because it will cause the polling loop to slow down. Instead you should have this: if ((start[0] == 1) && (stop[1] == 0)) beginseq(rise) endif Note how I put parenthesis around each separate section of the if. It amounts to the same things, but I strongly recommend always doing this for two reasons: 1) its easier to read 2) unless you have memorized the priorities of operators, its better to use parenthesis to force the compiler to evaluate things the way you want. Now in the rise sequence put: output = input[0] delay(2) while(1) ... endwhile In that first line we set the output to the pot setting recorded on the input. Then we delay 2 seconds, then we go into the loop. Another point: notice that I put [0] after input. [0] means take the most recent value. If you don't put [0], the entire history of input is returned. In this case it doesn't really matter because the "output =" part will automatically take the most recent value, but this time there are three reasons why you should do [0]: 1) once again, its clearer to someone reading the code what you mean. This becomes more important as your code gets more complex. 2) doing [0] allows DAQFactory to optimize memory as it just retreives the most recent value. Without it, it has to retreive the entire history, and then only when it does the = does it get trimmed down to the most recent value. This is a big problem if your histories are large. 3) once again, unless you have memorized all the spots where DAQFactory automatically takes the most recent value (and I haven't even memorized that!) you may not get what you expect.
  18. Yes, that will work, though it is a bit round-about and doesn't have much flexibility. There are many others. Really, though, the TestBit() function is the best and fastest way to determine the state of any bit in an integer if for no other reason then all that code is in C++ rather than in DAQFactory script. C++ code is much faster than DAQFactory script, so any time there is a DAQFactory function to do something you should use that rather than multiple DAQFactory operations. Another example of this is using array math. For example, if you wanted to find the maximum value of a channel you could do: private.max = -999 for (private.x = 0, private.x < NumRows(MyChan), private.x++) if (MyChan[Private.x] > private.max) private.max = MyChan[Private.x] endif endfor but that would be really, really, slow compared to this: private.max = Max(MyChan) Here's another example. Lets say you want to see if array1 and array2 contain the same values. You could create a loop like the max one I showed above, or you could do: private.match = Min(array1 == array2) This is a little more advanced, but is a good example of where a little creativity can yield a dramatic speed benefit over loops. In this case, the part "array1 == array2" will generate a third array containing 0's and 1's. A 0 whenever the matching element of array1 does not equal array2, and 1 when it does. If all the elements of array1 are identical to array2, then array1 == array2 will give an array of all 1's. If some don't match, there will be 1's and 0's, and if none match, all 0's. So, we then take the Min of this array. If there are any 0's, meaning at least one of the elements don't match, the Min is 0. But if all the elements match, the array only contains 1's so the Min is 1.
  19. AzeoTech

    Importing picture

    The best way to ensure the graphic displays right in DAQFactory is to open it up in Microsoft Paint and then cut and paste it out of that program. DAQFactory currently cannot resize bitmap images.
  20. AzeoTech

    0 - 5Volt Fader

    I think we're confusing the term initial voltage. There are two initial voltages really: 1) When the program starts, it initializes the output to a starting voltage. This is the one to use the registry with. 2) When the ramping loop starts, it has an initial voltage to ramp from. This is stored in Var.InitialVoltage and is set by one of the screen components I made in that sample, so is already user settable. My previous post with the registry assumed you were trying to solve #1 since #2 is already implemented. A registry variable is a variable that instead of being stored in memory is stored in the windows registry. Because of this, it persists even if you reboot your computer. Its limited to integers and strings so actually I should have added a multiplier in to allow for non-integer starting voltages. I only suggested using the registry variable in the startup sequences to set the initial voltage on the analog output.
  21. AzeoTech

    HEX display

    Well, I've had cases before where customers didn't quite get that binary, decimal, and hex are all the same thing when talking about numbers. They are just different ways of displaying them. Usually are only two cases where you need to actually do a conversion: 1) With ASCII serial communications when the device sends a string containing a hex value and you need to convert that to base 10 (decimal). 2) When you have a number and for some reason you want to see it displayed on screen (or logged) as a hex string. The key is that the hex values are strings not numbers. A number is a number is a number, it doesn't matter if its hex, decimal, octal or base 23. The computer is going to represent it internally the way it wants and you'll never know. Its only when you want to display it, which requires you to convert it to a string representation, or you want to go the other way and take a string representation and make a number that it makes a difference. That all said, to convert a string hex value to a number you use the expression: Evaluate("0x"+var.strMyString) or if a binary string, use "0b" instead. Under DAQFactory 5.15 there is no way to display a number as a hex string, but in DAQFactory 5.30 you can use the Format() function: Format("%x",var.myvalue)
  22. AzeoTech

    More questions about sequences

    Sorry I didn't see this post earlier, but perhaps the response to your next post answered the questions. Since others may read this, here is the answer to this question: The problem here is that the detect sequences pretty much get started immediately on load before those inputs have had a chance to read. To avoid this error, you can just put a delay(1) or similar to delay the start of those sequences until after the channels have had a chance to read a value. You have the AddValue() functions which should avoid this. Did you still get the error with those lines in place? If so then you have something else going on (like a history of 0 or something) and I'd have to see your document. As I mention in the other post, you need a loop with a delay() in it on these detect sequences to get them to continually monitor. A few more pointers: 1) When monitoring channel values as you are, its actually better to use the Event on the channel instead. The event gets called every time a new value comes in on that channel. By using an event you avoid the C1040 error, avoid having lots of loops, and get quicker (actually the quickest) response. The code in your event would actually be the same as what you have in your detect sequences, except the if's would be with the appropriate channel. Note that you would never want to put a delay() in a channel event as that would stall the next reading. 2) If you want an easy way to avoid startup alerts like this, assuming you had a loop in those detect sequences, you can always add: ignore("all") or just: ignore("C1040") to get the sequence to ignore all errors or errors starting with C1040.
  23. AzeoTech

    0 - 5Volt Fader

    The start voltage is user set. Its called "Var.Initialvoltage" Or did you mean the voltage when the application is started? If so, use a registry variable. So, right now, you have in the startup sequence: Output = 0 Put this instead: Output = Registry.StartVoltage Then create another variable value component that changes the Registry.StartVoltage variable. Then, when you change this variable and restart, the output will be set to that value. Note that Registry variables default to 0.
  24. AzeoTech

    0 - 5Volt Fader

    Did you remember to create the output channel? I've attached a sample showing it working. I didn't know whether you had a U12, UE9, or U3, so I made the Output just a test channel. Hopefully you can build from my sample. As for it being hard, well data acquisition is not super easy, and anyone or anything that is making it really easy is probably hiding things from you that you should understand otherwise you may be trusting results and actions that aren't correct. My favorite example of this is with the discovery of the ozone hole. When the ozone hole was discovered, there was already people measuring ozone for years who never saw the hole. When the announcement was made, they went back and discovered that the programmer, who had made it "easy" for the scientists had made it so values below 50 were marked invalid, thus throwing away all the real data that showed there was a hole. As for other programs that might be easier, well only if you happen to find a program that does exactly what you want. LabView will be much harder, any programming language (VB, C, etc) will be as well. The problem is that everyone needs to do things differently. The first versions of DAQFactory had very limited scripting and tried to avoid programming, but we quickly discovered that then DAQFactory only worked for a very small subset of people who happen to need the features we offered. We thought about simply adding more features, but then the program just gets combursome with menu options. The only way to allow the flexibility to do all the different things people want to do, you have to use some scripting. Unlike LabView, and low level programming languages, DAQFactory takes care of a lot for you. Plus you can use a lot of the non-programming features and just supplement it with some scripting for your unique application. And then of course, you can always post here when you have problems and get a quick answer risesample.ctl
  25. AzeoTech

    0 - 5Volt Fader

    The private means the variable is only visible from within the sequence. This is done to avoid cluttering the global namespace. Basically that just means it is done to keep from having too many different names accessible globally. With DAQFactory 5.30 this becomes even more of an issue for reasons I'll skip for now. Anyhow, in general if you just need a variable in a single sequence you should use a private, and if you want to change it elsewhere you should use a global (var.) variable. Var. variables can be used any place you would use an output channel, so, for example, you could create a Variable Value component and then open its properties, click on "Analog Out" button in the bottom right and enter "Var.TotalTime". What this button does is set the Action of the component (on the Action tab of the properties) to "Set To" and the set to channel to the Var.TotalTime variable. The SetTo action prompts the user for a new value and then sets the variable to that value. If you have not done so already, you may want to go through the Guided Tour in the help / manual. And for more info on variables, and the scripting code, review the chapter on sequences.