Drops in Matlab but not in Kipling | LabJack
 

Drops in Matlab but not in Kipling

6 posts / 0 new
Last post
bl4ckeagle
bl4ckeagle's picture
Drops in Matlab but not in Kipling

Hello

 

We bought the Labjack t7 pro.

We put some sensors on it, but if we read it in matlab with  ljm.eReadNames the voltages drops, but in kipling dashboard & analog input everything is stable.

We want to do a differential read/measure with AIN0 and a negative CH AIN1

 

Are there any settings we are not seeing?

We also tried to read modbus with matlab but this is not really working

 

No method 'AddressesToMBFB' with matching signature found for class 'LabJack.LJM'.

 

Is what we got.

 

It would be very kind if you could help us.

LabJack Support
labjack support's picture
I would stick with LJM in

I would stick with LJM in Matlab for sure.  About the only reason to use direct modbus would be if you are using Matlab on Linux or Mac.

Differential signals are the source of many improper connections.  See the following:

https://labjack.com/support/app-notes/differential-analog-inputs

 

I would be suspect something is not right with your signal/connections.  Test with known signals to see if your Matlab program does fine.

Remove your signals and instead jumper AIN0/1 to VS or GND.  A differential reading of AIN0 should return:

AIN0=VS, AIN1=GND:    5 volts

AIN0=VS, AIN1=VS:       0 volts

AIN0=GND, AIN1=VS:    -5 volts

AIN0=GND, AIN1=GND:    0 volts

Those voltages assume Range=10.  If you are using a small range that is fine, the 5 volt readings above will just be stuck at the limit for your range, so still a good test.

 

bl4ckeagle
bl4ckeagle's picture
Hallo and thank you very much

Hallo and thank you very much for your answer. 
 
We tried the values you recommended, and they are working fine.

We also observe that the same problem is valid in Kipling when we set the register to  active mode.
So the main problem is; when we connect our sensors to AIN0 register and put it on active in kipling, we get the same problem as in Matlab.
So is it possible to use the same settings as in Kipling with “inactive” register, or whats the difference in matlab and in kipling?
Kind regards

LabJack Support
labjack support's picture
when we connect our sensors

when we connect our sensors to AIN0 register and put it on active in kipling, we get the same problem

By "active" do you mean putting some registers in the "Active Registers" list in the Kipling Register Matrix?  Something different happens when you do this compared to just viewing the AIN readings on the Analog Inputs tab or Dashboard tab?  Perhaps send some screenshots to show this:

https://labjack.com/support/app-notes/screenshots

 

I would try doing a basic settling test to see if your signal is good:

    1. Leave your +/- signals connected to AIN0/AIN1.  And I assume you also have a common reference (e.g. ground to GND)?

    2. Jumper VS to AIN2, and jumper GND to AIN3.

    3. Use the Analog Inputs tab in Kipling to configure AIN0 's negative channel as AIN1.  Configure AIN2 & AIN3 as single-ended.  Go to the Power-Up Defaults tab and click "Configure Power-up Defaults" to save your settings.  Close Kipling.

    4. Run LJStreamM.exe.

    5. Set #Channels=4 and ScanRate=500.

    6. Set the first Names in the first 4 rows to AIN2, AIN0, AIN3, AIN0.

    7. Click "Start Stream".  The first row should read about 5 volts and the 3rd row should read 0 volts.  The 2nd and 4th rows are both reading your signal and should read the same thing.

 

The idea of this sampling test is that the AIN system is charged to 5 volts, then has to swing to your signal voltage, then is charged to 0 volts, and again has to swing to your signal voltage.  If your signal is properly driven, it will read the same whether the system is settling from 5 volts or from 0 volts.

 

 

 

bl4ckeagle
bl4ckeagle's picture
Yes thats exactly what

Yes thats exactly what happens.  The first one ist the correct Signal from the  Analog Inputs and the  second one is what we get when we set them to the Register Matrix, but the voltage continues to drop

I tried the sampling test, at first the correct voltages are shown (LJStreamM.PNG). When we Start the Stream, the Voltage of both start to rise very fast (LJStreamM2.PNG).

LabJack Support
labjack support's picture
 

 

Is your signal connected properly?  You mentioned you are doing differential which is a very common source of mistakes.  Is your signal inherently differential, or can you try connecting it single-ended?

https://labjack.com/support/app-notes/differential-analog-inputs

 

 

Perhaps your signal is connected properly but just has weak drive (e.g. high source impedance).

You could try experimenting with longer settling times.  Use Kipling to set STREAM_SETTLING_US to different values and then run stream.  Instead of the previous scan list do the following 6 channels: AIN2, AIN0, AIN0, AIN0, AIN0, AIN0.

https://labjack.com/support/datasheets/t-series/communication/stream-mode#ain-stream

If your signal is connected properly, but has weak drive, the LJTick-InBuff is the likely proper solution:

https://labjack.com/support/datasheets/accessories/ljtick-inbuff