AzeoTech

Administrators
  • Content Count

    5,935
  • Joined

  • Last visited

Everything posted by AzeoTech

  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

    Timer

    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 10.0.0.1) 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.
  16. A couple possible workarounds: 1) put it in a group with another control and then make the group invisible 2) move the component programmatically offscreen to make it invisible, then back onscreen to make it visible. I prefer the 1st solution, especially if you are making other controls invisible at the same time.
  17. You probably need to set focus to another control. So, pick another control and do: component.myComponent.SetFocus() that should pull focus away from the combo/radio.
  18. A couple issues: 1) you would have to have an image that is a set distance from the camera, and then calibrate it. DAQFactory can only really figure out the distance in pixels, and you'd have to convert that to actual distance based on the actual image. 2) if you are using the browser control for your image, you aren't going to be able to get any mouse information if the mouse is over the control because the browser captures it all. #1 is pretty easy to solve. Just put a tape measure in the image at the same distance from the camera and calibrate. #2 requires some creative workaround. I would consider using vertical or horizontal lines that go under the image and then use the keyboard to tweak them. Then you can easily calculate the distance using the coordinates of those lines.
  19. Two ways: if you always want the input from one to go to a second channel, just use the event of the first channel. So say you have ChannelA and ChannelB. In the event for ChannelA put: ChannelB = ChannelA[0] Then every time you change channelA, it will also change channelB. Just DO NOT also put the event in ChannelB! Otherwise you will get a loop and hang DAQFactory! The other way would be to use script to ask for the value. The general template (with added duplication) would be: private string data = system.entryDialog("Enter a new Value:") if (!isempty(data)) channelA = strToDouble(data) channelB = strToDouble(data) endif
  20. AzeoTech

    Save As older version CTL

    No, there is not. I typically just try opening it in the oldest version I have and work my way forward, though typically I force people to be either on 5.87 or on 18.1. 5.87 is the last build under the old compiler. Upgrading from 5.87 to newer versions should be done with a fair bit of testing and I don't recommend it unless new features are needed. It is an "if it ain't broke..." sort of thing. Once you upgrade to 5.9 that changes and really one running 5.9 should be upgrading to the latest, and should be able to do so with much less testing. I will sometimes let people linger in the 5.9's as there is a graphical ordering change in subsequent releases that can mess up some pages, but in general, once you get to 5.9 there is not much of a reason not to upgrade to the latest.
  21. Sure. Each logging set has a variable named "Running" which is either 0 (not running) or 1 (running). You can access it as: logging.myLog.running where myLog is the name of your logging set.
  22. AzeoTech

    Save As older version CTL

    Well almost. You should install 5.87 first if you are going back that far, then install in order after that. Newer releases will overwrite ancillary files, which is no problem, and add their own, but they might not include required files from previous versions. By installing them in order from oldest to newest you are sure to have everything. Just rename DAQFactory.exe between installing and you should be set.
  23. AzeoTech

    Save As older version CTL

    We have the same issue and simply keep multiple copies of DAQFactory installed. It is actually quite easy. Only the DAQFactory.exe file really needs to match, so I maintain a DAQFactory587.exe, DAQFactory161.exe, etc. all in the same c:\daqfactory folder.
  24. OK, that is because you are using readuntil(13) and there is both a carriage return (13) and a line feed (10) in your data stream. So, after DAQFactory reads the first line, up to the 13, the next time you call readuntil(13) it reads the 10, then the ASCII values. So your test2 channel doesn't hold "Temp", but rather a line feed + "Temp". But you can't see the line feed, so you don't realize it. When you go to compare that channel to just "Temp" it is always false. So, it is in general best to always read until the very end of the line, i.e. do readuntil(10) instead of readuntil(13). That way you have a 13 at the end of the data instead of 10 at the beginning. You can then parse off that 13 before putting it in the channel with just: datain = left(datain, getlength(datain) - 1) Alternatively, of course, you could use mid() to trim off the 10 at the beginning of the line, but I prefer to have extraneous stuff at the end of the line instead of the beginning, for various reasons.
  25. You might try using the system.fullscreen variable to put it into full screen in script. It also might help if you hide some of the toolbars first.