• Content Count

  • Joined

  • Last visited

Everything posted by AzeoTech

  1. It depends on what communication card you have. It looks like all of the serial CJ communication units support Modbus which would be easy to use with DAQFactory. The other boards are ethernet based and use Devicenet, Ethernet/IP or Profibus which would require an OPC server or protocol converter.
  2. You have to put quotes around any string literals in your SQL statement. So at the end it is: ',"' + Placa[0]+'")') It's hard to see here, but I replaced the double quotes with single quotes and put double quotes inside. DAQFactory treats them the same as long as they are paired up, but I don't know if SQL SERVER supports single quotes. I usually find it helpful to copy my db.execute() line to another line before it, and remove it down to just a ? (print) statement: ? "INSERT INTO Alival_Descargue.dbo.Estados_PLC(Fecha,VolumenRemisionado,Temperatura,Placa) VALUES (CONVERT(datetime,GETDATE(),20),"+Volumen_remisionado[0]+","+TemperaturaLlegada[0]+","+Placa[0]+")" Then you will see the actual SQL statement that you generated in the command alert window. You can even copy / paste it into a SQL command line and let SQL Server tell you exactly where the error is. But I know it will be the lack of quotes, as your's will evaluate to something like: INSERT INTO Alival_Descargue.dbo.Estados_PLC(Fecha,VolumenRemisionado,Temperatura,Placa) VALUES (CONVERT(datetime,GETDATE(),20),1,2,MyString) where you really want: INSERT INTO Alival_Descargue.dbo.Estados_PLC(Fecha,VolumenRemisionado,Temperatura,Placa) VALUES (CONVERT(datetime,GETDATE(),20),1,2,"MyString")
  3. No, you are not missing anything. V channels are largely left over from before DAQFactory had real scripting with variables. However, it seems many user's still use them, so we haven't removed them. If you have some suggestions on ways to improve them, please post them on the Suggestions forum and there is a good chance they will get implemented.
  4. AzeoTech

    Software Update Policy Question

    The current version is 17.1. You can download it here: Just download and install over your existing install. Revision history is here:
  5. For a single flag it is especially easy: private handle ="c:\data\myfile.txt", 0, 1, 0, 1) file.write(handle,"5") file.close(handle) or to read from the file: private handle ="c:\data\myfile.txt", 1,0, 0, 1) private string datain = file.close(handle)
  6. AzeoTech

    Graph appearance

    Jeff, I believe that is just a matter of what order you add the traces. I can't remember which way it goes, but try adding the traces line first then area, and if that doesn't work, do it the opposite on a new graph.
  7. 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.
  8. AzeoTech

    Connects to wrong Ethernet card 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.
  9. 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?
  10. 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
  11. 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.
  12. AzeoTech


    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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. AzeoTech

    Resize DAQFactory

    How is it limiting you?