AzeoTech

Administrators
  • Content Count

    5,664
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. AzeoTech

    I/O Type

    Well, technically an "Integer" means a signed integer, so S16, but in this case it probably doesn't matter because you are under 32767. It might be that you have to strip the high order bytes, so just apply a conversion of Value & 0x7ff. But otherwise there is nothing wrong from the DAQFactory side.
  2. AzeoTech

    find and replace

    Replace is in the Edit menu with Find and has a shortcut key of Ctrl-H. I'm not sure why that shortcut was chosen, but I believe it matches up with an old version of Word, or maybe the Visual C++ editor.
  3. AzeoTech

    Logging average of data

    "to get the average of a channel and then export that average in excel file would like your help a lot" If you are going to use a logging set, you can just mark the Channel for averaging and then log that channel. In the Channel setup, there is a column that says "Avg?" Select that, then in the # Avg, select the number of data points you wish to average. So, for example, if you are taking data once a second, and you enable averaging with a # Avg of 10, you would end up getting a data point every 10 seconds which is the average of 10 readings.
  4. AzeoTech

    File Preferences not saving

    It is Windows trying to protect us from ourselves, and truthfully I find it handy. I don't really want to login on my workstation as a general user because of all the limitations, but an open admin like it used to be really is too much freedom and makes it easy for a simple accidental click to cause a lot of damage. With Run as Admin elevating even for logged in admins, it gives a sort of half ground, with some extra security for advanced user's at the price of an extra step in those rare occasions you need full privileges. Really, we need to move the registry variables and settings out of the registry and into a flat file.
  5. AzeoTech

    find and replace

    You mean across all, not just one sequence I'm assuming since that already exists. BTW: it's generally considered good coding practice to avoid "magic numbers". These are numbers that you might want to change in many places. Instead you should use DAQFactory's define to create a name for your constant. Then you can just change that in one place. So for example: define NumberOfTanks = 4 define string AppName = "My App" You can then use these anywhere you would use a variable, except on the left side of an equal sign, or any other place where it would be changed. The only way to change a defined variable is to define it again.
  6. AzeoTech

    File Preferences not saving

    You have to actually run DAQFactory as an admin, as the settings are saved in the registry, and depending on your Windows settings, you can't edit the registry unless the application is run as an admin, even if you are logged in as an admin. I believe 17.1 sets the security of the DAQFactory part of the registry to fix this.
  7. Hmm, can you provide a doc that shows this? One where it is currently set to 61, and if I change it to 60 it crashes? I just tried it on 17.2 beta and it does not crash, so either it got fixed already, or I'm not reproducing it correctly.
  8. AzeoTech

    Resize DAQFactory

    The upcoming release of DAQFactory supports page scaling. If you'd like to email us directly at info@ we can get you a beta to use.
  9. AzeoTech

    Resize DAQFactory

    How is it limiting you?
  10. AzeoTech

    maximum no of channels

    Unless you do read(0) which will return whatever is in the buffer, read() will block (wait) until the specified number of characters is received, or the timeout occurs. If the timeout does occur then it will throw an error. ReadUntil() also will block. For this reason you do not need, nor should you use delay(). That said, you should not be purging inside your loop because that will clear out characters that accumulate between the last read() and the purge(). Instead you really just want to use this pattern: purge() while(1) try read() // or readuntil() // process data catch() delay(0.05) endcatch endwhile
  11. AzeoTech

    Pump control using analog input

    Is the LabJack set to ID 1? (you can find out in the Test Panel). You might want to use D# 0, which means "First found", though that is not recommended if you are ever going to have more than 1 LabJack. Also note that the UD does not support having two programs accessing it at the same time, so DAQFactory won't be able to access your device if you have Test Panel running. You may even have to quit both then start DAQFactory after the Test Panel has quit.
  12. AzeoTech

    Current Component Name

    No worries. It just helps to think of a sequence as simply a container that holds script. You can access that script by either calling it as a function, or by "starting" the sequence, which creates a thread and then runs the script in that thread. The advantage of using sequences for your threading is that it is really obvious what threads are running, and you can easily start and stop them. BUT, it's not particularly scalable, and that is where StartThread(), or better StartLocalThread() are used.
  13. AzeoTech

    DAQFactory Stops Responding

    Email please.
  14. AzeoTech

    Pump control using analog input

    The problem is that there are actually 3 different LabJack drivers, based on the generation of LabJack device you are using. The U12 uses one driver, the U3, U6, UE9 use a different one (the UD), and the T7 and other T devices use a third (the M series). This is because LabJack created new drivers for new generations of devices. It looks like you selected the device for the U12. You need to select the one for UD devices.
  15. AzeoTech

    Current Component Name

    I did answer it, a few weeks ago. Look at my post from Feb 13. I think you are confusing terminology. A sequence is just script that can be run in its own thread.
  16. AzeoTech

    Current Component Name

    It depends. If you are using StartThread() you can just call the desired sequence directly from StartThread(). But if you don't want to use StartThread, which is definitely more advanced, you can create multiple sequences, each which call the same other sequence as a function with a different parameter. Then you can start those sequences and basically have your function run simultaneously in multiple threads under multiple parameters. It's the simpler way, but when you have a lot of threads, you should use StartThread(). As I said, you probably actually want to use StartLocalThread() within an object so that the thread is garbage collected.
  17. AzeoTech

    Current Component Name

    Rodney: yes, I described it in my post of Feb 13. Steve: correct. Calling as a function runs the code in the thread of the calling script. But unlike starting a sequence with beginseq(), calling as a function is reentrant, so the code can be run simultaneously if called from different threads. It also means you can call sequences as functions recursively. Note that StartThread() is not limited to one per sequence function.
  18. AzeoTech

    Switching relay on and off

    First you'd want to create a Channel for the digital output. Then, you can either control it from a screen component, or if you want automated control, by script. Controlling from a screen control is shown in the Guided Tour at the beginning of the help. Controlling by script is simply: MyChannel = 1 or MyChannel = 0 I strongly recommend going through the guided tour.
  19. AzeoTech

    Current Component Name

    Yes if called as a function, but you can't do: beginseq(pollDevice1) and then do it again. If you do beginseq() on a sequence that is already running, nothing will happen.
  20. AzeoTech

    DAQFactory Stops Responding

    Exactly when does the alarm issue appear? Can you contact us directly to get a beta of the next release to try?
  21. AzeoTech

    Current Component Name

    Yes. I actually will do that if I don't want to get into objects. So, for example, I might have a sequence called "PollDevice" that takes an ID: function pollDevice(id) // poll the device with id Then, create, say, 4 other sequences, pollDevice1, pollDevice2, etc. that simply call pollDevice() with a different ID. Then I start the pollDevice1, 2, 3, etc. as a sequence in their own thread using beginseq(). All of them call the same pollDevice sequence function, but pollDevice is never actually marked as "Running" because it is called from pollDevice1, 2, 3, and 4.
  22. AzeoTech

    Read File using ReadDelim problem

    The problem is that you opened the file with only "Write" attributes, so DAQFactory can't actually do a read. You need to do file.open() with 1,0,0,1 instead of 0,1,0,1. The order goes: Read, Write, Append, Text.
  23. AzeoTech

    DAQFactory Stops Responding

    I would try and figure out which page is doing it. It is likely one with a graph. Then figure out what about the graph is unusual. VM's can be weird and it may not be presenting a good video driver to DAQFactory and the graph component is hitting on a failure in that driver.
  24. AzeoTech

    MACRO

    That I don't know. That would be on the Excel side. You may be able to use a command line flag to tell Excel to do something on load, but I am unsure as I don't really use Excel. Check it's manual. ShellExecute() in DAQFactory is the same as typing something in at the Command Prompt.