AzeoTech

Administrators
  • Content Count

    6,180
  • Joined

  • Last visited

Community Reputation

0 Neutral

2 Followers

About AzeoTech

  • Rank
    Guru

Recent Profile Visitors

52,301 profile views
  1. AzeoTech

    Variable in python enviornment to Channel value

    V channels are largely deprecated, so I wouldn't recommend them. They are left over from when we didn't have variables (like 18 years ago!), but so many people seem to use them that we can't really get rid of them. I think people like it because you can see the contents in a table? Other than this, and the fact that assignment to a V channel does the equivalent of AddValue() on a variable, a V channel is basically the same as a global variable. A channel, however, has added features such as persist, conversions, and other things. If you are getting an input value from the python script that is basically an I/O point, I would use a Channel.
  2. AzeoTech

    C1136 error

    As the message says, it is a timeout error, meaning your serial device did not respond to your query within the timeout period.
  3. AzeoTech

    Variable in python enviornment to Channel value

    There are probably lots of ways, but the easiest is probably to do what you described and use a file. Use the File. functions within DAQFactory to read the file.
  4. AzeoTech

    PostgreSQL

    Unfortunately I don't know the details of the setup for every ODBC data source. From your screen shot, I would try clicking the DataSource button next to options in your ODBC configuration and see if there is a user/password there. I would also make sure you don't have another ODBC data source with the same name. I don't actually know if it matters, but make sure you don't still have a DAQFactory data source in the 64 bit ODBC.
  5. AzeoTech

    2nd Highest

    Well, there isn't a built in function for this like min2() or min(val, 2) or something, but it is not hard to do using boolean math, especially if all the values are > 0. You'd basically have to iterate through, removing values as you go using boolean math: private themax = max(myArray) private themax2 = max(myArray * (myArray < themax)) private themax3 = max(myArray * (myArray < theMax2)) etc...
  6. No, channels were purposely designed so that you couldn't remove data from them. It goes back to the 80's when the discovered the ozone hole. A group was already down in Antarctica measuring ozone when another group came down, found the hole, published a paper and became famous for finding it. The first group, that had been down there for years couldn't figure out why they hadn't seen it until they realized they had removed all the data below 50ppb because they assumed it was invalid data. But of course, the data below 50ppb ended up being the most interesting data! So, if you are going to want to add and remove data you really should use a global variable instead of a channel. There is a way to do it in a channel, but I can't say how that would affect persist files or logging sets, which really are the primary reasons you would choose a channel over a variable. Adding to a variable is the same: myVar.addValue(5) Removing, I just subset: myVar = myVar[1,numrows(myvar)-1]
  7. AzeoTech

    PostgreSQL

    Make sure you didn't put a user/password on the data source itself. This is different than the user/password the data source uses to access the database, but if you don't know better, maybe you put the same user/password in both places.
  8. AzeoTech

    PostgreSQL

    First, make sure the ODBC connection works by clicking on the Test button in your ODBC configuration. Also, make sure you created the ODBC data source in the 32 bit version of the control panel applet, and not the 64 bit version. DAQFactory, as a 32 bit app, only connects to 32 bit data sources. You can quickly verify that the ODBC is accessible from DAQFactory by going to the command alert window and typing: global dbase = db.open("DAQFactory") That will try and open the data source named "DAQFactory". If it just does it without any message, then you are probably good. If not, it will display an error message. If it does work, you'll need to close the connection by then typing: db.close(dbase) Next, I would probably recommend a logging set if you are just getting started. It is largely setup the same way, except you just select the channels you want to log. Finally, I do not know the dialect of PostgreSQL, so you might have to click the SQL button in the logging/export set next to where you put the data source and tweak the SQL commands to match what PostgreSQL uses.
  9. AzeoTech

    Email error 80040211

    OK, good to know. I couldn't find that "less secure" setting when I looked, but maybe it was because 2 factor was turned off. I can't imagine that gmail will stop allowing this. It will kill a LOT of automation devices. Maybe we need to get a petition going?
  10. AzeoTech

    Email error 80040211

    Thanks Steve. But does this work for gmail.com addresses? They have a different policy for workspace accounts.
  11. AzeoTech

    Email error 80040211

    Any error code that is 8 digits and starts with 800 or similar when doing any network function is going to be a standard networking error code which you can search the internet for. That said, I get a different error, namely that the username / password are not accepted. This appears to be because Google is no longer accepting logins with just username / password. It is once again a case of a big company using excessive requirements to fix security issues that don't apply in all cases. You can read about it here: https://support.google.com/accounts/answer/6010255?hl=en&amp;utm_source=google-account&amp;utm_medium=profile-less-secure-apps-card You have two solutions for now: 1) get a google workspace account, though this is probably a bandaid as I am guessing they may eventually make the same change. They might not because a lot of corporate customers do things like alarming etc with older hardware and are going to balk at having to replace it all just because the guy down the hall doesn't know how to be safe on the web, but you never know 2) use a different email service for your outgoing emails We will look into using a login they accept, but it will be some time before anything can be implemented. Of course the best way to ensure you aren't subject to the whims of google or some other big company is to install an email server of your own that only does outgoing email. You could then use a whitelist in addition to user/password combo to really button down the security, though really, if you are only using the outgoing email address for alarms and notifications to a select few, and never giving it to any website, there is no reason a hacker would pick it up.
  12. AzeoTech

    Does QueryToClass have numeric indexing?

    The best way to do this is to use the AS SQL keyword to provide an alias for the desired tag. For example: select myField as myAlias from myTable; This is actually the only way to do SQL function selects, for example: select sum(myField) as theSum from myTable; or more common: select min(myTimeFIeld) as startTime from myTable; Of course your SQL commands may differ slightly due to the varying dialects of SQL.
  13. AzeoTech

    Functions copied into `OnSend` event

    Thanks.
  14. AzeoTech

    Functions copied into `OnSend` event

    I'm not sure, but it is easy to fix. Just open the files in notepad and delete the script out of OnSend.
  15. AzeoTech

    Data sampling

    Create your 8 channels first, giving each a separate channel name. Make sure you history is long enough to cover 48 hours, but if it is more than about 1 million, you should consider using Persist as well. Then create your 2D graph. Create a trace for each of the 8 channels, assigning them to either Left Axis 1 or Right Axis 1 depending on what you want. Finally, set the scaling of the graph. The bottom axis time width would be 3600*48 for 48 hours. You say autoscale, but then provide fixed numbers, so I'm not sure what you want for vertical scaling. To scale from 0-10,000, just put 0 for Scale From and 10000 for Scale To.