From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

broken wire

context help: you have connected two terminals of different types.

the type of the source is 1-D array of boolean.

the type of the sink is boolean.

 

 

Message 1 of 24
(3,834 Views)
The message seems very clear. What you are doing is not.
0 Kudos
Message 2 of 24
(3,831 Views)

Hi cantata,

 

and what is your question?

<sarcasm off>

 

You really need to learn to actually ask questions!

 

Solution to your problem: remove that error. It's quite easy once you have gone through all those free LV online courses offered by NI…

A shot in the dark: IndexArray is your friend here!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 24
(3,828 Views)

One is an array and one is a scalar. They are not compatible.

 

What are you trying to connect to what, exactly? Can you show us a picture?

 

To convert from array to a scalar, use "index array".

To convert from scalar to array, use "build array".

 

Most likely you simply need to change the control (or data source) or indicator (or data sink) to be of the correct type. What kind of data does the wire represent?

 

Message 4 of 24
(3,818 Views)

Feels like a broken record.  Here is what I have posted before for a similar question.

 

An understanding of what the data represents is important, and knowing this will likely answer your question for you.

 

Lets say you have a single analog reading of 5 volts.  This is a scalar double.  Now you want to graph it so you grab the Waveform Graph and put it on the front panel.  But when you wire your 5V reading to the graph it says you need to provide a 1D array.  This makes sense when you realize the graph is intended to display many values at once, not just one value.  This is why it wants an array of values to put on the graph all at once.

 

A single reading can be turned into an array using the Build Array function, but it is still just a single reading.  If you wired a 5V reading to a build array then to the graph it would run, but what would you see?  Nothing because the graph can't display a single point of data, it needs multiple values.  So you could try to build previous 5V readings into the array so you have multiple values to display at once.

 

You need to understand why you have a 1D Array of Booleans, and you need to understand why your function needs a single boolean.  Then you can realize how to fix it.

Message 5 of 24
(3,778 Views)

Part of the problem might be due to familiarity with dynamic data, which blindly deals with such mistakes behind the scenes and e.g. allows wiring to a scalar indicator, even if we are dealing with large amounts of measurement data.

 

Once you are using more precisely defined datatypes, such mistakes are no longer allowed. 😄

0 Kudos
Message 6 of 24
(3,754 Views)

this is the configure. so do I need to convert the 1-D array to scalar by using index array?

broken wire.png

0 Kudos
Message 7 of 24
(3,716 Views)

Your output tunnel is autoindexing. Right-click it and set the mode to "last value"  (or no autoindeixng(?), depending on version).

 

Of course the comparison operation is also highly suspect. comparing an integer with a floating point value might not give the result you are expecting. Most of your code does not make a lot of sense.

Why are all these terminals inside the loop. Do you expect them to change between iterations?

 

Can you attach the actual VI? Where are the orange wires coming from and what are their values?

0 Kudos
Message 8 of 24
(3,710 Views)
You need to not do an equal comparison to a floating point number. That is a very basic mistake. Then you need to need to decide which element of the array you want since you would have a different true/false result with each iteration. What is the point of what you are doing? It does not make much sense.
Message 9 of 24
(3,708 Views)

let me explain what I'm doing:

I'm trying to build a driver for a laser. I want to scan the frequency of the laser. the commands that can be used are to select a laser channel and the fine tune frequency. the thing I did is: select channel1, and fine tune the frequency by using for loop (move the frequency by 0.125GHz every time, and execute N times). after the for loop, add the channel by 1, then fine tune the frequency again.

 

 

configure_1.png

0 Kudos
Message 10 of 24
(3,699 Views)