LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Have i done wrong here?

Skärmbild 2023-09-05 132017.png

 Hello!
i have a tempreture sensor and depends on how hot it gets some leds should be on but i cant connect the build array to the DAQ why?
thank you
Abbe

0 Kudos
Message 1 of 9
(1,699 Views)

The tool tip actually says it. You created a two-dimensional array. If you want to concatenate the single 1D arrays to a bigger 1D you need to use the insertion VI. 

Message 2 of 9
(1,684 Views)

yes, thank you for your fast respond. i wanted to change from the dynamic signal to a boolean with out using any other array than the build array becouse that is the only array we need my teacher said, so the problem you saw wont come up again. do you have any tips how i can change the signal with out any other arrays?
very thankful for your fast respond

0 Kudos
Message 3 of 9
(1,676 Views)

Hi Abbe,

 


@MaSta wrote:

If you want to concatenate the single 1D arrays to a bigger 1D you need to use the insertion VI. 


Wrong.

When you want to create a big 1D array from several smaller 1D arrays then you use BuildArray in concatenation mode.

 

How many DO signals do you want to output? Do you really want to drive 6 different DO channels?

How many samples do you read with the first DAQAssistent?

Does it make sense to convert the DDT wire into a 1D array of booleans?

Would it make (more) sense to convert the DDT wire to a scalar value?

Would it make sense to compare that single sample value with an array of limit values instead of placing 6 identical compare functions?

 

Keep in mind:

  • The problem with images is: we cannot run/edit/debug them in LabVIEW.
  • The problem with ExpressVIs is: we cannot see their settings just from looking at an image of a block diagram!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 9
(1,621 Views)

@GerdW wrote:

Wrong.

When you want to create a big 1D array from several smaller 1D arrays then you use BuildArray in concatenation mode.


you could use insert into array to mimic append array, but I also don't recommend to do so.

0 Kudos
Message 5 of 9
(1,606 Views)

Your main problem is in the use of dynamic data and express VIs. we have no idea how the DAQ assistant is configured and what the dynamic data contains!

 Maybe it only contains a singe value (you said ("i have a tempreture sensor(sic)", i.e. singular, not plural!) , especially since you only display a single LED for each branch, totally ignoring that there could be more!

 

If you only read a scalar DBL, you can compare it with an array of thresholds (diagram constant) to get an array of booleans that can be directly fed to your Digital output. Then you can convert it to a cluster of your 6 booleans for display. One terminal is 6x simpler that six terminals!

 

If you want more specific help, attach your VI! Thanks.

 

0 Kudos
Message 6 of 9
(1,596 Views)

@altenbach wrote:

If you only read a scalar DBL, you can compare it with an array of thresholds (diagram constant) to get an array of booleans that can be directly fed to your Digital output. Then you can convert it to a cluster of your 6 booleans for display. One terminal is 6x simpler that six terminals!


Here's how that could look like:

 

altenbach_0-1693925502513.png

 

Message 7 of 9
(1,589 Views)

Hi
can someone help me on how u can connect these together. i have a temprature sensor and 6 leds, daqmx read, write and a build array. i want to connect them and try to make the leds turning on depends on the temprature. i have configrated a task and calibrated the sensor already.

Skärmbild 2023-09-11 102637.png

0 Kudos
Message 8 of 9
(1,509 Views)

To connect things on a picture, you would use any drawing program and add some lines.

 

If you want help with LabVIEW code, please attach the VI instead.

 

In order to decide how to connect things, we need a list of all requirements that the program needs to perform.

In a nutshell, you might want to use my code above and just replace the data generation part with the reading from your sensor.

0 Kudos
Message 9 of 9
(1,410 Views)