• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral


About AzeoTech

  • Rank

Recent Profile Visitors

51,229 profile views
  1. AzeoTech

    Windows 10 iOT

    Actually as mentioned I've been doing some research on this. Win 10-IoT is a binary equivalent to Win-10 Enterprise. I believe really the difference relates to their licensing and the way it is distributed (through images). Images are only worth it if you need to install a bunch of identical systems. It appears that updates and anti-virus can be controlled by Group Policy, which is included in Win10-Pro and Enterprise. So as long as you are running Win10-Pro you should be able to go into the group policy editor and disable these. What is not clear is if what Microsoft considers a critical security update will override this. I am still investigating, but I believe just having a dedicated PC running Win Pro with proper group policy settings will get you where you want to be.
  2. AzeoTech

    Windows 10 iOT

    Win IoT Enterprise is identical to Win Enterprise with a few extra things so DAQFactory should run fine on it. We are actually investigating it as a recommended platform as many people are having issue with Win 10 and its overbearing Auto-Update. Win IoT Core however is really just WinCE rebranded so DAQFactory will not run on that.
  3. AzeoTech

    Logging problem BasicCounter.ctl with U12

    That is Excel time, which is decimal days since 1900. If you format the column as Date/Time it will show correctly. It is actually changing, it is just changing in like the 6th decimal place. Make sure you have the precision of your logging set time set to like 15.
  4. AzeoTech

    Logging problem BasicCounter.ctl with U12

    I'm not clear on what the problem is.
  5. AzeoTech

    Oscilloscope Like Trigger Function On Graph

    OK, first, the LabJack takes a minimum of 4ms to respond to a query, so any Timing value < 0.004 will do nothing but eventually cause Timing Lag errors as the hardware is limiting the speed of acquisition. That is why you get a max acquisition rate of about 250hz. 250 samples * 4 ms each = 1000 ms = 1 second Now the issue with streaming is that the LabJack sends DAQFactory the data in blocks, and DAQFactory only triggers the channel Event once per block of data. This is because DAQFactory script is not particularly fast, and would bog down the acquisition if you tried to run it at 10khz. So, the issue with your trigger is that when you do [0] you are only getting the most recent reading from the block of, say, 50 readings, and so are likely missing the trigger. Instead you have to aggregate functions to find the peaks, namely max() and then use gettime() on the result of max() to get the time of that max. You also need to keep track of how long it has been since the last block was received so you only do max() on the data in the most recent block. To do this, in general terms, you will need another variable, say "blockStart" which will hold the time the last block started. Initialize this to systime(). Then in the Event for Trg, capture all the data since then by subsetting in time: private newData = Trg[blockStart, Trg.time[0]] blockStart = Trg.Time[0] + 0.000001 Now you can process the entire block: private themax = max(newData) if (themax > 4) graphScaleFrom = getTime(themax) - 0.5 graphScaleTo = getTIme(theMax) endif This will trigger a little differently though, and cause a long peak to trigger on the end of the peak, not the beginning.
  6. AzeoTech

    Graphing Global Variable

    The improper # of parameters is probably because of mismatched ( ). I didn't check and the forum editor doesn't give me the nice highlighting the DAQFactory editor does. You only need it to ensure you get the right timestamp. You may not need it at all. Also note that you can use the smooth() function to achieve almost the same thing. So: smooth(flowdiff5,1801) when using: flowdiff5.addValue(Pond9_Flow[0] - PS_1_Flow_Outlet[0]) is the same as: flowdiff5.addValue(mean(Pond9_Flow[0,1800] - PS_1_Flow_Outlet[0,1800])) which is not quite the same as what you have, where you take the mean first, then the average. Also, separate comment: make sure the [ comes right after the channel name with no space. It works both ways, but DAQFactory optimizes better with it right after.
  7. AzeoTech

    Graphing Global Variable

    You can't plot something without history. That would just be a point. You have to create history. You can do that by using addvalue(): flowdiff.addValue(insertTime((Pond1_5_Flow[0]+Pond6_Flow[0]+Pond8_Flow[0]+Pond9_Flow[0]) - (PS_1_Flow_Outlet [0])),systime(),0) Note flowdiff will need to be declared global somewhere else. The insertTime() is just to enture that you get a fresh timestamp for each update. Call the above line in a loop somewhere at whatever rate the various flow readings update at. Note: if the 5 channels you are using in the expression are being updated at the same rate, you can either create a calculated V channel or simply use the expression straight up in the graph without all the [0]'s. Then you wouldn't need to update some global variable.
  8. AzeoTech

    Oscilloscope Like Trigger Function On Graph

    I'm not sure of everything you did. I've attached a sample showing it working with a test channel. The test channel has a conversion just to give it some noise. Note that your event trigger is wrong. The threshold values should be the same for both parts of the if(). Also, don't use var. notation. That is very, very old syntax. Instead declare your variables and initialize them in an auto-start sequence. triggeredScope.ctl
  9. AzeoTech

    Oscilloscope Like Trigger Function On Graph

    I'm not sure if there is a better way. It just depends on whether this works for you. I wouldn't stop/start streaming, but would instead just let it stream continuously. The technique you'd have to use would depend on how long you want a particular trace to remain on the page before it gets updated or goes away. If it only needs to display for a short period, say under a minute or two, then you can simply freeze the X axis scaling and adjust it every time the trigger occurs. To do this, simply set the X Axis Scaling to two global variables, let's say "GraphScaleFrom" and "GraphScaleTo". Make sure and uncheck "Use time width". Create these variables, along with a threshold variable in a start up sequence. Next, go into the Event for the input channel, and add script similar to this: if ((myChannel[0] > threshold) && (myChannel[1] < threshold)) graphScaleFrom = systime() - 1 graphScaleTo = systime() + 1 endif Note that the way I have it will actually put the threshold point in the center of the graph, with one second on each side. You can just adjust the math to put the threshold X point wherever you want. The problem with this technique is that the graph uses the Channel's History to draw and you have new data constantly coming in. So, eventually, you will run out of history and the graph will start to disappear. You can, of course, set the history quite large. So, if you are sampling at 100hz, you could set the history to 360000 and get an hours worth of data. Then a triggered trace would remain for up to an hour. If you need it to last longer than the history (because really you don't want histories bigger than maybe 1 million), then you need to use a different technique.
  10. AzeoTech


    There are a bunch of ways to do this. How best depends on what exactly you are trying to do. Do you want to count how long a signal is above a threshold? Or how long since the signal exceeded the threshold? Or...? Can you provide more detail?
  11. AzeoTech

    Oscilloscope Like Trigger Function On Graph

    That is actually something I have not been asked before, but is interesting. So you want it to freeze based on the left hand side of the graph and remained frozen until that signal comes around again?
  12. They will be all new controls. Old applications will still be able to run with the older controls so you won't have to start over.
  13. That's an interesting one and is definitely a bug. I know exactly what is happening. We are in process of actually replacing many of the controls, including the slider so the issue likely won't exist on the replacement. For now, the solution would be similar to what you used to have to do with graphs and capturing pages: you need to very quickly switch to any page with a slider that exhibits this behavior at startup before actually initializing the variable. I've modified your example to show this in action. SliderStart.ctl
  14. Yes, but it is not as easy as I would hope. You need to create a sequence called OnKeyDown and then add some script. For example, if you had a user/password popup: if (component.userNameEdit.GetFocus()) if (key == 9) component.userPasswordEdit.SetFocus() return endif if (key == 13) enteredName = component.userNameEdit.strContents enteredPass = component.UserPasswordEdit.strContents Login(EnteredName,EnteredPass) endif endif if (component.userPasswordEdit.GetFocus()) if (key == 9) component.UserNameEdit.SetFocus() return endif if (key == 13) enteredName = component.userNameEdit.strContents enteredPass = component.UserPasswordEdit.strContents Login(EnteredName,EnteredPass) endif endif Login() is just some function that performs the login. The key parts are the GetFocus() which returns if the specified component is focused, SetFocus() which sets a component to have focus, and the checks for "key" which is a parameter passed to OnKeyDown with the key code of the key pressed. 9 is tab, 13 is carriage return.
  15. AzeoTech

    Async Serial example

    1) for any serial (or ethernet) device you have to create a "device" in DAQFactory. A serial device in DAQFactory consists of a port (like COM1 or and a protocol like Modbus. In your case, the protocol will be "NULL Protocol" because you are going to script your own. To create this device, go to Quick -> Device Configuration in the main menu and select New Serial / Ethernet Device. Give the device a name that makes sense to you, then click on New Serial Port to create the port. Enter the comm parameters and give the port a name. Then select NULL Protocol and hit ok. Now you have a serial "device". For the script I'm going to assume you called it "myDevice" though I suggest something more descriptive 2) create 10 channels to hold your ten values. Each channel should be Device Type Test, A to D with a Timing of 0. The History should be big enough to hold however much data you want to trend. At 30 second update for a week, we are talking 720 data points a day = 5040, so I'd set the history to like 10000. The other parameters can be left at their defaults. For the script I'm going to assume you called the channels "chan0", "chan1", etc though again I suggest more descriptive 3) create a sequence to get the data. The script would look something like this: device.myDevice.purge() // clear out anything in the comm buffer private string sdatain private string datain while(1) try sdatain = device.myDevice.readUntil(13) datain = Parse(sdatain, -1, ",") if (numrows(datain) != 10) continue // didn't get a full row endif chan0.addValue(datain[0]) chan1.addValue(datain[1]) // ... etc for the 10 channels catch() ? strLastError // only keep this line during debugging otherwise you'll get a bunch of timeout errors endcatch delay(0.2) endwhile 4) run the sequence. If you still have that ? strLastError you'll likely get a timeout error in the Command/Alert every second. But it is good to have just in case you have a typo in the rest of the script. Once the script works reliably, comment out or delete the ? strLastError line. Data should now arrive in those channels which you can then plot or log or do whatever you want with.