AzeoTech

Administrators
  • Content Count

    5,671
  • Joined

  • Last visited

Everything posted by AzeoTech

  1. Channels look just like variables with some exceptions. So, if you have a digital output channel called "LED", you could have a sequence like this: LED = 1 delay(5) LED = 0
  2. Alarms with expressions that are invalid won't trigger, nor will they generate an alert, so you should be fine.
  3. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    Are you sure you don't have another piece of software or another device communicating with device? Many devices support only one connection at a time. Disconnecting and reconnecting would drop an existing connection and give DAQFactory a chance to connect.
  4. To avoid bogging down your system by accidentally specifying a big array, DAQFactory will only display the first 20 values in any array. So if you do: myChannel instead of myChannel[0] you'll only get the first 20 values of myChannel, not the entire history, which would chew up a lot of CPU time to display, over and over again. So, you are running up against this. What you'll have to do is display two sets of 16: (To.Bit(x))[0][0,15] and (To.Bit(x))[0][16,31]
  5. AzeoTech

    "p-Modbustcp 0010: Timeout" Error

    First, does the error keep reappearing, or is it simply left over from when the cable was unplugged? Errors in the command/alert don't go away unless you explicitly clear the command/alert window by right clicking and selecting Clear.
  6. Yup, you can do a lot with Filter() and since it is internal, it is fast and DAQFactory can do it in real time. I like Search() too. Its a quick way to find certain things in your data.
  7. What you have won't work because of the way stream works. Stream sends data in blocks, and so it is hard to process every data point as it comes in. Also, your while() loop lacks a delay(), which will cause the CPU power to spike. You should pretty much always have a delay() inside a while() loop. There are exceptions, but this is a good general rule. Now to your question, it is probably easier to just use the filter() function on the whole incoming data. You can make a V channel that is a calculated v channel (meaning there is an Expression associated with it). That expression would be something like: filter(UE9_11, UE9_11 > var.kw1min) Then whenever you reference that V channel it will perform the filter, which will remove all values that don't match the criteria. Filter() is an internal function so is pretty darn fast.
  8. AzeoTech

    convert hex to decimal on temp sensor.

    Hex is just another form of a decimal number. 0x0f (hex) and 15 (decimal) are the same number. Those docs simply show 15 as 0x0f instead of 15. So it's not really a "hex" device, it just takes numbers. The hard part for this device is going to be the CRC. Its not particularly hard, but you are going to have to convert that sample CRC generation code into DAQFactory script. You might see if there is a way to disable the CRC on the device.
  9. AzeoTech

    Document Licensing

    Nope. That would defeat the purpose of the licensing mechanism. As the docs say: "Do not lose your password! We cannot recover it for you! If you lose the password you will not be able to use your application on systems that aren't otherwise licensed and you won't be able to install your application on any new computers. Once again, while we can recover document editing passwords for a fee and subject to proof that you created the document, we CANNOT recover the licensing password for you as there is no way for you to prove to us that you are the owner of the document other than knowing this password. That all said, we do offer a document registration service. You provide us with your document before you enable the license feature, or at least before you have forgotten the licensing password, along with the emails of people authorized to retrieve the password, and in the case of a lost password, we can retrieve it for these individuals or the president / owner of the company it is registered to. There is a fee for this service and for any password recovery. We have to have your document ahead of time to retrieve an internal unique identifier. This identifier stays with your document even after you edit it and is what gets registered with the recovery email addresses. Please contact us to set this up."
  10. I don't know. It works for me when I create a channel, then in Command / Alert do: ? format("%.6f", myChannel.time[0]) It prints something like: 1556486246.000109 The time is stored internally as a 64 bit floating point value, so you should be able to get 6 decimals places.
  11. AzeoTech

    DDE client crashing

    DDE is pretty ancient technology and not particularly well supported in Windows. I think we have a slightly more updated driver if you'd like to try it, but no guaranties. Please contact us directly for it.
  12. 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.
  13. 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().
  14. 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)
  15. For various reasons, NaN is a function in DAQFactory which returns the value NaN, so you need: (pPU_Data3 == NaN())
  16. 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)
  17. 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.
  18. 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
  19. 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.
  20. 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@192.168.1.66:80/Streaming/Channels/1/picture´╗┐ ") 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@192.168.1.66:80/Streaming/Channels/1/picture´╗┐?junk=" + i) i++ delay(0.1) endwhile
  21. 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 ,
  22. 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.
  23. 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.
  24. 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.
  25. 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.