• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral


About AzeoTech

  • Rank

Recent Profile Visitors

50,551 profile views
  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


    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.