AzeoTech
-
Posts
6,436 -
Joined
Posts posted by AzeoTech
-
-
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.
-
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.
-
Just compare the latest reading with the previous and only write if it changed:
if (myChannel[0] != myChannel[1])
// .. log data
endif
-
You might try going into the ODBC configuration in Windows, finding your data source, and then looking for a user/password setting and seeing if you can put the user/password there.
-
Correct, but only if its the ODBC connection. If its the database that has the password, then you can.
Instead of the logger, you can use the DB. functions to open the database and write to it from script.
-
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.)
-
Sorry, I'm unclear what you are asking. Do you want Windows to auto-login so DAQFactory can run, or do you need DAQFactory to provide the password automatically for your ODBC?
-
Please see this post:
for a description on how to reset it.
-
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.
-
Thanks Andrew! Your method would work quite well.
-
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.
-
No, not with a table control. You could do it with a tree control to create a what is generally called a list box, but that only would have one column.
-
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"
-
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
-
That control is a wrapper for the Windows control so the localization is controlled by the operating system. I would simply use a numeric format with a label indicating day/month ordering.
-
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)
-
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.
-
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.
-
That is controlled by the Windows system locale settings and not by DAQFactory. You could always use a look up table if you wanted to do it manually.
-
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...
-
I do not believe there is a way to delete.
-
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 &&
-
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.
-
Please see this post on how to tell DAQFactory to use a different Code Page. Read the whole post.
Reading A Simple Digital Input
in Channels, Conversions and general data acquisition
Posted
I can't say for sure without seeing your .ctl document, but you definitely want a [0] after the channel name:
if (NEStop_Pressed[0] == 0)
Make sure you don't have a global variable or other resource named NEStop_Pressed.
Glad to hear you have a hardware e-stop and aren't using DAQFactory (or any other software) to handle your safety systems!