AzeoTech

Administrators
  • Posts

    6,432
  • Joined

Posts posted by AzeoTech

  1. I'm not sure.  It works fine for me.  See attached (done in 19.1).  Note that the sample opens COM1 and attempts to communicate over Modbus.  Open in safe mode if you actually have something plugged into Com1.  Also, you can run "badsequence" which will also generate an alert.  OnAlert just prints "Alert" to the Command/Alert window and I see "Alert" appearing after every alert.

    onAlert.ctl

  2. "Units" is actually synonymous with "strUnits".  There was a time, before variable declaration, when you had to put "str" in front of your variable names to indicate a string.  So, at that time strUnits was created.  Once that was removed we added a "Units" name for the same variable.

    Font size on a variable value component is stored in XSizeMin.  Yes, this is a bit confusing and the upcoming release of DAQFactory eliminates this in the replacement control.

    Otherwise I don't have a great answer.  Most names match up with the caption used in the dialog box.  Again, in the next release we have replaced most of the controls (though existing controls still work on existing documents...) and there the properties window actually shows the variable name as is so this is much easier to track.  Please email us if you have any interest in trying the beta of the next release.  It is a significant release and we always welcome feedback before release (and after...)

  3. The variable value component has its own variable called "Units", so when you take your expression and put it into the Variable Value component, it pulls from the units variable of the component instead of the channel. 

    DAQFactory searches private variables first, then member variables of objects (and components are objects), then it goes to the global namespace for global variables, then after global variables are channels.  That said, it is just better to not have conflicting symbol names.

     

  4. I do not believe there is a way to do this in the current release of DAQFactory.  I've added to the request list for the next release, and it should be a very quick add so likely can be done before that release.  The next release also has some features that allow for more browser like popups where the popup is actually just another Page layered on top of a white page with partial opacity over top of the original page(s).  This allows for some pretty slick looking popups as you don't have to make them rectangular.

    Please email us direct if you have any interest in trying a beta of the next release.

  5. Yes, you did it correctly, though I am not sure the number is big enough.  Try 5000 decimal just to see if it helps.  But also it appears your issue is that the entire DAQFactory window won't expand, not that the screen doesn't draw.  I have only rarely seen this.  I have a 49" wide monitor, and previous had a 4k 43" and didn't have issues.  A couple other things to try: 

    1) make that monitor the primary monitor

    2) go into the properties for DAQFactory.exe and try a couple compatibility modes.  Specifically, try going to "Change Hight DPI settings" and set the High DPI override to System Enhanced.  But it might be something else there. 

  6. DAQFactory uses a rather old technique called double buffering to create flicker free animations.  To do this, it has to create a copy of the screen memory.  It then draws on that copy, then copies that entire block over to the video memory.  To do this, it has to allocate memory for that background buffer.  By default, it will use the screen resolution of the primary monitor of the system to create the memory without over doing it.  However, this creates problems, such as you are seeing, when the primary monitor has a lower resolution than a secondary monitor.  Then, the buffer is too small for that second monitor and you will see the pages clipped at whatever the resolution of the primary monitor is.  (it is actually square, as a 1280x1024 monitor would create a 1280x1280 buffer).

    Fortunately there is a way to override this.  If you create a DWORD registry variable named "ScreenRes" at this path:

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\DAQFactory\Control

    and set this to the desired size, which should be the largest resolution number, it will use this value instead of the primary monitor resolution to create this buffer.  So, if your primary screen is 1280x1024, and your secondary monitor is 1920x1280, then you would want to set the ScreenRes registry variable to 1920 (decimal).

    Note that on 32 bit machines you would not have WOW6432NODE and the path would be:

    HKEY_LOCAL_MACHINE\SOFTWARE\DAQFactory\Control

  7. I can't say.  Your syntax looks fine.  HTTP.Get() calls a Windows API function and the error message you are seeing is coming directly from that function.  I am thinking maybe there is some sort of firewall setting that is making it not work?  You could try just creating an Ethernet Client connection and see if you can get a response.  Usually, once you have connected to the IP address and port, all you need to send is:

    GET /optimize HTTP/1.1\013\010\013\010

    where \013\010 is carriage return / line feed and what you would type in the Monitor Window.

    If you get "Port is busy" then DAQFactory couldn't open a socket to the server and I would say you definitely have some sort of security setting that is allowing the browser to access it, but not DAQFactory.

     

  8. So you want to do, basically, a jog? So a value is, say, incremented 10 times a second while the button is held down?  You probably don't want OnLButtonDown/Up unless you are talking about the event associated with the component.  The trick is that the events need to start and stop a sequence.  So, OnLButtonDown would just have something like:

    beginseq(incrementMyVar)

    and OnLButtonUp would have

    endseq(incrementMyVar)

    Then the sequence "incrementMyVar" would be something like:

    while(1)
       myVar++
       delay(0.1)
    endwhile

     

  9. DAQFactory does not support callbacks through the extern() function.  The only way to do it is to create a wrapper DLL that handles the callback, then create some normal functions that retrieve the data from the callback.  It would be much easier to simply use ODBC and DAQFactory's database capabilities.

  10. Did you say that it wouldn't print dataArray even before this line:   eGet(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_READ, numReadBytes, @dataArray).  I.e. you have:

    ? dataArray
    eGet(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_READ, numReadBytes, @dataArray)

    and you don't see {0,0,0,0,0,0}?

    I would just rename that variable to something else, like MyDataArray.  Also use fill() to initialize it:

    private MyDataArray
    MyDataArray = fill(0,6)
    ? myDataArray
    eGet(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_READ, numReadBytes, @myDataArray)
    ? myDataArray

     

  11. That part I can't say, so I'm going to loop LabJack support in.  The DAQFactory LabJack driver just wraps the normal LabJack driver, so the behavior is determined by their driver.

  12. The ? was never going to fix the error.  I am assuming you did ? dataArray before the tempx= line?  If it is printing nothing, I would put another ? dataarray before the call to the LabJack, and maybe change the second one to isEmpty(dataarray), so:

    ? dataArray
    eGet(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_READ, numReadBytes, @dataArray)
    ErrorHandler(ID)
    ? isEmpty(dataArray)

    You'll probably get:

    {0,0,0,0,0,0}
    1

     

     

  13. From a pure scripting point of view, the code looks ok.  TempX is declared private, and initialized.  I would either break, or add a ? line before the tempx = line to see what dataArray contains, so perhaps:

    ? dataArray

    right after the errorhandler(ID) line.

  14. You would have to find a device that offers an API of some sort to allow DAQFactory to communicate with it.  Or get a CAN to serial or CAN to ethernet device (if they exist).  We created a DeviceNet device (which is CIP over CAN) using a Netburner CB34.  This is a programmable microcontroller with a CAN port, serial and ethernet.  It would not take much to program that as a basic CAN to serial or Ethernet converter.  For our DeviceNet device, it did CAN (really deviceNET) to Web Service over ethernet which worked well for the application.

  15. Makes sense.  You can, of course use 5.87, but for newer releases there is the system.HideSystemMenu() function which will hide the buttons on the windows title bar including the close button.  (use system.showSystemMenu() to bring it back).  They could still close the app from the task bar, but that is not as obvious.  To fully prevent shutdown you would have to run Windows as a kiosk.

  16. Acquire mode was removed from DAQFactory a long time a go.  It is available in 5.87a which is still available on our website on the downloads page.  I do not know if it exists in 5.91, but it definitely was removed by 16.1.  What is your reason for needing it?

     

  17. You might need to update the hardware key driver.  The hardware keys come from Marx.com.  Unfortunately, I can't give a direct link as it will get stale since they include the version number in the link.  Here is how you get the file from their site:

    Go to marx.com, then click on Support -> Downloads to get to their downloads page.

    Click "Driver and Diagnostic Tools", or simply scroll down to that section

    Download the (currently) second file, "CBUSetup" and run it on your system.  You do not want the MSM version as that is for integration into installers.

    You may need to reboot after installation.

  18. First, it should be noted that you cannot access a LabJack from two different programs at the same time.  If you start one program, then start a second, then quit the first, it is unlikely the second program will then start working without a restart.

    Note that the above applies to USB connections.  I don't know what the limitations are over Ethernet, especially over Modbus Ethernet, but I know you aren't using Modbus since you are streaming.

    LabJack may have more input.

  19. I modified your document to use ID #1, and used a variable "ljID" in all your code.  On my system at least it worked, but only once I commented out all the LJTicDAC code because I don't have a TicDAC installed.  It is probable that this is your issue as well; that your stream script is just fine, but your TicDAC script is incorrect and causing stream not to work.  Once I call the TicDAC code, my LabJack essentially crashes and I have to cycle power on the device.

    Anyhow, go into LJControlPanel and set the ID of your LabJack to 1.  Quit LJControlPanel and start DAQFactory and load the attached document.  Start the "StartStream" sequence.  It will run and immediately stop.  Click on "force" in the workspace under channels, then go to the Table tab.  You should see data streaming in.  The Orange Comm light on the LabJack unit itself will also be solid (at least it is on my UE9).  You can stop the stream by running "StopStream".

    This is a good debugging lesson: always simplify your application as much as possible when it doesn't work.  I wasn't sure what was going on with your app, so I removed (commented out) all the code that wasn't directly related to streaming.  Now that it works, I could start adding back code for additional features until it breaks, then I will know the cause.

    SHOCKDYNO (4).ctl