AzeoTech

Administrators
  • Content Count

    5,768
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. AzeoTech

    1 Second Missing

    And it is not that it is starting late or ending early, it is that when you start it, it doesn't actually start writing data for a short bit, and likewise, when you stop it, there may be data queued up in memory for alignment that is never logged.
  2. AzeoTech

    1 Second Missing

    The export set will have channels with [0] after to only write one line at a time, then do: export.myExport.start() at whatever interval you want to log. It will then write one line and stop, so you don't stop it yourself. Put that inside a loop. But it may not be able to handle 100hz.
  3. AzeoTech

    1 Second Missing

    Logging sets aren't designed to start/stop on a dime. This is due to optimization / alignment features. An export set of one line of data being triggered at an interval by a sequence is more reliable. Using File. functions is the best. Or for simplicity, just let the logging set run for two seconds longer than you want.
  4. It really sounds like a device issue, almost certainly with the USB/Serial converter. It is one of the reasons I really hate them and recommend folks purchase Ethernet->serial converters instead of USB to serial converters. With Ethernet, DAQFactory uses native Windows functions to communicate and that is all handled nicely because there is no 3rd party software involved. With USB->Serial, DAQFactory also uses native Windows, but that is then hijacked in Windows by the USB/Serial converter driver (the "virtual" comm port). If there are issues with that driver, and there often are, DAQFactory fails to communicate, which unfortunately makes DAQFactory look bad, even though it is not its fault. So, my initial recommendation is to make sure you are running the latest drivers for that converter, and my second recommendation, which you may not be able to implement, is to just switch off using USB converters and go for an Ethernet->serial converter. As for Win 10, also make sure you have disabled auto-updates. You can't explicitly do this, but have to use the trick of marking all your network connections as "metered".
  5. AzeoTech

    Coefficient of Variation

    That is because the Krough value is the result of an average of 5 minutes of data and you haven't created a history. So, I would create a Test channel called KroughData, with Timing = 0. Then replace this line: Krough = stdDev(precalc) / avg(precalc) with these: private tKr = stdDev(precalc) / avg(precalc) tKr.time = systime() KroughData.AddValue(tKr) Also you can get rid of the line that says "global Krough"
  6. AzeoTech

    X-Axis Error datetime

    It is correct if you assigned the time stamp to the time portion of test.millitm.
  7. AzeoTech

    X-Axis Error datetime

    DAQFactory wants time in UNIX time, which is seconds since 1970. Today's date is a little more than 1.5 billion, and from the look of it, Time.DateAndTime are already in this format. So, you just need to combine Millitm and DateAndTIme (by dividing Millitm by 1000 and adding to DateAndTime). Then you can use the result as the X axis expression for the trend graph, or alternatively, stick the time stamp into the time portion of the main variable. So, if you have: myVariable = // some data from the database DateAndTime = // time stamps in proper form from somewhere myVariable.time = DateAndTIme // assigns time stamps to time portion of myVariable Once you've done that, then the X expression can just be "Time" as default. Be careful with your queries though. You make two queries to the same database, with one being sorted and the other not. That means the results won't line up. You should instead consider just doing one query and getting all the data as one.
  8. AzeoTech

    Coefficient of Variation

    What is the actual formula (not in DAQFactory)? It looks like your graph is actually showing the last 25 minutes. Are you just looking to get it based on the last five minutes? In that case, you need to subset: StdDev(((pressure0[systime(), systime() - 300]- pressure1[systime(), systime() - 300] )/2.745)/pressure1[systime(), systime() - 300])/ Avg (((pressure0[systime(), systime() - 300] - pressure1[systime(), systime() - 300])/2.745)/pressure1[systime(), systime() - 300]) It kind of gets hard to read this way, so you might consider creating a calculated V channel, so V.pressure0_5min might be pressure0[systime(),systime()-300], and the same for pressure1. Then I'd create another calcuated V channel with the division, say v.kroughPreCalc ((v.pressure0_5min - v.pressure1_5min)/2.745)/v.pressure1_5min Then the final expression just becomes: stdDev(v.kroughPreCalc) / avg(v.kroughPreCalc) Remember, when naming the V channel you don't put the V. in front. That is just for accessing the data. That all said, I would, in fact, if I was doing this, do it in a sequence that runs all the time and calculates this at the same interval as data comes in: global Krough private timeFrame = 300 // seconds delay(timeframe) // wait 5 minutes for data to accumulate while(1) private p0 = pressure0[systime(), systime() - timeframe] private p1 = pressure1[systime(), systime() - timeframe] private precalc = (p0 - p1) / 2.745 / p1 Krough = stdDev(precalc) / avg(precalc) delay(1) // gives an update rate of once a second... endwhile
  9. AzeoTech

    Command db.Execute()

    Your construction of the SQL string is wrong. You need to use + to create the string: db.execute(dbase, "INSERT INTO HAR5.dbo.OEMH5(ContadorTotal) VALUES (" + conteo_salida[0] + ")")
  10. AzeoTech

    unlock graph

    If you mouse click lock you can also go to the Workspace and find the component there under the appropriate Page. If you click on it in the workspace, it selects it on the page. Then you can unlock it. Mouse click lock is great for big panels and other stuff that you might put underneath a bunch of components.
  11. AzeoTech

    unlock graph

    You should be able to just select it then right click. Just make sure you select it (i.e. ctrl-click). If you just click on the graph so that it displays the colored border, then you are presented with a different popup menu.
  12. AzeoTech

    sequence.inserthere.running

    Certianly. Use evaluate() instead of execute(). Execute() runs a string as a full statement (a complete line of script). Evaluate() takes the string and evaluates it as an expression which returns a result. It can't be used on its on. So while you can do: execute(myString) you can't do: evaluate(myString) Instead, you use evaluate with other script on the same line that uses that result, so: myVar = evaluate(myString) or in your case: if (evaluate("sequence." + myString + ".running") == 0)
  13. AzeoTech

    OPC Server / Client

    The client doesn't need any special DCOM configuration. The server is the one that has to be setup. You also may need to double check any firewalls, including the software firewall. And double check that you enabled all users on the server.
  14. AzeoTech

    OPC Server / Client

    Either DCOM isn't setup correctly on the OPC server computer, or RSLinx has security settings that are blocking remote connections.
  15. AzeoTech

    stop all sequences

    You might have to stick with ending each sequence. You could also switch the entire system into safe mode. To stop the sequence that is currently running, simply "return" from it instead of calling endseq() from within.
  16. AzeoTech

    Serial Connection - New Protocol

    You used the correct format for entering hex values into the monitor, but it may be the wrong packet. Are you sure the destination ID is 2? The docs only show me a packet type of EA E5, you have EA E2.
  17. AzeoTech

    stop all sequences

    What release of DAQFactory are you using?
  18. AzeoTech

    2Nd Instance Of Daqfactory

    Certainly: go to File - Preferences and check the box that says "Disable 2nd Instance Check". This feature worked well in earlier versions of Windows, but has become an issue and will likely be removed in future releases of DAQFactory.
  19. AzeoTech

    Serial Connection - New Protocol

    The most likely issue is the CRC. The device is probably rejecting your query because you aren't calculating the CRC correctly. What script are you using to calculate this?
  20. AzeoTech

    Brows for OPC Item

    The remote computer won't show if DCOM isn't setup to allow it to show.
  21. AzeoTech

    Report Creation

    No, if PrintPDF() doesn't do what you want, you'll have to use a 3rd party PDF generating tool like Acrobat Distiller and print to it. I recommend at least 17.1 for this as it scales better.
  22. AzeoTech

    stop all sequences

    Yup, it is just: sequence.StopAllSequences() And as you pointed out, make sure it is the last command of the sequence, since the sequence that calls this function will stop as well unless it is being called from a Component Action or an Event.
  23. AzeoTech

    license error ocured

    If you are using Express you have to start DAQFactory using the DAQFactory Express link. You cannot start it by clicking on your .ctl document. The Express link is in the Windows Start menu.
  24. AzeoTech

    Time Header

    You can't change it through a logging or export set. You would simply need to create a script that does the logging instead using the File. functions. Then you can write whatever you want to the file. Actually, I lied. If you create the file using file. functions and write your header, then start the logging/export set and it won't right a new header if the file already exists.
  25. Illegal data address comes from the device and is a Modbus error code, not DAQFactory. This can happen in one of several ways: 1) you are requesting an address that doesn't exist 2) you are using the wrong function (i.e. reading a holding register when in fact it is an Input register) 3) you are off by 1 register on a 32 bit value (U32, S32, float). Remember, 32 bit values require 2 modbus registers, so you'll see in your docs that the addresses jump by 2's. If it says 2, 4, 6, etc. and you try and read 1 or 3, then often the device will send an illegal address error because in order to read address 1, you really have to read 0 as well and combine them. 4) on that same note, you try and read a 32 bit value, but only request one register (because the I/O type is set to a 16 version). 5) you are using 0 based tag #'s for one device and 40,001 based tag numbers for another. You have to choose which and stick with it. I personally always use 0 based to avoid any confusion and because that is what is in the low level Modbus request anyway. 40,001 just gets converted to 0 before going down the wire to the device. The whole 40,000 and +1 part is just fluff added many years ago when they thought it would be confusing for people to count from 0.