Jump to content
  • 0

ULx for LabVIEW help


Zachkeeb104

Question

I have been looking around on the internet for a solution to my issue but haven't been able to find anything online, in the provided user's guide and other informational documents, or in the help tab in LabVIEW. I am looking to take data from two different channels under the same task (measure voltage and current simultaneously) but cannot find a way to accomplish this like you can in LabVIEW with creating the tasks in NI MAX. Is there any way to accomplish this or is the library not capable of this.

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

  • 0

If you want to sample fast, review our example, ULx Cont Acq&Graph Voltage-Int Clk. You can find it in \National Instruments\LabVIEW 2023\Examples\ULx\Analog In\Measure Voltage.llb. If sampling less than 100 Hz, review ULx Cont Acq&Chart-Samples-SW Timed found in \National Instruments\LabVIEW 2023\Examples\ULx\Analog In\Measure Slow Varying Signal.llb.

To select a single channel, open the Physical Channel control and select the channel. To select multiple channels, open the same control but choose Browse. Then, use your keyboard control or shift key (and mouse) to select individual or groups of channels. 

Link to comment
Share on other sites

  • 0
31 minutes ago, JRys said:

If you want to sample fast, review our example, ULx Cont Acq&Graph Voltage-Int Clk. You can find it in \National Instruments\LabVIEW 2023\Examples\ULx\Analog In\Measure Voltage.llb. If sampling less than 100 Hz, review ULx Cont Acq&Chart-Samples-SW Timed found in \National Instruments\LabVIEW 2023\Examples\ULx\Analog In\Measure Slow Varying Signal.llb.

To select a single channel, open the Physical Channel control and select the channel. To select multiple channels, open the same control but choose Browse. Then, use your keyboard control or shift key (and mouse) to select individual or groups of channels. 

Thank you for the help, but I'm still confused as I'm not sure if this answers my question. I understand that you can use the browse option to select multiple channels, but my issue arises with the create channel vi and how you can only select one data type and I would like to measure two (voltage and current). It seems like your suggestion would work if I was trying to measure two separate voltages or two separate currents at the same time, but not wanting to measure two different data types at the same time. I attempted to use a concept my boss had used in older versions of labview where you would use the DAQmx create task vi and then cascade the DAQmx create channel AI voltage vi into the DAQmx create channel AI current vi into the start task vi as a previous way to create the task. The issue I saw with trying to apply this concept to the ULx for labview is that there is no create task vi.

Link to comment
Share on other sites

  • 0

ULx does not have an Analog Current method for the Create Channel VI, only Analog Voltage. The data returned from an Analog Voltage channel has no associated units. It's assumed to be a voltage, but it could be temperature, pressure, current, strain, force, etc. The responsibility falls on you to make the conversion.  For instance, a typical 4-20mA 250 ohm current shunt produces a voltage between 1 - 5 volts. If the unit maximum is 1000 (psi), the scale is 1000/(5-1) or 250 psi per volt and the offset is minus 250 psi. So, you would multiply each value by 250 and subtract 250. 

Link to comment
Share on other sites

  • 0
16 hours ago, JRys said:

ULx does not have an Analog Current method for the Create Channel VI, only Analog Voltage. The data returned from an Analog Voltage channel has no associated units. It's assumed to be a voltage, but it could be temperature, pressure, current, strain, force, etc. The responsibility falls on you to make the conversion.  For instance, a typical 4-20mA 250 ohm current shunt produces a voltage between 1 - 5 volts. If the unit maximum is 1000 (psi), the scale is 1000/(5-1) or 250 psi per volt and the offset is minus 250 psi. So, you would multiply each value by 250 and subtract 250. 

I think I'm still confused because unless I am looking at something different, as seen in my attached picture, I was able to select Analog Current in the create channel vi.

image.png.6e130960cccc0dfdf768b3f87f45f300.png

Link to comment
Share on other sites

  • 0

 I cannot find any meaningful documentation related to the AI Current configuration. I tried it with a USB-2404-UI that has a +/- 25mA current input mode, and the error that was generated didn't make sense. I also tried it with the USB-1608G voltage inputs, and it indicated that my device was not compatible. It could be a holdover from discontinued hardware or a placeholder if we decided to add support similar to DAQmx. 

 

Link to comment
Share on other sites

  • 0
On 1/3/2024 at 1:17 PM, JRys said:

 I cannot find any meaningful documentation related to the AI Current configuration. I tried it with a USB-2404-UI that has a +/- 25mA current input mode, and the error that was generated didn't make sense. I also tried it with the USB-1608G voltage inputs, and it indicated that my device was not compatible. It could be a holdover from discontinued hardware or a placeholder if we decided to add support similar to DAQmx. 

 

First of all I just wanted to say thank you for the help. Using your advice I've been able to make significant progress. I'm running into some new issues now though. It appears that I cannot read values from these channels unless I start reading them in DAQami first. If I run the labview program I've created, the indicators I have for current and voltage just read 5 and do not change as I run my motor. If I begin running my configuration in DAQami first and then begin running my labview program the values do change (although currently unscaled). Do you have any idea what could be causing this? I'm very new to this library and DAQami (this is the first project I'm working on using both) so I'm learning a lot as I'm going.

Link to comment
Share on other sites

  • 0

Close DAQami and LabVIEW and run InstaCal with the device attached. For the USB-1608G, there is only one configuration setting - 16 single-ended channels or eight differential. You can choose the one you want and exit. Now run LabVIEW, and when you select Dev0/Ai0, it will know that you have a USB-1608G and how the channel is configured. You always run LabVIEW after InstaCal because when LabVIEW is initially started, it reads InstaCal's configuration file and does this only once.

Link to comment
Share on other sites

  • 0
Posted (edited)
43 minutes ago, JRys said:

Close DAQami and LabVIEW and run InstaCal with the device attached. For the USB-1608G, there is only one configuration setting - 16 single-ended channels or eight differential. You can choose the one you want and exit. Now run LabVIEW, and when you select Dev0/Ai0, it will know that you have a USB-1608G and how the channel is configured. You always run LabVIEW after InstaCal because when LabVIEW is initially started, it reads InstaCal's configuration file and does this only once.

For the most part, that was the process I have been using already, open instacal and then labview. I just tried restarting my computer fully then opened instacal first and then labview and I'm still seeing the same issue.

As a quick note to this issue, I also have 2 digital channels set up for motor control and a counter input for measuring hall counts from a hall sensor. These channels are acting as expected, the only ones I'm having issues with are the analog inputs, being Ai6 and Ai7.

Edited by Zachkeeb104
Link to comment
Share on other sites

  • 0
6 hours ago, JRys said:

To be clear, InstaCal only needs to be run once to set the input mode to eight or sixteen channels. After that, you simply run LabVIEW. 

Thank you for the clarification. Do you think that's part of the issue or was that just to make sure we are on the same page?

Link to comment
Share on other sites

  • 0

InstaCal does not need to be run every time you run LabVIEW. I was only trying to clarify that you run it once to configure the inputs. Once that's done and InstaCal is closed, then run LabVIEW. Attach a simple LabVIEW VI demonstrating the problem, and I'll look at it. 

Link to comment
Share on other sites

  • 0
13 minutes ago, JRys said:

InstaCal does not need to be run every time you run LabVIEW. I was only trying to clarify that you run it once to configure the inputs. Once that's done and InstaCal is closed, then run LabVIEW. Attach a simple LabVIEW VI demonstrating the problem, and I'll look at it. 

I've attached the vi I'm currently working with, I think it's simple enough for you to follow.

ULx_MotorControlTest.vi

Link to comment
Share on other sites

  • 0

I connected signals to channels 6 & 7 and connected one of the digital outputs to the counter input, and your vi is responding appropriately. This leads me to believe you have a grounding issue or channels 6 & 7 are wired incorrectly. 

Link to comment
Share on other sites

  • 0
On 1/9/2024 at 1:44 PM, JRys said:

I connected signals to channels 6 & 7 and connected one of the digital outputs to the counter input, and your vi is responding appropriately. This leads me to believe you have a grounding issue or channels 6 & 7 are wired incorrectly. 

I'm not sure if the problem could be incorrect wiring/grounding issues. My only reasoning is that this hardware has been in use for years now but has been interfaced with DASYLab instead of LabVIEW. So if that was the issue, wouldn't we have been seeing a similar issue in DASYLab?

Link to comment
Share on other sites

  • 0

If the same setup worked with DASYLab, it should work with LabVIEW because they both use InstaCal to configure the channel input mode. Which input mode are you using and what is connected to channels 6 & 7?

Link to comment
Share on other sites

  • 0
On 1/10/2024 at 4:19 PM, JRys said:

If the same setup worked with DASYLab, it should work with LabVIEW because they both use InstaCal to configure the channel input mode. Which input mode are you using and what is connected to channels 6 & 7?

Wanted to give a final update and solution to my issue. In instacal, my input mode was set to differential when it needed to be set to single ended. This I believe was something you had previously mentioned but I had assumed that it had been properly configured already seeing as we have been using this DAQ for some time now. Thank you for all of your help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...