New user, help will be appreciated | LabJack
 

New user, help will be appreciated

16 posts / 0 new
Last post
Andrea
Andrea Eastham's picture
New user, help will be appreciated

Hello 

I am new here, trying to get my head around the U3-HV Model

I have few questions I would apperciate your help :

1- it says 16 digital output -input  and 16 analogue input ..

where are the terminals for the digital output and how do you use them, I have knowledge in C# and python but I have to use c# in my application. How do you use the digital output.

example wirring output of 5V will be muct apperciated

2- I managed to read the the anlogue voltage signal via c# command found on one of the very much helpful posts here, to make sure I did get that right, I can read upt to 10V signal  only using the FIO.    is that correct?,  the AI are for 5V only. 

3- can you read analogue signal while applying digital out in the same command , or iahve to use seperate commands.

4- what is the ideal thread sleep between 2 commands. 

5- is these units reliable and last so can be used in production or they are just for reserach and study.

6- as the the laptop will be sometimes running on battery power can i connect the GND to the power supply GND, will that create interference, if yes how do i resolve it. 

I do have few more questions I will ask them later on today or tomorrow. 

Thank you very much for your patience and help in advance. I do love the unit. it is affordable and very intelligent.

LabJack Support
labjack support's picture
1. The FIO and EIO lines are

1. The FIO and EIO lines are flexible I/O lines which can be either digital I/O or analog inputs. On a U3-HV, FIO0-3 are dedicated for analog inputs, FIO4-7 and EIO0-7 are digital I/O or analog inputs, and CIO0-3 are dedicated digital I/O. Here is documentation on flexible I/O, and digital I/O:

https://labjack.com/support/datasheets/u3/hardware-description/fio

https://labjack.com/support/datasheets/u3/hardware-description/dio

FIO terminals are on the built-in screw terminals, and EIO and CIO lines are provided through the DB15 connector:

https://labjack.com/support/datasheets/u3/hardware-description/db15

Refer to the C# U3_Simple example on setting digital I/O. To set multiple lines, you can use PUT_DIGITAL_PORT. The examples are here:

https://labjack.com/support/software/examples/ud/dotnet

General UD driver documentation on digital I/O is here:

https://labjack.com/support/datasheets/u3/high-level-driver/example-pseudocode/dio

2. HV lines (AIN0-AIN3) can read +/-10 V, or the "special" -10 to +20 V range. LV lines can read single ended 0-2.44 V, "special" 0-3.6 V or differential +/-2.4 V. Note for the "special" range, perform a differential reading with negative channel 32, as demonstrated in the U3_Simple example. Analog inputs are documented here:

https://labjack.com/support/datasheets/u3/hardware-description/ain

3. Yes, you can perform analog input and digital output operations in the same command. The AddRequests build a list of requests, Go/GoOne sends them to the U3 and retrieves the responses, then GetRequests gets the results. The U3_Simple example demonstrates this. Also, here is the UD documentation on general operations:

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

4. That would be dependent on how often you want to perform operations with your U3. The driver will have delays associated with commands-responses, and no additional software delays are needed for the hardware. Typical command-response execution times are here:

https://labjack.com/support/datasheets/u3/operation/command-response

Someone will follow up with responses to 5 and 6.

LabJack Support
labjack support's picture
5- LabJack devices are

5- LabJack devices are reliable and come with a 5 year warranty. Many of our customers purchase OEM versions to integrate into their products.

6- Connecting the laptop's gnd to another gnd may break the laptop's isolation. One solution is to use an Ethernet device like the T7 or T4. Another option is to use a USB isolator.

Andrea
Andrea Eastham's picture
Thank you very much for your

Thank you very much for your reply, About the first 5 points, I will  go through the links you kindly sent me. 

About the Point number 6 , the LabJack unit will be connected with two other devices to Powered USB Hub  like the one is this link https://www.reichelt.com/gb/en/usb-2-0-hub-with-4-outputs-for-industrial-use-exsys-ex-1163hm-p82420.html, will that make any deference regarding to the GND situation.

 

Thank you again guys.

Regards 

Andrea 

 

LabJack Support
labjack support's picture
The hub's power supply should

The hub's power supply should be isolated. Normally hubs have one GND plane that connects to all connected devices. Now we need to consider what the other devices are doing. We need to think through all the GND paths in the system. Are currents flowing were they shouldn't be? Is there current flowing between analog signal generators and readers (this will cause a voltage offset)? A common way to keep an eye on things is to use a series resistor to connect the grounds. If there is a problem, the resistor will limit the current. And we can measure across the resistor to look for current flow.

Andrea
Andrea Eastham's picture
Hi guys, 

Hi guys, 

I am no electornic Enginner, I will be apperciate your patience, I have attached a simple drwaing of our circut. Please have a look and let me know if I still need to isolate the USB port.

we are a very small company  designing an Industrial Unit and planning on using your U3 model in the design, we don't have electornic engineer among us.

About the picture I attached there is an USB relay 8 Channels, looking more at your unit I think we can get rid of that and use the digital channel in the U3 using solid state relays, can the the unit power 8 solid state relys all at once?  each one uses like 20mA.

We will be ordering about 100-150 (with terminal extension ) /year, but first I need to get my head around the commands, I did try the easy function commands and all worked fine, but up to now i didn't manage to get the multi commands to work. I will ask about that later. for now I need to sort out the GND issue. 

Thank you very much again guys for your help 

File Attachment: 
LabJack Support
labjack support's picture
can the the unit power 8

can the the unit power 8 solid state relys all at once?  each one uses like 20mA.

160 mA will be too much. We need something to amplify the current like this: https://labjack.com/accessories/ljtick-lvdigitalio

 

I have attached a simple drwaing of our circut. Please have a look

Grounding tends to be more complicated than expected.

There is a ground loop between the flow controller, labjack and the GND connection by the USB hub. Some of the current from the flow controller could flow through the LJ. That will create an offset which will interfere with the DAC signal. The GND of the temperature sensor may also be offset from the GND of  the LabJack. That will interfere with the temperature reading. Depending on the currents involved and the resistance of the wire these errors may be within your acceptable limits.

Temp sensor: If the expected output range of the temperature sensor is 2.4 V or less, we can use the LV lines on the U3 in differential mode and run a wire from the negative analog input to the sensor's GND.

The flow controller puts us in a tight spot. Using a USB isolator will prevent current loops from the flow controller, but if you have to run a GND connection to the temp sensor then we have a new loop.

The best solution I see is to limit the temp sensor's output to less than 2.4V so that a differential reading can be used, use a USB isolator on the LabJack and place a resistor in series with the GND line between the LabJack and the flow controller.

The laptop should be fine as long its power supply is isolated. I think all laptop supplies are isolated, but there are probably a few exceptions out there.

 

Andrea
Andrea Eastham's picture
Hi Again, 

Hi Again, 

First thank you for your reply. int he picture provided before I made a msitake describing the flow controller connection, actually the flow controller has 2 commons, one Power common which will be wired directly to the power supply commons, and the second one is called signal commons which will be wired to GND in labJack. These 2 commons are not connected inside the flow controller and manufacturer recommends not to. This I think controlling the flow controller using the DAC is fine now and won't create troubles, what do you think?

Regarding the temp sensor: the picture below shows hwo the manufacturer recommend to wire the sensor, the sensor output signal is 0.5v-9.5v, I followed your advice about using differential reading, so I did the folloing but I had a problem and will appereciate your support:

I have tried to do the differential reading as you suggested but I am not getting corrent values, even so i tested the voltage between AIN0 and AIN1 via Multimeter and the result was correct. C# code used is :

var U3 = new U3(LJUD.CONNECTION.USB, "0", true);

double Voltage = 0;
U3.eAIN(U3.ljhandle, 0, 1, ref Voltage, 0, 0, 0, 0);
Console.WriteLine(Voltage);
Console.ReadLine();

this code retrun Voltage value as 33120, the multimeter shows the voltage between the 2 points is 4.02 (pictured) which is orrect and as it should be. am I doing something wrong here?. 

I read somewhere in the documentation  about setting the channels as differentials channels, how do I do that in c#, the examples provided don't  show example about that. 

Thank you

File Attachment: 
LabJack Support
labjack support's picture
This I think controlling the

This I think controlling the flow controller using the DAC is fine now and won't create troubles

I agree. That makes a big difference.

 

... am I doing something wrong here?. 

The HV lines on the U3 are not able to run differential readings. That is why I wanted to constrain the voltage signal to 2.4V. If that is not possible. This leaves us without an ideal solution. A USB isolator would allow us to connect a wire between GND on the U3 and the sensor's GND. If an isolator is not available we can try with a 100 Ω resistor between the sensor's GND and the GND next to the AIN being used. Use a multimeter to watch for any voltage across the resistor. Any voltage across the resistor indicates that there will be error in the temperature reading.

Andrea
Andrea Eastham's picture
Hi

Hi

I did as you advised, I connected the sensor GND to the LabJack GND, I can read now fine, I didn’t connect 100 Ohm resistance as I didn’t have one on hand. I did order few so. Can I ask what connecting the resistance between the Sensor GND and the labjack GND will do to help me read accurately?

 

I am using the U3.eAIN and U3.eDAC to read and send out voltage out, can you please help me by example how to read multi channels and apply voltage at the same command like reading AI0 and AI1, and send 4V on DAC0  that will be appreciated. Also how to retrieve the data after the command was executed.   I use c#

Currently I use U3.eAIN(U3.ljhandle, 0,199, ref Voltage, 0, 0, 0, 0);

Is the GND 199 correct here?

About the driver, I did include the  LJUDDnotNet.dll in my solutions and referenced it, even so it kept throwing error unable to load dll  until I installed the driver. Is there a way around this by including the driver fully in the solutions instead of installing it manually?

 

Are you considering in the future  offering an independently powered Labjack unit as that will make it superb for lot of applications.

 

Thank you very much for your patience and your kind support.

LabJack Support
labjack support's picture
About the driver, I did

About the driver, I did include the  LJUDDnotNet.dll in my solutions and referenced it, even so it kept throwing error unable to load dll  until I installed the driver. Is there a way around this by including the driver fully in the solutions instead of installing it manually?

What was the exact error message? Was it trying to load LabJackUD.dll? If so, you could include that .dll in your solution as well.

You may want to see the instructions for programmatically installing:

https://labjack.com/support/software/installers/ud/archive/ud-setup-basic

LabJack Support
labjack support's picture
"Can I ask what connecting

"Can I ask what connecting the resistance ..."

The resistor limits current if it tries to flow back through the U3 and we can measure the voltage across the resistor to look for rogue currents when troubleshooting.

 

"Is the GND 199 correct here? "

Yes. 199 instructs the U3 to measure the voltage difference between the analog input and the internal GND.

 

"Are you considering in the future  offering an independently powered Labjack unit "

Devices like the T4 and T7 can be powered by a dedicated supply and the communicate over Ethernet.

Andrea
Andrea Eastham's picture
Hello again,

Hello again,

You adviced me before to consider using the T4 as it is self powered, what is the GND status of the T4 is it the power GND or the RJ45 GND.

as the T4 is self powered, can I connect 8 solid state relays to the digital output, relays rated as Max 25 mA. 

 

Thank you in adavance.

LabJack Support
labjack support's picture
what is the GND status of the

what is the GND status of the T4 is it the power GND or the RJ45 GND.

The T4's GND is connected to the power supply GND through the USB jack. The RJ45 and USB shields are also connected to GND. The shield connection can be broken by removing R124.

 

can I connect 8 solid state relays to the digital output, relays rated as Max 25 mA. 

The IOs have some series impedance. ~500 Ω for FIO and ~100 Ω for EIO. EIO may be able to run the relays, but it is close. Our relay-driver accessory would allow any of the IO to run a relay.

 

Also, we have an appnote about driving relays: https://labjack.com/support/app-notes/Controlling-Relays

Andrea
Andrea Eastham's picture
Thank you for your reply, I

Thank you for your reply, I have ordered PS12DC Power Switching Board as it seems the perfect fit. PS12DC arrived today. The default status for the EI’s is inputs, and for the Ci’s is high. I did use LJControlPanel.exe to configure them according to our needs, my question is how reliable the configuration is not to reset itself in the future when the item in production example if the LabJack was disconnected for long period of time or the driver updated …etc

Thank you again,  you guys are geniuses

LabJack Support
labjack support's picture
The power-up defaults are

The power-up defaults are stored in non-volatile flash memory, just like cal constants and user memory:

https://labjack.com/support/datasheets/u3/high-level-driver/example-pseudocode/miscellaneous

This flash is part of the main microcontroller on the U3, so reliability is the same as the U3 itself, which is great.  If your power-up defaults changed due to flash failure, that would indicate hardware failure of the main microcontroller.