• Content Count

  • Joined

  • Last visited

Everything posted by AzeoTech

  1. Use the format() function. It's not really sig figs, but rather # of digitals after the decimal. So, for, say, microsecond precision, you'd do: format("%.6f", mytime[0]) Format() pretty much follows the rather universal C printf() statement, so there is a lot of examples on the web.
  2. Logging sets aren't going to be a good fit for this application. For optimization reasons, to allow for logging of high speed data, the logging sets cache data before writing to disk. This is why you see several seconds of latency between the start/stop and the actual time stamps in the file. Logging sets are really designed to be started and left running. For your application I would either use an export set where each line has [0] so it logs just one line of data, then trigger it from a loop in your script, or do as I do and simply use the File. functions to log the data exactly how you want it, again within a loop in your script. The File. functions will give you the most control, basically allowing you to log data however you want. Fortunately you are already in a loop in your data acquisition, so you would put that script right into that loop, probably inside your if().
  3. AzeoTech

    Custom Time Formatting for Milliseconds

    You'd have to add it to the end manually. Something like: formatDateTime("%m%d%y %H:%M:%S", thetime) + right(format("%.3f", thetime),4)
  4. For various reasons, NaN is a function in DAQFactory which returns the value NaN, so you need: (pPU_Data3 == NaN())
  5. No, Channels are designed so that you can't remove data. You would need to copy it and clean up the data, or simply clean up the data before it gets to the channel. To copy it to another channel (say a Test channel with 0 Timing), you could do in a sequence: private tempData = PU_Rain_C tempData.removeAt(53,1) // note that I remove the higher index data first tempData.removeAt(48,1) myNewChannel.clearHistory() myNewChannel.addValue(tempData)
  6. AzeoTech

    Solenoid valve control

    For the U series devices there is the DAQFactory - LabJack Application Guide which is installed with DAQFactory. This covers most everything you need to know. To control an output, you just need to create a Channel in DAQFactory with device type Dig Out. DAQFactory will switch the pin direction for you in this case.
  7. AzeoTech

    Running a sequence once in 8 days

    I would probably create a Test channel with a History and Persist of 1 to store the next time the sequence should run, then have another sequence always running looking to see if that time has past. So, the Test channel could be like "NextMySequenceTime", Device Type: "Test", D#: 0, I/O type D to A, Channel #0, Timing 0, History 1, Persist 1. Then create a sequence marked auto-start, or that is started by your auto-start sequence: if (isempty(nextMySequenceTime)) nextMySequenceTime = systime() endif while(1) if (systime() < nextMySequenceTime) beginseq(mySequence) nextMySequenceTime = systime() endif delay(1) endwhile
  8. AzeoTech

    Rotate Component

    Most likely your wmf's aren't coming across as WMF's, but as bitmaps. This happens if you cut and paste from most programs. You may need to import the wmf into Symbol Factory then copy and paste it out.
  9. AzeoTech

    Hikvision IP and DF

    The plugin isn't for DAQFactory, but for the Chrome installation on that PC. To refresh the browser component, just call the SetURL() function of the component: component.myBrowser.SetURL("http://user:password@´╗┐ ") That may not work if the browser instead pulls from cache, so you might do something like: private i while(1) component.myBrowser.SetURL("http://user:password@´╗┐?junk=" + i) i++ delay(0.1) endwhile
  10. AzeoTech

    Markers text location and font

    Oh, to change the page programmatically, just do: page.strCurrentPage = "mygraphpage" delay(0.1) page.strCurrentPage = "someotherPage" As for the second part, I would probably split my page in two. Put the graph and anything else you want to print on one page, and everything else on another. Then have DAQFactory show both pages overlaid for viewing, and just show the one for printing. To programmatically change to two pages, do: page.strCurrentPage = "firstPage,secondPage" Make sure not to put any spaces after the ,
  11. AzeoTech

    Hikvision IP and DF

    If RTSP isn't working in the browser component, you probably need a plugin. Open Chrome on your system and see if that can access it. Was the error 302 or -302? 302 means the server sent a redirect and you'll have to figure out where it sent it. -302 isn't valid that I know of... Also, why not use the http method? You can just force a refresh every 0.1 seconds or so.
  12. AzeoTech

    Markers text location and font

    Depends on how you started DAQFactory and what the target directory is. This is largely determined by Windows. It is usually better to fully specify the path, for example: "c:\daqfactory\abc.pdf" There is no way to print just a part of a page. If you want to include just a part, it is best to create a second page with the exact same components, excluding the ones you don't want, and print that page instead. Note that in 17.x and earlier you have to view any page with a graph at least once before trying to print it / capture it. You can just view it programmatically for 0.1 seconds. To view a PDF you'd have to use the system.shellExecute() command. Ideally you would run the acrobat reader, but just executing the .pdf will likely work if you have it properly associated in windows.
  13. I personally use daqconnect.addValue() for everything. It gives me more control over exactly what data gets sent. And in your case avoids a dummy channel. I also use daqconnect.init() instead of using the menu, as it is more obvious what the data source is set to. It also allows for programmatic change of the data source.
  14. AzeoTech

    Markers text location and font

    Your best bet is to create a separate page for each graph, presumably duplicating the main page with 4 graphs. Then use page.printPDF() to print the appropriate page with the appropriate graph. Note that under 17.1 and earlier you have to view these 4 pages at least once before trying to print them. You can do this in a startup sequence. The viewing can be quite quick, 0.1 seconds. Releases after 17.1 will not have this requirement.
  15. There are shortcut keys you can assign in the Page properties, but usually people will create screen elements, such as a button that changes the page. To avoid creating the same menu over and over again, you can use overlaid pages. To see this in action check out the AshlandWater.ctl file in the samples folder.
  16. No, the dropdown is fixed.
  17. AzeoTech

    Unknown Error In Draw

    Olis, which release of DAQFactory are you using, and can you post your .ctl document and instructions on how to reproduce the failure?
  18. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    That is still pretty odd. Does that number actually update? Try creating a variable value control with this Expression: CH1.time[0] and see if it changes as well.
  19. Don't use the workspace to switch pages. Create buttons that change the pages and then it is easy to add script to trigger a sequence. The workspace is really designed for development, not for running your application.
  20. AzeoTech

    Multiple serial ports open

    Something is off then. My guess is the assignments aren't correct. Why don't you post or email us your .ctl doc so I can check. Many customers run multiple com ports so the program is certainly capable of it.
  21. AzeoTech

    Markers text location and font

    1) Removing Markers on graph via code: You can't do it. The idea of the markers it that they are user adjustable. If you want to create a scriptable marker, use the line or axis annotations instead. 2) Enlarging font of markers description which is displayed at the bottom of the graph and also changing its location. You can create your own display and make it look however you want by referencing the MarkerA_X, MarkerA_Y variables of the graph. 3) Changing font size for values inside of dropdown Combo List. Not currently possible. 4) While using Date-time picker, option to make time as either start or end of the day selected. You can simply do the math on the result. Start of day is: floor(value / 86400) * 86400. End of day is: floor(value / 86400) * 86400 + 86400. 5) Thaw all axis, instead of x and yfrozen for graph via code. Not sure what you mean here. In code, just set XAxisFrozen and YAxisFrozen variables to 0. Having another variable to do both is redundant. 6) Also, I tried printing graph and then saving it at a specific location, but when I click browse to select a path, the Daqfactory file crashes. This is a known issue in newer versions of Windows. Put the graph on a page to itself and use the regular print instead of the right click print.
  22. AzeoTech

    Multiple serial ports open

    Yes you can definitely do this. What problem are you seeing when you try this? Note that if you want to create two devices that use the same serial port you should only create one port and assign it to both devices.
  23. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    It is hard to say. It is probably just one channel that is causing it. Either you are querying an invalid tag, or you have other settings wrong on one of your channels, such as D# set to 0 instead of the proper Modbus ID. I would go through and set the Timing of all your channels to 0, then reset them one by one until the message starts appearing. Then you'll know which channel is causing the troubles.
  24. OK, but first I have to say: DAQFactory can't collect data when it isn't running, and Windows won't buffer the data on the serial port, so there is no way for DAQFactory to acquire data on the serial port before it starts, or if it is closed and reopened. This is a Windows limitation. As to the question at hand, there are a number of posts on this forum to read data that constantly streams. The general format is something like: purge() while(1) readUntil() parsedata endwhile where the while loop also generally contains a try/catch around the readuntil/parsedata portion, with a catch() that adds a small delay. You don't need a delay otherwise, and don't want one as it can cause a backlog. The readuntil() function will generate a delay while waiting for data. As to the parsing, use the parse() function to parse each line by the comma. Then it comes down to data manipulation. So, do the high / low sides need to be combined, or do you want them in different channels? If different channels, its pretty easy: either name your channels based on a convention based on the addressing, or use the channel.addValue() function to map the addressing to D# and Channel #'s.
  25. Send the file to support at azeotech There must be something in your file that is referencing those drivers.