• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral


About AzeoTech

  • Rank

Recent Profile Visitors

51,437 profile views
  1. The simplest way to log data is to use a logging set, but it will log all data, so you would have to set the Timing of your channels to 30 minutes (1800). If you would like to acquire data faster than every 30 minutes but only log every 30 minutes, you should probably try an Export set. Use [0] after each of the channels listed in the Export set, then trigger the export every 30 minutes using a sequence: while(1) delay(1800) beginexport(myExport) endwhile
  2. AzeoTech

    Completely stopping history.

    Your best bet is to capture the desired values and either put them in a different channel, or more likely into a variable. That way you have control over when it updates and can avoid the overwriting the history of the input channel issue you are seeing. How to do this depends a little on how you want to capture the data. You say every 3 hours, do you want the average of 3 hours data, or just a snapshot of the data? Is this an experiment or batch that runs for 12 hours that you want to start with a button press for example?
  3. AzeoTech

    Cannot access hardware key

    They all have a light, it is just a tiny light inside a hole on one side of the key.
  4. AzeoTech

    Pid And Pwm To Control Temperature

    It is supposed to do that because it is designed to pulse to give a partial output. If you just want it on or off then you really don't want PID, you just want to create a thermostat type control which is much simpler. Then the code is something like (assuming heating): global sp = 50 while(1) if (myvariable[0] < sp) output = 1 // turn on heater endif if (myvariable[0] > sp * 1.05) output = 0 // turn off heater endif delay(1) endwhile Note the * 1.05 is hysteresis, and keeps it from turning on and off rapidly when around the SP.
  5. The easiest way is to simply fire up two copies of DAQFactory on the same machine at the same time, probably with at least one in Safe mode. Then go to the desired page and do Edit - Select All, the Copy, then go to the other copy and do Paste.
  6. AzeoTech

    DAC Output with PID control

    I would first make sure you can manually control the SSR. Once you do that, then work in the PID. I'd need more detail on your hardware to address the first part. As to using a PID to control a digital, you need to actually have the PID output to a variable, then create a sequence to pulse the SSR based on the PID output, where, typically, -100 is all off, and 100 is all on. 0 would be 50% on, 50% off. You can determine the cycle time based on your process.
  7. AzeoTech

    Array Basics?

    Everything is done with [] bracket notation, so, for example to access element 3,62 you would do channels[3][62]. The array is created dynamically as you reference it. So to create a 4x72 array, you would just give element 3,71 a value and DAQFactory will fill in the rest with 0 or blanks: channels[3][71] = "abc". Note that indexing is all from 0, so [0][0] is the first element. This is all described in 4.5 and 4.6 of the user's guide.
  8. AzeoTech

    Cannot access hardware key

    Does the light on the hardware key illuminate when you plug it in? Is the key recognized by Windows? You may need to get the latest driver for the key. It is manufactured by and the driver can be downloaded here: Click on Downloads then select CBUSetup.
  9. AzeoTech

    Long serial string comma separated

    You can use the parse() function to split that into an array of items. Pass -1 for index to split the entire string: global string mydata = parse(myInput, -1, ",")
  10. AzeoTech

    Alarm on comm timeout/cable unplug

    Maybe. I can't say for sure. It wasn't really designed for that and the mechanism for getting data to the slave is different than other protocols.
  11. AzeoTech

    Generate Alarms From Script

    No. I think that the assumption was made that if you are doing something advanced enough to need dynamically created alarms that you probably have spun your own alarm code.
  12. AzeoTech

    Display UTC Time

    You would have to have the user specify their timezone offset and then apply that to the display using simple math. So, if their offset is +8, you'd just adjust your time stamps by 8*3600. Technically you probably could retrieve the local timezone setting from the OS using either shellExecute() or better, use extern() to load in the windows DLL that handles time. These, however, are a bit more complicated to achieve and would require some research into the workings of Windows. For example, I found that you can do this to get the time zone from the command prompt: systeminfo | findstr /C:”Time Zone” which you might then be able to pipe to a local file that you could then read into DAQFactory using the file. functions. It would take a little experimentation but should be workable.
  13. AzeoTech

    convert variable value using user entered data

    Yes, you can just put them on top of each other. There is no built in way to make them visible. You can, of course, just create a global variable called, say "showAllComponents" and then change your visible expressions to: (ohms == 1) || showAllComponents and (ohms != 1) || showAllComponents Then set showAllComponents to 0 for normal operation, and 1 to show everything.
  14. AzeoTech

    Alarm on comm timeout/cable unplug

    No, DAQFactory doesn't generally support pointers except in some situations (like by reference storage of objects). However, you can use the execute() and evaluate() commands to do what you want. So, you store the name of the device in a local string variable, then instead of calling directly, you use execute() to call: execute("device." + myDeviceName + ".ReadHoldingS16(...") I'll typically wrap this up to include error handling and debugging (if needed). That all said, there is a way to dynamically create comm devices as objects. There are three: CCommEthernet CCommSerial CCommDevice So: myPort = new(CCommEthernet) would create a new Ethernet port which you can then configure with the usual members (Address, Port, InitComm(), etc) likewise with CCommSerial. Then you can create a device (or use an existing): myDevice = new(CCommDevice) then assign the port and protocol. The protocol you have to do by name using a string, but there is a separate member variable called PortObject of a device which takes a port object, CCommEthernet or CCommDevice. So: myDevice.PortObject = myPort myDevice.ProtocolName = "ModbusRTU" Of course DAQFactory handles all the garbage collection and will close the ports when they go out of scope. Note that PortObject is a by reference variable just like any other object, so if you ran the above code and then let myPort go out of scope or assigned it to something else, myDevice would still retain that original port object. You would then need to update portObject with a new port to have that one go away.
  15. AzeoTech

    PicoScope SDK

    My only recommendation would be to create PSBufferCHA_raw once at startup and then don't mess with it at all. DAQFactory will destroy the memory automatically when it quits and you have no real reason to free that memory during execution. It is not a big block and freeing it runs the risk of an errant pointer. In your case, you forgot to tell the Pico to stop using the memory before you called free() which is exactly my concern.