All Activity

This stream auto-updates     

  1. Yesterday
  2. CH2014

    Graph Trend Line between 2 points changing

    OK, thanks for the reply.
  3. Last week
  4. The modbus write function is documented here: https://labjack.com/support/datasheets/t-series/scripting/labjack-library I don't spot anything wrong in your calls to set FIO0 to output-high and output-low. Check out the Lua example "Toggle DIO 1Hz". We can continue troubleshooting that, but my approach might be a little different. How about using USER_RAM0_U16 and having the Lua script increment it when desired. Then DAQFactory can read that register and note if it has changed from the previous value. That way you never miss a trigger. https://labjack.com/support/datasheets/t-series/lua-scripting
  5. AzeoTech

    Modbus write multiple registers

    You can definitely do it through script. Just pass an array for data points. So for example: device.mydevice.setRegisterS32(1, 100, {1,2,3}) which would set register 100/101 to 1, 102/103 to 2, and 104/105 to 3 (register pairs because of the S32 of course). Note that it is "Set" not "Write", and is "Register" not "Holding" because Input Registers can't be set, so there is no reason to differentiate on the output side. Note that with channels, DAQFactory will automatically combine reads of the same type into a minimum number of calls if they are consecutive and the same data type. It will not fill in blanks, though, so sometimes its best to create dummy channels. That said, on the output side you cannot do multiple outputs with one query through channels because there is no way to set multiple channels simultaneously.
  6. I'm going to let LabJack give you a more specific response, but in general you'd want to set some flag, possibly a digital output, or some virtual I/O point that is accessible through the LabJack driver. Create a channel for that point, and then use the Event of the channel to look for a particular state and trigger your sequence.
  7. AzeoTech

    Graph Trend Line between 2 points changing

    It is because of the way DAQFactory optimizes the graph data on large data sets. It does a boxcar min/max and as new data comes in the boxcar locations change causing those mins/maxs to change slightly, especially at edges like when no data is coming in. This can make the connecting line jump around. Normally you can't see it because its only one pixel.
  8. I've noticed that if DF has been switched OFF for a few days. The trend line between the data points that DF was switched OFF keeps changing every few seconds. See the attached images (period: day 17th and day 18th). The graph is a 7-day graph. It's not a major problem as DF will normally be ON all the time. I was just looking for any suggestions on how to stop this.
  9. Hi there! I'm using a Lua script to control the output of my LabJack T7 to set DAC0 to 5V and DAC1 to 5V using: MB.W(1002, 3, 5) -- this turns the LED light off by turning the DAC1 to 5V MB.W(1000, 3, 5) -- TURN DAC0 to 5 V which is used as a reference for the BuckPuck Reference channel This works just fine. Now what I want to do is to send a trigger from Kipling to DAQFactory to tell it to start recording data. What is the best way to send a trigger signal from Kipling (Lua script) to DAQFactory sequence script? The approach I'm attempting is to set FIO0 channel to 1 using: MB.W(2000, 0, 1) -- set FIO0 to 1 to trigger DAQFactory to run its save script -- do other stuff here MB.W(2000, 0, 0) -- set FIO0 to back to 0 to after the trigger happens but, it isn't working. When I read channel FIO0 in DAQFactory using: // Set scans/second. private scanRate = 2000 // Set scans/read. This is how many scans are retrieved per call to the stream read // function, and thus controls the iteration rate of the loop below. private scansPerRead = scanRate / 2000 // Start the stream with a scan list of AIN0, AIN1, etc. These are streamable Names from the LabJack Modbus Map, not DF Channel names. LJM_eStreamStart(identifier, {"AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5", "AIN6", "AIN7", "FIO0"}, scanRate, scansPerRead, 1) dataIn = LJM_eStreamRead(identifier) FIOvalue = dataIn.data.FIO0 FIOvalue just stays 1. Even if I try to set it back to 0 in Lua with MB.W(2000, 0, 0) it just stays 1 when I read it in DAQFactory. Perhaps I'm not using the MB.W function properly? I have searched for the documentation for the mbWrite function to know what each of the 3 parameters are, but haven't found the documentation yet. Or perhaps there is a better way to communicate from Kipling Lua script to DAQFactory sequence to trigger events? Thank you! B
  10. Hi, is it possible to write to multiple holding registers at once, kind of in the same way you can read from multiple registers at the same time? for example, device.mydevice.readHolding32(Station, starting address, datapoints) where datapoints decides how many registers you read from. Is it possible to achieve a similar thing with the write function, such as passing an array containing all values to be added to each register? Currently I am having to write "device.mydevice.writeholding32(station, starting address, data) multiple times. Cheers, Ben
  11. Earlier
  12. To talk to an EI-1050 through a U3 requires special function calls as described in "UD Library Communication" here: https://labjack.com/support/datasheets/accessories/ei-1050 Have you tried "EI1050 U3.ctl"? https://labjack.com/support/software/examples/ud/daqfactory
  13. Not real sure what happened there...I have attempted to attach it as a .pdf IMG_2391.pdf
  14. AzeoTech

    if statement not working

    Yes, it may be a threading issue. You should debug it either by adding a breakpoint or by adding ? statements. Also, see if it does it if you stop all the other sequences / events.
  15. Sorry, that image you posted isn't a real image. It needs to be in a standard format.
  16. AzeoTech

    Print Export Function Crashing in Windows 7

    Yes, that is the bug mentioned in the post. You can't use the right-click graph capture feature in newer OS's. You'll have to use an alternative such as the printPDF function.
  17. orlee

    Print Export Function Crashing in Windows 7

    Forgot to mention: Windows 7 pro, 32 bits
  18. orlee

    Print Export Function Crashing in Windows 7

    Hi, I just noted to have the application wipe out (crash and close) on a client PC at the moment we press the "Browse" file select button. Can you suggest a fix? Thanks
  19. Let me start by saying, I am a relatively new user and need it "dumbed down." I am having issues with getting DAQ Factory to work with an EI-1050 and U3HV. The hardware works with the "Demo Software" that is downloadable from LabJack, but I cannot seem to get it to function (and read) with DAQ Factory(which is why I purchased it). I have searched the forums, have tried everthing I have found, but still not working...I've included a photo of the wiring. Also, not included in the photo is the analog connections on AIN0-AIN3, which are used for meter validations. I would like to have the capability to log temp and pressure along with my analog inputs...
  20. AzeoTech

    sms message

    Yes, that is the right direction, but you almost certainly will need either a carriage return or a carriage return / line feed afterwards. I typically like to do it with a variable, or you can just add the chr() commands to the end. private string CRLF = chr(13) + chr(10) device.gsmmodem.write("+CMGS" + crlf) ...
  21. CH2014

    sms message

    Further to my last post. I haven't actually got any hardware to try it out on yet but is the following command going in the right direction? device.gsmmodem.write("+CMGS")
  22. CH2014

    sms message

    Hi, Further to the above I can see that your suggestion of using email to send SMS is far easier. However, if the site engineers mobile service provider does not provide this facility is there an example of DF script that contains typical GSM AT commands? I assume I need the DAQFactory Serial - Ethernet communications guide. This does not seem to be in the installation folder?
  23. alanmanson

    if statement not working

    I closed DAQFactory and reopened it. All my channel names start with Chn, so I have no variables with the same name. My sequence code is below: "ChnSystemEstop" is a channel that gets set or cleared when an emergency estop button is pressed on the system. The estop button is physically connected to a controller board that communicates with DAFactory over a serial connection. The controller board is polled for messages, which then sends a reply. systemEStopSignalled is a global variable which is used to stop the clear estop sequence being called unless an estop has been sent already. SystemEstopCmd is a sequence which sends an emergency stop request message to all parts of the system. SystemEstopClearCmd is a sequence which sends an emergency stop cleared message to all parts of the system. The four channels: ChnCell1Status[0], ChnCell2Status[0], ChnCell3Status[0], ChnFinalInspectionStationStatus contain the status value of the 4 parts of the system, the value 9 on the cells indicates that that particular cell is estopped, and the value 8 on the final inspection station indicates an estop, so we cannot send the estop message. I had all 4 of these channels in the watch window, so that I could see their latest value. ChnCell3Status[0] was at the value 9, yet it still went into the body of the if statement, which clearly asks for not equal to 9. This did not happen all the time but it did happen a lot at random. Hope that makes sense Could it be that I was writing a channel in another sequence while I was reading it here? Thanks //************************************************ while(1) if (ChnSystemEstop[0] > 0) if (systemEStopSignalled == 0) systemEStopSignalled = 1 beginseq(SystemEstopCmd) while(Sequence.SystemEstopCmd.Running) endwhile endif else // Try hardcoded numbers as we keep getting through if (systemEstopSignalled == 1) if ((ChnCell1Status[0] != 9) && \ (ChnCell2Status[0] != 9) && \ (ChnCell3Status[0] != 9) && \ (ChnFinalInspectionStationStatus[0] != 8)) systemEStopSignalled = 0 beginseq(SystemEstopClearCmd) while(sequence.SystemEstopClearCmd.Running) endwhile endif endif endif delay(0.01) endwhile return (NULL) //************************************************
  24. AzeoTech

    if statement not working

    There isn't a cache, but if you edit a sequence that is running, you have to stop the sequence and restart it to pick up the changes. If that isn't it, I'd have to see the rest of the code to know what is happening. You might have a symbol name conflict (i.e. a private or global variable with the same name as one of your channels.)
  25. I have an if statement in a sequence, here is an example if ((channel1[0] != 9) && (Channel2[0] != 9)) DoSomething() endif I have at least one of the channels set to 9 and it is still getting to DoSomething(). What am I missing? Is there some compiled cache somewhere that needs to be cleared and recompiled?
  26. OK, this is the line that checks the condition: if ((Pressure[0] > 80) && (Pressure[1] <= 80)) To check for it to be over 80 for over 10 minutes you'd do instead: if ((Pressure[systime(), systime() - 600] > 80)) The problem is not sending emails over and over again so you'd have to add some logic to prevent that. It could be to repeated send every so often if the alarm state is maintained, or to only set if reset. This is actually what the Alarming feature of DAQFactory makes easy.
  27. Hi, I have a very similar case as described in the labjack support section 7.2 (https://labjack.com/support/ud/df-lj-app-guide/7.2) for sending a warning email when the pressure is higher than a certain value. The only edit I need in the example code is that I want DaqFactory to send me an email when the pressure reading is above 80 for more than 10 minutes. Thank you!!!
  28. AzeoTech

    DAQFactory communicating with other HMI's

    That would largely depend on the HMI. That particular one has 3 serial ports, so if one wasn't in use you could connect that to the PC and communicate with DAQFactory over that connection. But that is just the hardware layer. The real question is what protocol does the HMI speak? I couldn't find it on their website. If it talks Modbus, you could setup DAQFactory as a Modbus master or Modbus slave (depending on which license of DAQFactory you have) and transfer that way. That would be easiest, especially if the HMI can act as a Modbus Slave and DAQFactory can be the Modbus master.
  1. Load more activity