Error 6043 occured at LJUD_eTCConfigSB.vi | LabJack
 

Error 6043 occured at LJUD_eTCConfigSB.vi

11 posts / 0 new
Last post
concacid
concacid's picture
Error 6043 occured at LJUD_eTCConfigSB.vi

I am trying to enable a timer using the demo from Labjack on Labview. I keep getting this error. What can be the problem??

Can someone please help. See a snapshot of my code

File Attachment: 
LabJack Support
labjack support's picture
Error 6043 is error 43 (LJE

Error 6043 is error 43 (LJE_TIMER_SHARING_ERROR) in the UD driver. LabVIEW adds 6000 to the error, and UD driver errors can be found here:

https://labjack.com/support/datasheets/u3/high-level-driver/errorcodes

LJE_TIMER_SHARING_ERROR indicates an error with configuration. Looking at your snapshot, if you are only configuring one timer, make sure the aEnableTimers array is [True, False]. Currently, I only see your array as [Unknown, True]. If element 0 (which isn't displayed) is False, then that is the likely cause of the error as Timers need to be enabled sequentially. Also, configure the timer 0 mode as it looks blank.

If you run into further issues, please expand your arrays so we can see all the settings you are passing.

concacid
concacid's picture
Thank you Labjack Support. I

Thank you Labjack Support. I had already figured that enabling the timer is in the wrong sequence and this fixed the error. I said true to 1 and false to 0 Thank you.

I am now battling another error with streaming the data thereafter with Error 6009 occured at LJUD_EGetSDBL. I am trying to stream from just one single ended channel (FIO1)...Please see screenshot. 

File Attachment: 
LabJack Support
labjack support's picture
That is error 9, LJE_STREAM

That is error 9, LJE_STREAM_NOT_RUNNING. It looks like you are configuring the stream , and then try to read stream data without starting it which would cause that error.

If you are going to use "Config Stream U3", start the stream afterwards with a LJUD_eGetS call with IOType LJ_ioSTART_STREAM and then read the stream data. Take a look at the LabVIEW U3\Stream examples. In particular the "U3 Stream Simple Example.vi" example when using "Config Stream U3". Also, look at the "U3 easy Stream Example.vi" example which uses "easy stream strt U3" (that VI both configures and starts the stream), "easy stream read" and "easy stream stop".

concacid
concacid's picture
Thank you Labjack Support!

Thank you Labjack Support! Error has been resolved. Thanks for the detailed help.

What I'm trying to do is to create a PWM output with a duty cycle of 50%. I'm trying to read and save this value to see the timer switch but all I get is 0 0 0 in my excel file...I am expecting values like 0,1,0,1 showing the on and off times.. Am I doing this wrong? Please see snapshot. Thank you for the help

File Attachment: 
LabJack Support
labjack support's picture
1.  I don't see a loop in

1.  I don't see a loop in your screenshot.  You just do 1 analog input read and 1 call to read timer/counter values.

2.  You have not wired some important inputs of eAIN.  Specifically, you have not specified which channel you are reading.

3.  Are you trying to use the Duty Cycle measurement timer to measurement back the duty cycle of the PWM output timer?  Sounds redundant.

concacid
concacid's picture
Hi thanks!

Hi thanks!

1. I ran the program using the continuous run function of Labview. I added a while loop now and all the time values are still 0. 

2. I thought I didnt need to read any channel for the PWM. I just wanted to know the state of the switch and how long they stay in that state as per the specified duty cyle (50%). From the configuration of the PWM output, I was expecting to see the timer values change with between high and low (1 & 0) but I don't see anything but zero all through. I was hoping I could generate a square wave with the values I get. 

3. I will look into that

Please offer suggestions if this is the right way to configure for a 16 bit PWM output at 50% duty cycle. If the values read from the timer dont change, what could be the cause in this case? Thank you. 

LabJack Support
labjack support's picture
The "Continuous Run" button

The "Continuous Run" button in LabVIEW only works in certain situations.  With the code you have in "PWM output.png", using continuous run does not seem good because it will do a pin config reset and eTCconfig every time.

Attached are a couple examples that configure 1 timer on FIO4 as 16-bit PWM output at the desired duty cycle.  One without a loop and one with a loop.

If the values read from the timer don't change, what could be the cause in this case?

I am not totally clear on what you want to read.  Do you want to read back the duty cycle of the PWM output timer?  Check out the example "U3 PWM16 and Duty Cycle.vi".

File Attachment: 
concacid
concacid's picture
Thank you!

Thank you!

I have seen my errors and have fixed them. Thanks for sharing the examples. 

One last question: If I configure 1 timer e.g F104 on my labjack, is it possible to stream another channel say FIO2 with an analog input? I have tried but it seems not to be possible! The best I can seem to do is just a read of the channel.

If this is possible, how can I achieve this without any errors?

Thank you.

LabJack Support
labjack support's picture
Yes you can do that.  A

Yes you can do that.  A couple options:

1.  Configure the timer using "config defaults" in LJControlPanel.  Then use a simple stream example such as "U3 easy Stream Example.vi" to stream your analog input.

2.  Configure the timer at the beginning of your LabVIEW program and then start the stream.  See "U3 Stream AIN with Timers & Counters.vi".

concacid
concacid's picture
Thanks Labjack Support!

Thanks Labjack Support!

Works well! Thank you for responding to all my questions. Very much appreciated!