Recommended Posts

Hello

I have a U3-HV. After working on redoing my sensors, the streaming will not work. I haven’t changed anything in my sequence. When calling startStream, it comes on for about 3 seconds and stops on its own. There is no stop stream in the sequence, so it should keep running. 
   I tried the example in guide with a 2d graph and buttons and nothing. 
   If I change timing to anything but 0, I get data, but not when I try to stream. I don’t know if it’s a DAQFactory problem or a Labjack problem. I can see values change in LJControl Panel so it seems to be in DAQ. 
  I will say that I had an accidental short from power to ground through my load cell shield wire to the frame of my shock dyno. It didn’t blow any fuses and the sensor was not hooked up, but don’t know if it sent a charge into Labjack through the ground connection. 
   As I said, it works with any timing but 0 for stream. 
  Is it possible that it corrupted the programming of either DAQ or Labjack?

 I reloaded Labjack firmware but still doesn’t work  

 

Link to comment
Share on other sites

Even without seeing my .cal document, I can’t even get it to stream by following the example in the manual. It’s definitely in the software. After talking with Labjack, I can stream in LJStreamUD. I’m going to try reloading the software and see. 

Link to comment
Share on other sites

OK:

1) avoid using ID 0.  It means "first found" and can have unpredictable results if you have more than one LabJack installed.  We use it in our sample because we don't know what ID you have

2) did you try the BasicStream.ctl sample in the LJGuideSamples folder of your DAQFactory installation?

3) Do you get any errors from the include() line?  It would be in the command/alert window.  The default (and what is displayed in the help) of c:\program files\ is for 32 bit operating systems.  If you have a 64 bit operating system, which is much more common now, you likely need to change it to: c:\program files (x86)\

4) I would add the ePut(0, LJ_ioPIN_CONFIGURATION_RESET, 0, 0, 0) command in there at startup to ensure the device is at default configuration

5) I would comment out th extra channels (lines 15-17).  Better yet, I'd first see if you can get just one channel to stream and get rid of most of the stuff in your startup sequence that has nothing to do with streaming.  When debugging, always make the system as simple as possible, then add complexity once you get things working.

6) I would also add the ErrorHandler() function as done in the BasicStream sample so you can be sure the device isn't reporting any errors.  Also display the scanrate variable on your page.  

Use script commenting to temporarily remove code.  Just put // at the left side of any line you want to comment out.  Then it is easy to add back in.

 

Link to comment
Share on other sites

Right, but as I mentioned, that sample is for 32 bit operating systems.  For some reason Windows decided when they released 64 bit OSs to split Program Files into two: c:\program files for 64 bit apps, and c:\program files (x86) for 32 bit apps.  The LabJack software is 32 bit, so on 64 bit systems it ends up in a different folder than on 32 bit systems.  The sample is for 32 bit systems, so if you are on a 64 bit system, which is much more likely nowadays, it likely got installed in c:\program files (x86) and thus your include() statement in the DAQFactory script is incorrect.  I would expect you would see an error about this in the command/alert window as well.

Link to comment
Share on other sites

  • 1 month later...

Hello

Still having trouble streaming in DAQFactory. Everything works fine in LJSTREAMUD and works with the example given in LabJack for DAQ manual, but not with my .CTL. Would you look and see if I'm doing something wrong in my sequence. I use the startup sequence and then I tried my startstream sequence but my channel table is not getting populated.

 

SHOCKDYNO.ctl

Link to comment
Share on other sites

If both LJStreamUD and our basic DAQFactory example are working as expected, then we can reasonably assume that the issue is something with the configuration of your program. As a starting point, there are a couple of things AzeoTech previously mentioned that we would strongly recommend changing.

It looks like your LabJack header import does not handle the situation when using a 32-bit OS. We would recommend using the import used in our examples, like the following:

using("device.labjack.")
try
   include("c:\program files (x86)\labjack\drivers\labjackud.h")
catch()
   include("c:\program files\labjack\drivers\labjackud.h")
endcatch

 

We would recommend not using 0 for the device ID, and instead defining and using a global ID as described in the following user's guide setup:

https://labjack.com/pages/support?doc=/software-driver/3rd-party-applications/2-installing-and-starting-applies-to-ud-series/#section-header-two-u1fu

 

Something else I noticed in your program is that you reconfigure the stream scan rate in multiple places. I would recommend making changes to ensure that you are only doing stream configuration in one sequence.

 

Are you seeing any errors? Troubleshooting errors could be one way to go. You might also consider starting a new project and slowly build everything back out. Get things working with stream, then add additional functionality back in.

Link to comment
Share on other sites

This is very frustrating. I created a test ctl as per manual and it will stream fine. I open my other ctl and nothing. I close that and go back to my test ctl and it doesn’t work. I’ve included the try catch provision, even though I have no Labjack driver folder in the 64 but file. 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

So I already changed my script to ID=1. I went on as you said and first thing I get is an error in startup line 2. You had d: drive. I changed to my C drive. Nothing shows in my table and the light stays green. 
I uninstalled and reinstalled Labjack and still nothing. 
I started with a new project and followed the example in the Labjack for DAQFactory and I get data streaming in. I’ll progress forward, one step at a time and see where the problem lies. 
 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hello, 

So after some testing, I believe my problem may be with the Ljtick-DAC. If I do the basic sample then I can stream okay. After this I close out DAQ and open the LJTicDAC utility and set Davao to 2 and dacb to 0 and my vfd will turn on. While running I load DAQ back and no streaming. 
    After shutting down the utility, I have to close out everything and reboot my computer to get it to stream again. 
    Is it possible that the LJTicDAC got messed up from shorting a wire out? It still puts out voltage to run vfd but kills the streaming. 
    Also, could you pass this on to Labjack if need be for there input?

Thanks

Jim M
 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Ethernet devices such as the T4 and T7 support two TCP connections. Since you are using the U3, only USB is available and you cannot use the U3 in both the TDAC utility and DAQFactory at the same time. Closing the TDAC utility should automatically release the U3 connection to be claimed in other software, but you still may need to restart DAQFactory for everything to work as you expect. You might be erring out and skipping necessary setup otherwise. For example, you might skip execution of your startup sequence.

Note that the LJTick-DAC update rate may be limited while stream is running. Stream should run at the highest priority interrupt context on the U3 microcontroller; it could interrupt normal TDAC command execution, causing TDAC commands to take longer to complete. The TDAC is controlled using I2C and the U3 I2C interface has a fairly slow maximum clock speed (150 kHz) before even considering the effects of processor loading from stream mode. We do not have any great ways to quantify the stream/TDAC performance impact broadly, so it is just something to be aware of.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.