AzeoTech

Administrators
  • Content Count

    5,686
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. 1. You can use the file.makeDirectory() function to create a new folder. Note that in newer releases of DAQFactory, the c:\DAQFactory folder is marked as read only for non-admins. This is for security reasons 2+3) I'm not sure what you mean by recipe as DAQFactory doesn't have built in recipes per se. 4) you can't delete a single choice. You have to remove all choices, then add all the ones you want back in. 5) you can restrict the radio button by processing the input. I.e. don't have the radio button change the output directly, but rather have it change a variable or Test channel, then validate that value before sending it out. 6) correct. This is why printpdf() is not an official, documented feature. The logo must be in WMF format, or you can use the regular Windows print function and Acrobat Distiller print driver.
  2. DAQFactory doesn't have a built in recipe feature because it gets implemented is so many different ways, so I'm not sure about the first three points. That will depend on what you have implemented for a recipe. As for the 4th, that is correct. Unless your logo is in a WMF format (windows meta file), it won't print. This is largely why the PrintPDF() function is not considered a documented and released feature. You should be able to, however, print to Acrobat Distiller to get PDF documents that will include logos.
  3. AzeoTech

    Buttons Sticking

    I would try moving all the script into a sequence then using beginseq(mySequence) to start the sequence rather than have it run in the Action. The problem with code in an Action is that it runs in the messaging loop of DAQFactory, and it seems you are doing something to throw that off-kilter. Running it in its own sequence makes it so the messaging loop can continue without issue while the capture and subsequent code can run in the background.
  4. I am not quite clear what you wish to do...
  5. Its a known issue with some machines. It has to do with the license file and only started cropping up in force recently. Really we will likely remove this feature in new releases and eliminate the popup altogether.
  6. AzeoTech

    Accesing variable value from protcol

    Yes, you should, and then you should create a channel with this setVolt I/O type. Finally have the Set To action of your control change the channel you just created.
  7. Inside DAQFactory, go to File - Preferences and check the box that says "Disable 2nd instance check". That will get rid of that window.
  8. Just add gettime(): GetTime(Max(PO_wind_gust[0h,0h+86400])) Then use formatTime() or formatDateTime() to format that number into something you, as a non-computer, can read.
  9. AzeoTech

    Accesing variable value from protcol

    Did you create an actual protocol driver, or just write a sequence? It is often easier to just create a sequence unless you plan on reusing the code across many applications. If you did a protocol driver, probably the easiest thing to do is put that code into an output I/O type, then create a channel with that I/O type. Then you can use the SetToValue variable in your script to set the appropriate value. In the screen component you would set the Set To Channel to a channel you created with that I/O type. See section 15.2.2 in the user's guide. Feel free to post or email what you have so I can give a more detailed answer.
  10. AzeoTech

    Scheduling, Simultaneous sequences.

    You can assign them low priority. High priority is for things that need to happen exactly when you want them to happen. I'm guessing your schedule can be 1/2 a second late, so priority 1 is probably fine.
  11. AzeoTech

    Scheduling, Simultaneous sequences.

    All sequences started with beginseq() or by selecting Begin Sequence run simultaneously with other sequences and the rest of DAQFactory. The exception would be sequences called as a function: mySequence()
  12. 1. Well, the channel that has the wrong data isn't the one that is empty. It is some other channel before it. Are you sure ALL your channels have data? They all have to have the same amount of data too. 2. I would expect it to error out of the loop, but it kind of seems like it is just skipping the line that adds that value and not even putting a comma in. Do you see fewer columns than expected?
  13. Empty channels are going to throw your logic. I'm not sure that you'll get a "," even if the channel is empty. I'd use isempty() to check.
  14. Glad you got to the bottom of it, and thank you for sharing the result!
  15. Are you sure some of those channels aren't empty? Is it off for the entire column or just a few rows?
  16. The function you wrote would only work if all the channels had the exact same number of historical data points, and would only work if no data came in during the time the for() loop runs. If I wanted to successfully align data and log it, but only after the fact, I would generate each line in-situ, then write it at the end. I'd do that by creating a Test String channel (with Timing 0 of course), then a sequence that is always running like this: Private string channelNames = Channel.ListAll() private string strLine while(1) delay(1) try strLine = FormatDateTime("%c", systime()) for(j = 0, j < numrows(ChannelNames), j++) strLine += "," + DoubleToStr(Evaluate(channelNames[j] + "[0]")) endfor myTestStringChannel.addValue(strLine) catch() endcatch endwhile Then when I wanted to write this to disk, I'd write the header like you did, then write the enter strLine history, or whatever part of it I wanted.
  17. You don't want DAQFactory to be the slave. Possibly, but the radio isn't responding to DAQFactory queries except occasionally, and then the response doesn't look to me like a Modbus, that's why I think its either a comm setting issue, or the device isn't setup to be a Modbus slave, but instead a different protocol.
  18. Yes, that is because Windows made the program files folder read only unless run as admin. And right, inside the protocol script for an iotype, there is a local variable created called "Channel" that is passed in corresponding to the channel # in your channel. So, it gets confused and uses that variable instead of the global Channel object.
  19. DAQFactory is the master because it is making the queries. The device is the slave because it only responds to queries. It won't say anything unless asked. That device supports several different protocols, and typically you have to configure the device for the protocol you want as you can't talk multiple protocols on the same port.
  20. The device doesn't seem to be replying with Modbus. Are you: a) sure that the device is setup for Modbus RTU slave and not another protocol, b) sure you have all the comm settings right? Often Modbus uses Even parity.
  21. 1) you have a comment in line 39 that isn't marked as a comment. Its outside functions in the class, but still will have unpredictable behavior. 2) for some reason you commented out l2 at line 42. Then you go on to use l2 in line 45 and 46. This may be where you are getting the C1000 error since l2 never exists.
  22. Certainly. But given your error message, you probably have a typo somewhere. Any chance you can post you script? Feel free to X out the URL or anything else you don't want to share.
  23. Sure, use ListAll(), then use evaluate(): private string chans = channel.listAll() for (private x = 0, x < numrows(chans), x++) for(i=evaluate(chans[x] + ".GetHistoryCount()-1"), i > 0 , i--) Private.strLine = FormatDateTime("%c", evaluate(chans[x] + ".Time")) + "," Private.strLine += DoubleToStr(evaluate(chans[x] + "")) + "," File.Write(Private.handle, strLine); delay(.1) endfor endfor Notes: 1) you can do ListAll() and just specify a group of channels by providing the group name as a string 2) the above code will be VERY slow, especially with the delay(0.1) in there 3) I recommend using numrows() instead of GetHistoryCount()
  24. What is datain? And what about the other ? statements output?