All Activity

This stream auto-updates     

  1. Last week
  2. 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.
  3. 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.
  4. adamLL

    C1136 error

    What does a C1136 error mean?
  5. adamLL

    Variable in python enviornment to Channel value

    Thanks for the help. When I store this value in a channel, would it be best to use a V: channel or a test channel. I'm a little confused on the difference between those two.
  6. 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.
  7. Is there any good way to get a value from a variable from a python environment into a channel/variable value in DAQFactory? I am currently using an instrument that will only let me easily read its outputs with python. My current idea is to have a python script that reads the output from the instrument, and then writes it to a file. Then I would use DAQFactory to read the file in as the channel value.
  8. Was wondering if anyone had used DAQFactory with any Keysight instruments or instruments that use SCPI code. I am using a power supply and want the voltage to be equal to the control variable in a PID loop, and I also want to be able to use MEASure to measure the current (although that one isn't as important). I have some ideas about using python along with DAQFactory but would be interested if anyone had any other ways they figured it out. :)
  9. 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.
  10. 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...
  11. boliva

    2nd Highest

    Is there a way to easily find the second highest or third highest value in an array? I know I can use Max/Min, but not sure if I wanted to find the two highest values how to find the next easily?
  12. Earlier
  13. Finally got this going today, using these credentials: private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 587 semail.strUserName = "<gmail_address>" semail.strPassword = "<app_password>" semail.strAuthenticate = "AuthLogin" semail.strBody = "this is a test" semail.strReplyAddress = "<gmail_address>" semail.strReplyName = "<gmail_address>" semail.strSubject = "test subject" semail.strTo = "<gmail_address>" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send() These are my original settings, so it seems there is something else going on beyond just having the right code and account settings. For anyone else reading this, I'd recommend logging out and back in to your google account every day until it starts working. I suspect Google is blocking access for a period of time; I had a similar problem last year (https://support.azeotech.com/topic/4251-twitter-feed-anyone/):
  14. Rachel

    PostgreSQL

    How do I check this?
  15. 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]
  16. 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.
  17. Rachel

    PostgreSQL

    Thank you! When I clicked Test, the connection worked. I had the wrong version installed, but now I have the 32 bit version. I tried global dbase = db.open("DAQFactory") but an error popped up and I'm not sure why. The error: 01002 Unable to open ODBC database: Line 1
  18. Hi All, I have a button that when clicked records a value and saves it in a test channel (D to A). I was wondering if I could have a separate button that I can use to remove the last entry? If so, how would I go about this? Thanks a lot Callum
  19. SteveMyres

    Email error 80040211

    Suggest the following. These settings look closest to what the working settings are called in that note I directed you to. semail.strAuthenticate = "LoginPlain" semail.strConnectionType = "SSL_TLS" semail.strSSLProtocol = "SSLv2orv3"
  20. 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.
  21. Rachel

    PostgreSQL

    I would like to automatically log data from DAQFactory to a database in PostgreSQL. I followed this website to configure an ODBC driver for PostgreSQL. Then I created an Export Set and changed the settings so that it uses ODBC Database as Export Method. What are the next steps? I am completely new to these platforms so any help is much appreciated! Thanks!
  22. Rivero

    MQTT

    Reading data from an mqtt server to display them in Daqfactory, especially on remote devices that send data to the mqtt server and that daqfactory has access to to display them. It would be great.
  23. Thanks Steve, but still no luck for me unfortunately. 2 Step verification is on, and I have generated an "app password." private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 465 semail.strUserName = "<gmail_address>" semail.strPassword = "<app_password>" semail.strAuthenticate = "AuthLogin" semail.strBody = "this is a test" semail.strReplyAddress = "<gmail_address>" semail.strReplyName = "<gmail_address>" semail.strSubject = "test subject" semail.strTo = "<gmail_address>" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send() Error 80040227 every time. Tried port 25, 465, 587. Help please!
  24. SteveMyres

    Email error 80040211

    Or build an SMTP server. And yeah, I think you have to enable 2FA to get it working.
  25. SteveMyres

    Email error 80040211

    Host created an FAQ that includes screenshots for the steps at https://hosteng.com/FAQFiles/Do-more.htm#FAQ0054 They did the FAQ earlier this week and were of course testing it as they went, so I know it still works.
  26. 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?
  27. SteveMyres

    Email error 80040211

    Yes, I'm using a GMail.Com address and that process is what I'm using with all my emailing PLCs, and they're all still working as of last night.
  1. Load more activity