RBlabs

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About RBlabs

  • Rank
    Newbie
  1. Thank you. That approach does the trick.
  2. Thanks. Works. So easy! One more question please. The try/catch code does not seem pick up the error C1013 that I get when the file I am writing to is already open, in Excel, for example. What file function is available to test the file beforehand?
  3. Hi Guru, When I run RB_Export by right clicking this export set in the Workspace and selecting "begin export set" it works just fine. But when I try to do the same thing in the sequence below it produces a .csv file with no data, just a header. Please what am I doing wrong? if (component.EditBox_Export_FileName.strContents == "") system.MessageBox("Pleae enter a FileName to Export to in the box just above. You may use the <DIR> button to select the last saved filename, then press <+Copy> to use that name incremented by one. ") else if (system.MessageBox("Export Graph data set to .csv file? Note: To export a subset of data points select the starting point with MarkerA [and optionally the ending point with MarkerB]." ,"OKCancel") == "OK") Export.RB_Export.strFileName = strExportPath + strExportFileName Try Export.RB_Export.Start() Export.RB_Export.Stop() Catch() System.ErrorMessage(strLastError) ?StrLastError endcatch strExportLastFileName = StrExportFileName component.EditBox_Export_Last_FileName.strContents = strExportFileName StrExportFileName = "" component.EditBox_Export_FileName.strContents = "" endif endif
  4. RBlabs

    Labjack T7 Shared Registers

    Thank you for your input, which by the way is spot on. Both of your suggestions are correct and my script is working fine. I am new to forums as well, and impatient, so though I figured this out myself soon after posting my questions I neglected to go back to the forum to see your response. I do appreciate your help and will try to do better in the future.
  5. New to LabJack, Azeotech and Lua, I have just written a Lua script to average N pulse-width measurements taken every ms; each time N (typ 1000) is reached it calculates the average and updates a register in Lua IO Memory for DaqFactory to read and plot. I also want to be able to update N in Lua IO Memory with a DaqFactory Variable Value Component: Set To action from the Graph page. My Lua script works but I do not yet know how to go about accessing these shared registers from DaqFactory.