AzeoTech

Administrators
  • Content Count

    5,672
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. Under newer versions of WIndows, the registry gets tricky to use due to tighter security. This is probably why DAQFactory is unable to write to the registry. I believe we have tried to have our installer expand the security rights of the registry folder for DAQFactory variables, but I'm not sure if that is in the 17.x releases. You probably should consider using a file instead. This original post was from 4 years ago when Win 7 was the prevalent OS.
  2. AzeoTech

    Connects to wrong Ethernet card

    169.254.192.166 is not a valid IP address. It is the address devices give themselves when they are setup for DHCP but no DHCP server can be found. It also is not on the same subnet as either of those cards. My guess is that you unplugged the PLC from your LAN where there is a DHCP server and put it on its own network with the DAQFactory where there is not. The PLC can't find a DHCP server and so doesn't get a usable IP address, and the of course DAQFactory can't talk to it. So, it really has nothing to do with DAQFactory, but rather your LAN setup. In general, I do not think you should ever have PLC's or any DAQ device running on DHCP in production. It is great during startup because you can get to the device initially for configuration without changing your PC's IP, address, but you should always change your device to have a static IP address. Despite what some may say, DHCP does not always give the same IP address to the same device. So, if you had two identical PLC's wired into different stuff, both on DHCP, it is possible for the devices to actually swap IP addresses and then you are communicating with the wrong device, and could, so to speak, "fire the rocket" when you really just meant to turn on the lights. Note that the IP address of the PLC will have to be on the subnet of the desired card, so either 192.168.2.X or 192.168.0.X depending on which card you are connecting to. Also, just a general note: if your device is supposed do be somewhere on your LAN, and you are not connecting to it directly through the Internet (which I don't generally recommend), the IP address will pretty much always have to start with 192.168.x.x, or 10.x.x.x or 172.16.x.x through 172.31.x.x, and you rarely see the 172 range. These are the only IP addresses used in LANs because they are non-routable and thus not directly accessible through the Internet. If you get something else, like 169.254 and you aren't connecting to a device on the Internet, you know you did something wrong.
  3. AzeoTech

    Connects to wrong Ethernet card

    They actually aren't on the same subnet. They just have the same subnet mask. What IP are you trying to reach? Which connection gets you to your LAN and the Internet?
  4. AzeoTech

    Connects to wrong Ethernet card

    Are the two network cards on the same subnet? If you don't know what I mean, just post what the IP address is for the PC on each card. You can find this by going to a command prompt and typing: ipconfig
  5. AzeoTech

    I/O Type

    Yeah, I can't guarantee that stripping the high order bits off is going to solve the problem. It is just an educated guess on something to try.
  6. AzeoTech

    onlbuttonup

    No, because the knob captures the event already and doesn't pass it through. You can't really use mouse events on components that already natively require the mouse, such as a knob, or switch.
  7. You are making a somewhat common error. timerz as you have it without quotes is a symbol meaning it references a variable, channel or something else with that name. In your case, it is probably NULL, which causes CreateProperty to fail. You need to provide a string with the name of the new parameter, i.e.: createProperty("timerz", 100) This may be a common error because there are a few functions that take symbols when really they should take strings, namely the begin/end functions, i.e. beginseq(), endseq(), etc. This is left over from very old DAQFactory.
  8. AzeoTech

    I/O Type

    No, you said the range was 0 - 2047. 2047 is 0x7FF in hex. Doing Value & 0x7ff strips off any bits above 2047. Sometimes, devices that aren't a full 16 bit, will use the upper bits for status or other things, which may be why you are getting numbers in the 3500 range.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. AzeoTech

    Resize DAQFactory

    How is it limiting you?
  18. 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
  19. 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.
  20. 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.
  21. AzeoTech

    DAQFactory Stops Responding

    Email please.
  22. 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.
  23. 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.
  24. 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.