AzeoTech

Administrators
  • Content Count

    5,672
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. AzeoTech

    Sequences - Timer Reset

    Can you please post what you've tried that is giving you "unknown error"?
  2. AzeoTech

    Streaming counter

    As I expected it was something simply. You have to actually select "Yes" from the list. It appears you typed it in or something and put a lower case "y" instead of "Y". This driver is a bit older and was written back in the days when DAQFactory was case sensitive. Give that a try and it should work for you.
  3. AzeoTech

    Streaming counter

    OK, to start, can you attach your current document so we can see how you have it setup? Do you not see the counter change, or do you not see any new data in the counter channel? Also, make sure you have the timing set to 0. The counter channel must be type LabJack_U12, D# matches your other labjack channels (0 for first found, or the ID of the U12), I/O Type is Counter, Channel # is 0. If you see data streaming in, but its staying at 0 then you probably have a hardware issue.
  4. AzeoTech

    U3 buzzer from DAQFactory Express?

    The DAQFactory U3 / UE9 driver pretty much just exposes the LabJack UD, so you can call their functions almost verbatum. You just have to put quotes around the codes. So to sound the buzzer as it shows in the U3 manual you would put, in sequence script: Device.LabJack.eGet(1, "LJ_ioBUZZER",0,70,4000) Change the 1 to the assigned D# of your labjack, or use 0 for first found. The other parameters match that described in the LJ manual.
  5. AzeoTech

    Area under peaks

    Yes, most certainly. How depends on whether you need it to find the peak too and whether you want a baseline. Let's assume you know where the peak is and simply want to take the area without a baseline. If you know the start and end point (or time), and have it in variables, you can simply sum: sum(MyChannel[starttime,endtime])) and then multiply that times dt: sum(MyChannel[starttime,endtime])) * (endtime - starttime) This assumes that you are taking even intervals. For more advanced integration, please see the following topic in this forum: http://www.azeotech.com/board/index.php?showtopic=1138 Doing baseline and peak finding is a bit more of a challenge and is a bit beyond the level of this forum as its actually a difficult algorithm that often is different depending on the type of signal. If you are interested in this, email us directly at support at azeotech.com.
  6. AzeoTech

    Selecting a day from log file

    Not directly using a log file. It would be difficult for DAQFactory to do because there are so many options for how data can be stored. Fortunately there is an easy alternative. Starting with 5.30 (which you can upgrade at www.daqexpress.com) there is something called channel persistance. This is basically a binary file, one for each channel, that extends the history onto the harddrive. You can make these as big as your harddrive can handle (16 bytes per data point). Then you simply subset to retrieve the data. So, if you wanted the mean of MyChannel between 8am and 2pm you'd do: Mean(MyChannel[8h,14h]) I recommend reading up on subsetting in the help to see all the ways to subset, both by data point and by time.
  7. AzeoTech

    Loging an readable Timeformat

    Well, "stupid" is a bad choice of words I think. Its actually more difficult for most programs to deal with readable format then it is to use the numeric format DAQFactory logs with (either excel or windows format). You just need to understand what the number means and what format your application uses. This is especially true when you consider that DAQFactory is used around the world and what is considered readable to one may be backwards to another. For example, in the US its month day year, while many other places it is day month year. Unless the day is > 12, its impossible to tell which format is being used. Human readable times are also very difficult for a computer to query. So, most likely, even if you only see a human readable time in your application, the time is actually being represented as a number internally. That all said: 1) Create a new channel. Call it something like "TheTime". Device Type "Test", I/O type "String", Timing = 0. Channel # and D# don't matter. 2) In one of your UE9 channels, go to the Event and put the following line (assuming the channel you choose is named "MyChannel"): theTime.AddValue(FormatDateTime("%c",MyChannel.Time[0])) 3) Now add TheTime to your logging set. Make sure the delimiter you use in your logging set (default comma) is not used in the date / time format of your locale (which is what FormatDateTime("%c"...) will generate). If you want to log a different date format, check out the FormatDateTime() function in the help file for a list of other codes you can use to specify exactly how you want the time to look.
  8. AzeoTech

    DAQFactory stability problems

    There are a number of ways you could create a document that eats memory. For example, if your histories were very large. Histories are preallocated, but depending on how you access them, you could be duplicating large chunks of memory. I'd need to see your .ctl file to make sure you haven't done anything unusual. I'll also be able to then address why 5.32 won't run your document. There are some changes in 5.3+ that will cause some documents not to work without minor modifications. Please reply and attach your .ctl doc, or email support@azeotech.com with your doc if you don't want it to be publically available.
  9. AzeoTech

    Printing from DAQFactory

    This was a bug that was fixed in 5.30. You can download 5.30 of express at www.daqexpress.com.
  10. AzeoTech

    Streaming and Counters

    It only applies to streaming mode and its because of the way the Labjack UD works. It treats all streaming as an analog channel, but uses magic numbers to select other channels. So, 210 does the counter, 193 does the digitals, etc. Although DAQFactory puts the data in the right place for you, it does not know that 210 is counter, or 193 digitals because the LabJack guys may change this or add new ones, so by not fixing it in our code, we are always up to date. This is also why 193 is only one channel. DAQFactory doesn't know you are looking at 16 digitals packed into a word. When you are not streaming and simply reading the counter (or the digitals for that matter), you should use the appropriate I/O type and not A to D.
  11. AzeoTech

    Finding when data is present

    The function you want is actually GetHistoryCount() and it is a function of the channel. Event code runs in the global namespace, so you still have to put the channel name in front. So you want: if (Counter0.GetHistoryCount() < Var.DeltaT) Better way? Not really, but I'm not sure why you are using variables, since you define them just before. Yes its good practice not to put magic numbers in your code, but you should use privates instead of globals then, or declare the globals outside the event. You are reexecuting the code that does nothing the way it is written. Using ignore("all") instead of the if would work as well and actually would probably execute faster because the code will be shorter, but then you won't get 0 in RPM0 when you haven't collected enough. As for ignore(), the all needs to be in quotes: ignore("all") otherwise it is looking for a string channel named all.
  12. AzeoTech

    Streaming and Counters

    Depends on how you have the logging set setup. If you have it set as All Data Points (aligned), then it depends on your data rate and the alignment threshold. When streaming we recommend setting the alignment threshold to 0. If you don't, the maximum log rate is pretty much determined by the alignment threshold itself, with extra data thrown out. Is RPM a virtual channel or a test channel? Virtual channels can be hard to log unless you are using an export set. When thing to note about channel events is that they aren't triggered on every data point when you are streaming, but rather on every packet. The packet size will vary on the total number of streaming channels. I'd have to look up the exact calc, but I believe its 16/number of streaming inputs, but if its not divisible (i.e. you are streaming 3 or 5 channels), the packet size will vary with each packet. The reason we do it on each packet is that the scripting isn't fast enough to process it on every data point when stream rates are high. For that matter, I'm not sure an event can keep up above maybe 5ksamples. Instead you should process the data after the fact. Yes this is correct, you should get 1000 rows a second. I'd have to see your document to see why, but most likely its the alignment threshold. What you see is expected. When streaming set the align threshold to 0. Align threshold is for things like the U12 where if you read 8 analog inputs, you get them in blocks of 4 separated by about 20ms. DAQFactory assigns the exact time to both blocks, so without the align threshold, you'd get two different rows in your logging set. When streaming, all data has the same time, so you want an align threshold of 0. The reason you see data every 0.002 with an align threshold of 0.001 is that its a +/- threshold. Why would it be 16? A channel, in terms of max 16 channels in express, is a row in the channel table. When you stream the counter in DAQFactory it shows up as an analog channel. This is because of the way the labjack UD is written. You had to specify a channel number when you told it what to stream, and thus DAQFactory only knows it as an analog input, not a counter. Within the UD its treated as a channel. The DAQFactory part was written to be flexible so we didn't have to change the DAQFactory driver every time a new special channel was created on a labjack device. So, you should make your Counter0 channel, A to D channel #210 and it should receive the streaming data. You shouldn't make a separate Counter I/O type channel, as this will query the channel separately, and is probably why you aren't seeing all the data you expect. None. DAQFactory handles this automatically, putting the data into the appropriate channels automatically. You should never have to call GET_STREAM_DATA. This is actually one of the few areas where DAQFactory script differs from the commands described in the LJ user's guide. Its done this way mostly to make it easier for you and because its much more efficiently done in C by DAQFactory then with a user script.
  13. No, and actually its difficult to do in Windows from any software. The problem is that Windows security doesn't allow user level access to the I/O ports. You can only access through Kernel level drivers. For serial, the kernel level drivers have high level functions, but for the parallel port, its all handled by the spooler and print drivers so is too high of a level for fine control of pins. The only way around is to write a kernel level driver (rather difficult), or use an app that exposes the I/O ports and then turn off the spooler. That all said, its really a bad idea to use the parallel port for anything unless you are an EE and really know what you are doing. Unlike the digital pins on a LabJack, the parallel port pins are not very well protected, so if you do anything wrong, you will blow your PP in an instant, possibly killing your motherboard as well. The PP is a very tempting, cheap digital I/O channel, but using it is really a very BAD idea. Considering the cost of a U3, which gives you twice as many i/o pins as the PP and no programming hassle, its not worth even trying to use the PP even if you were an EE.
  14. AzeoTech

    DIO

    You can't use the word "channel" for your channel name. It is a reserved word. Try naming it DigOut.
  15. There is a Quick Start guide available on the LabJack website at: http://www.labjack.com/files/DAQFactory%20...%20Tutorial.pdf You should use the Device Configuration wizard to configure your LabJack. This code that you wrote: openLabJack (LJ_dtUE9,LJ_ctEthernet,"192.168.0.209",2,&lngHandle); is in C, not DAQFactory script. There is no method for opening the labjack in DF script (unless you manually load the LabJackUD.dll file using the extern command, but this is rather advanced).
  16. AzeoTech

    PID controller for dc motor by daq

    For your first question concerning analog and digital input and output, please review the guided tour. There is a generic one included in the DAQFactory help, and more LabJack specifics towards the end of that help file. As for your second question, you could try and do PID control with a U12, but with its 16ms latency, the control would not be very tight. With DAQFactory, your best bet is to use DAQFactory Base or higher which has built in PID loop control. How it applies to your application depends. I would need more detail about your hardware setup to even begin to address it.
  17. Yeah, the better solution is probably for us to just make it so ClearHistory has an option to clear the persistance. What you are seeing is that the file is not getting cleared out unless you change the length of the persist file. I think if you put a read() right before the clearhistory() it would work too, but I'm not sure. As I said, the best choice is for us to simply fix the problem, which we'll do for 5.32. Also, FYI: you really should use variables instead of V channels. V channels have very limited use ever since we introduced variables. They are largely there for backwards compatability and a few select uses. 86400 for the history is no problem. Its 16 bytes per data point, so that's only about 1-1/2 meg. Persistance is solely limited by harddisk size. You could safely have a 10 million points in your persistance. Above 100 million you run into subsetting problems as described in the help (because the index gets confused as time), but this is easily worked around. The trick when using persistance values larger than the history is that in order to access the data past the history length you have to subset. So if you graph MyChannel vs. Time you will only see the data in the history, not the persist file. If you graph MyChannel[0,100000] vs Time, then you'll get values past the end of your history and from the persist file. This is done so you don't accidently try and load 10 million points into memory at once. Please review the section on channel persistance and history in the help for more information and recommendations.
  18. AzeoTech

    DAQfactory express

    www.daqexpress.com
  19. 1) Persistance is designed to be bigger then history (or the same) only. 2) ClearHistory() does not affect persistance data, so if you call clearhistory() on a channel with persistance, nothing will really happen. This was done so you don't accidently clear a year's worth of accumulated data. To clear the persistance, use the channel parameters to set the persist to 0, then back to your setting (perhaps doing ClearHistory() in between: MyChannel.PersistAmount = 0 MyChannel.ClearHistory() MyChannel.PersistAmount = 10000 We are looking for feedback on whether this helps prevent people from losing their persist data, or is just a pain to those looking to clear the history. Perhaps we'll add a parameter to clearhistory() to force persist data cleared.
  20. Email capability is now included with DAQFactory Express as of release 5.30. All licensed users of Express can download a free upgrade at www.daqexpress.com
  21. AzeoTech

    DAQFactory express upgrade?

    Upgrades are available at www.daqexpress.com. They are free for all licensed users of DAQFactory Express.
  22. AzeoTech

    DAQfactory express

    No. You should use the channel persist feature now available in 5.30
  23. 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.
  24. 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
  25. 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.