AzeoTech

Administrators
  • Posts

    6,436
  • Joined

Posts posted by AzeoTech

  1. You mean the channel stays above the threshold for a full 15 minutes? The Alarm expression would be:

    min(myChannel[systime(), systime() - 900]) > setpoint

    change myChannel to your channel name, 900 to the time width (15 mins), and setpoint to your setpoint. If you wanted to alarm in reverse (i.e. staying lower than the setpoint), you'd change the > to < and the min() to max().

    Note that when you first start DAQFactory, if the channel is already above the setpoint, the alarm will trigger immediately.

  2. You can put it right in the event for the channel, or create a second channel, a Test channel with Timing = 0, then in the event for the first channel put:

    if (myChannel[0] != myChannel[1])

    myTestChannel.addValue(myChannel[0])

    endif

    This will cause myTestChannel to only have values when myChannel changes. You can then put myTestChannel in your logging set.

  3. Important point: there are two possible places for password. You can have a password on the database (MySQL, Access, etc), and/or you can have a password on the ODBC connection.

    If the ODBC connection has a password on it then you can specify that in the db.open() function call. It means you can't use logging sets or standard alarm logging as these only work with non-password protected ODBC connections. Or you can just remove the ODBC password. If the database instead has a password, you need to set that in the ODBC settings in Windows. That is outside DAQFactory and usually in Windows Administrator Tools (the same place you setup your ODBC connection.)

  4. Yes, and I believe it is mentioned somewhere else on this forum (but I can understand not being able to find the post among all the rest). Alas, this is due to a rather old graphing control that we do not have source for. We will be updating the graph in coming releases, which will resolve this, among other things. In the meantime, consider using the page.capture() or the page.printPDF() functions.

  5. That said, you could try and render your own table out of variable value controls. Then you could do it. It would be a little more combursome to create and would work a little different than a standard table (probably with scroll buttons instead of a slider), but would achieve the same thing. In some ways, especially for a touch screen, it would probably work better than a table.

  6. Part 1:

    You are doing it in the wrong order. You need to change the language first, then reset the array. That's why it does it the second time around.

    Part 2:

    Works fine for me. I did: system.messageBox("@abc") which displayed "abc". Then I created another language, assigned the phrase "abc" to "def", selected that language and did system.messageBox("@abc") again and it displayed "def"

  7. Date/Time edit: I'm saying change the format to use numbers instead of month names, and then either indicate the month / day ordering using a label, or dynamically change it using the strDateFormat property based on the user's preference. So 3/31/11 or 31/3/11 instead of March 31, 2011

    Align: 0 = auto, 1 = left, 2 = center, 3 = right

  8. It does the translation when the assignment is made. So you can still keep the translation in the languages, but you need to redo the assignment as well when the switch is made, simply:

    WeekDayNames = {"@Sun","@Mon","@Tue",etc}

    Redoing it will retranslate it to whatever language was selected (or english if none)

  9. Sorry, most of my responses are off the cuff so may require you to tweak a little. As you saw, month starts at one and arrays index from zero, so you either need to subtract one or add a dummy value into the array.

    As for the @ dropping off, you do not need to add another. The translation has already occurred and doesn't need to be done again.

  10. First, create an array of strings for weekday and month names. Use the standard language stuff, so, for example:

    global weekdayNames = {"@Sun","@Mon","@Tue", etc....}

    global monthNames = {"@Jan", "@Feb", etc....}

    Then you can look it up simply by using formatdatetime() to return the current month or day of week and using that value to lookup the name:

    monthNames[formatDateTime("%m",systime())]

    weekdayNames[formatDateTime("%w",systime())]

    For speed, you might consider using math for day of week. Jan 1st 1970 was a thursday, so you'd have to make your lookup table start on thursday, then is:

    weekdayNames[systime() / 86400 % 7]

    That will be quite a bit faster than formatDateTime() since its just simple math, but speed may not be an issue in your app.

  11. There isn't any easy way. There is a function in Windows that gets you the height and width of text, but it is a very expensive operation as it has to basically render the font in memory and see how big it ended up. DAQFactory doesn't expose this function to its users. It should also be noted that fonts render differently on different machines, so just because your development machine says that something will take 100 pixels wide, doesn't mean it will be 100 pixels wide on other machines. This happens all the time in browsers too. It is especially a problem when you use non-standard fonts (i.e. other than Arial, Verdana, Times New Roman and a few others). The problem is that if the user doesn't have the font you designed with, the system will substitute another font.

    My recommendation is give ample room in your design...

  12. You can't really change the code page from script. Even if you changed the registry (which you could probably do externally using shellExecute() and some external app), you'd have to restart DAQFactory for it to take effect.

    FormatDateTime() can format your date any way you want. %c will use whatever the current system format is, or use other % codes to do it however you want. Its just a string, so you could, technically, make that a language phrase too! The graph component, however, is fixed.

    As for &, that is a windows code for shortcut and some controls draw it that way. Try just doing &&

  13. Your version should have that feature.

    V6.00 will likely be released in small steps instead of a large release. The graphics changes are a higher priority than unicode, but unicode is still important to us as a large number of customers are international. I don't have an exact timeline but the pressure is on now for us to make some progress.