LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a Boolean control into a 1D array of digital waveform for NI DAQ

Solved!
Go to solution

I have been trying to make a simulated DAQ, which will read a Boolean to control a relay.

 

However, when trying to send the array into the daq alone, i get an error that my digital waveform is 2 dimensional, but i require a 1 dimensional array.

 

Im sure its something tiny i just dont know, since i am basically a labview noob, but i would appreciate if anyone knows how to fix the problem

0 Kudos
Message 1 of 7
(5,976 Views)

Hi ShamtejRana711,

 

Welcome to the community.

 

Would it be possible for you to explain a little more about what you are trying to achieve with your program. Is your intention to have the push button simply turn on the relay? I am unsure on why you need the array manipulation on your code.

 

How is the express VI configured on your code? Can you post a screenshot of its configuration.


Certified LabVIEW Architect, Certified Professional Instructor

CLA CPI

0 Kudos
Message 2 of 7
(5,944 Views)

oh, i see what could have made this hard to understand!

 

i dont have a relay sub vi, but instead have a simulated daq relay for a part i have the intent of purchasing for the final project. 

 

I need to take the signal from a boolean, which is used in the major program, and send that boolean into the simulated DAQ relay so that i can control the relay i will have connected to a fuel pump.

 

However, when i try to put the Boolean data into the DAQ, then it says i need an array, when i made a 1 dimensional array, it says that i need a digital waveform array, then i try to connect the array to the digital waveform converter, and it says that my array is 1 dimensional, and it needs to be 2 dimensional, so i convert it to 2 dimensional, then put it into the digital waveform converter, and it tells me that i need a 1 dimesional source, but i have a 2 dimesional source

 

 

0 Kudos
Message 3 of 7
(5,940 Views)

i dont have a relay sub vi, but instead have a simulated daq relay for a part i have the intent of purchasing for the final project. 


Sorry I maybe wasn't clear by what I meant either can you double click on the Blue Express VI and post a picture of how it is configured? Express VIs hide a lot of information in there internal configuration.


Certified LabVIEW Architect, Certified Professional Instructor

CLA CPI

0 Kudos
Message 4 of 7
(5,931 Views)
Solution
Accepted by topic author ShamtejRana711

thats what you have to do, put the signal into an always true relay, convert to digital, get components, use the y to build an array, then reshape with a 0.

 

Also, ignore the loose ends, they go into the data for the DAQ Assistant, 

n.png

0 Kudos
Message 5 of 7
(5,897 Views)

This discussion is jut plain silly! Going from a scalar single boolean to a digital output does NOT need to involve dynamic data, digital waveforms, boolean arrays of many dimensions and such. You have exactly one bit of information, so please keep it simple!

 

 

0 Kudos
Message 6 of 7
(5,886 Views)

@altenbach wrote:

This discussion is jut plain silly! Going from a scalar single boolean to a digital output does NOT need to involve dynamic data, digital waveforms, boolean arrays of many dimensions and such. You have exactly one bit of information, so please keep it simple!

 

 


Yeah, i wish.. but it seems that the DAQ had asked for a 1D array of digital waveform, and i had a 2D array of Boolean. So actually, it was necessary to use dynamic data to get from 2D to 1D, then from boolean to Digital waveform

0 Kudos
Message 7 of 7
(5,844 Views)