convert the binary signal in numbers

Hi all

I searched and I can't find a simular solution to this issue, so I hope that somone can help me. It's probably pretty simple, but as I'm new to Labview, it takes time to get used to the programming language.

I have a rotary switch with 16 positions made-to-measure. The valve has 5 inductive sensors, mounted on a turntable of the holes drilled for the positions.

With 4 sensors, there is a binary code, created for 16 positions.

v1 v2 v3 v4

1 1 1 1 pos 1

0 1 1 1 pos 2

1 0 1 1 pos 3

0 0 1 1 4 pos

1 1 0 1 pos 5

0 1 0 1 6 pos

1 0 0 1 7 pos

0 0 0 1 8 pos

and so on...

The fifth sensor is (1) when the water is rotating and (0) when the valve is in the position.

What I build with LV is a surveillance system for this valve.

How can I use the 5 digital inputs (simulated with Boolean switch) in labview and convert a digital indicator for the position of the valve?

I hope someone can guide me in the right direction with this problem.

Thank you.

Here's a solution

put them together in a table, reverse, convert it to a number, add 1, DONE

the red dot could be avoided, but now your homework

Tags: NI Software

Similar Questions

  • How to convert the binary value to a binary string in labview?

    Hi all

    I need to convert the binary value to a binary string. We have decimal or hexadecimal or octal number to decimal string, hexadecimal and octal string

    Hi pgm, use the function 'Format to a string. See the attached example. "%b" is the binary number in number in string format specifier.

  • Count the number of 1 is present in digital waveforms obtained by converting the pulse signals.

    Hello

    I use Analogtodigital.Vi to convert the pulse of the sequences in digital.signals.I am able to get the representation of digital waveforms of impulses.

    But how to count the number of 1 is present in the converted digital waveform. I want to count the number of 1 is present in the digital waveform converted.

    Thanks in advance.

    Have you tried the block scheme of similar to the Digital.vi of opening?

    It creates an array 2D uncompressed 1 and 0, which is the binary 16 bits A/D conversion of each element in the array Y of the input waveform. You can use the DWDT digital Array.vi Boolean to convert a 2D Boolean table. Then convert Boolean values to 1.0 and summarize the array of integers. The sum must be the number of 1 bits in the digital waveforms.

    Lynn

    Note: The VI attached is saved in version 8.6. When I have it saved for the previous Version a warning was generated about the possible differences in the versions. Let me know if it doesn't work, and you are using which version of LV.

  • How to convert the pulse signal line single layer

    Hello

    I tried to create a VI that will allow me to convert a pulse signal (generated by a tachometer) in a line single layer, indicating that a revolution succeeded. I would like to overlay this line on other signals generated.

    I am able to detect the falling edge of the signal, but I could not make a suitable line. I tried to create a new waveform, and juggle the markers, but no method worked for me.

    Does anyone have ideas for a good way to do this?

    Below is my test VI.

    Make the second vertical lines style trace (trace style: no points, no interpolation, fill - inf). a NaN whener you don't want a power cable and a '+ inf' when you want a vertical line.

    Here's a simple example:

  • Could someone tell me how to convert the digital signals in table 1 d of digital waveforms

    I use 9474 for drving an engine. for that I have uses 2 ports - to activate and another for running. These signals in the form of Boolean values.  I am to convert these signals to a table and since iam doing a digital waveform. but when iam connecting these to the module 9474, it show an error "source is a digital waveform and sink is 1-d array of digital waveform... any body can help in these issueee please...»

    Pop - up on the thread and choose Insert...

    Build the table.

    Ben

  • When I convert the binary boot script.

    I have this quote:

    #targetengine 'traceLinksChanges'
    inDesignMain ();
    
    
    function inDesignMain () {
        main();
        function main(){
            setEvents();
        }
        function setEvents(){
            var myEventListener = app.eventListeners.add("afterActivate", traceChanges, false);
        }
        function traceChanges(myEvent){
    
        }
    }
    

    When I convert it to binary and place the file in the startup folder, and then restart InDesign I get this message, how to solve?

    I think that the object of the function "traceChange" has losted!

    Screen Shot 2013-07-22 at 3.53.11 AM.png

    Go back to http://www.indiscripts.com/, I'm pretty sure that Marc describes how to treat this.

    Peter

  • Converts the audio signals of the mydaq in discrete values

    Hi guys!

    I'm currently building a project that accepts mydaq audio signals. I wanted to analog signals it have descrete peak values. Is this possible? I intend to use the discrete peak values and sum their place by using a registry change instead of the peaks. I think it is easier.

    Any suggestions would be helpful. Thank you very much!

    "".. "in the end we all hopes"...

    FalseHope wrote:

    Yes it detects peaks. but I can't use the peaks detected for something else. He's right there showing me the summits. But I wanted to use these pics for something else, and then to summarize. If there is anything I can do in the peaks detected so that I can use it and summarize, please tell me.

    Yes, the Ridge detector shows you where are the tops.  Now use a loop FOR autoindex on where are the tops for the level in those places.  Now you have a table to the top.  You can then use add table items to add them together.

  • Convert the string array to array of numbers

    How to convert an array of strings (which are numbers) to an array of numbers so I can find the maximum value? I tried to use the code below in the excerpt, but my numbers come out too much.

    It is much easier than that.

  • : The TWO SIGNALS DRAWING: need converter

    Hello

    I just need to shoot 2 signals at the same time with index range x [-1.. 1] by 0.1

    the first signal is tan (x) hyperbolic function and the second signal is my Function

    I think I need a converter!

    concerning

    m, s

    mangood wrote:

    I want to draw the ideal tanh with my function at the same time to see the error as below with x

    Something like that?  I simply called the VI facilitated in a loop FOR, autoindexed the outputs and created the graph plots.

  • How to convert the pixels of a binary PNG files in codeles folder

    Hello

    I am trying to convert the pixels of the PNG file in binary code and I have to do it for a folder full of PNG files. At the moment my home VI information from PNG in a cluster and then convert the color RGB pixels and then write them in binary. The problem is that it do so for only one way.

    Is it possible do automatically all the PNG files in the folder?

    If you need to make the existing logic for all the .png files in a folder (list the .png files and use build path in order to frame a picture of path all the png Files and then place your existing logic in a loop)

  • Is it possible to convert the standard numbered list to the list that appears on the same line a right after another? As indicated in 1. Text goes here, 2. Text goes here, 3. Insert text here

    Is it possible to convert the standard numbered list to the list that appears on the same line a right after another?

    Instead

    1. Insert text here
    2. Insert text here
    3. Insert text here

    This

    1 text goes here, 2. Text goes here, 3. The text here.

    This revised list can take multiple lines.

    I use InDesign CC2014 - if that makes a difference.

    the only way is to convert numbered in the text (select numbered list > ctrl (or right click) > bulleted & numbered lists > convert numbered text).

    Then, with search - replace, you can change the paragraph returns in space (or in space by commas as in your example)

  • Add 0 in front in the binary number

    Hello

    I'm learing labview and I wanted to do something like that...

    I want to read in a text file.

    convert decimal numbers into binary numbers

    and then add zeros if the length of the binary file is less than the number X.

    and then eventually summarize all numbers binary and crawled into pieces 1 1 table.

    the reason to do this to me because I'm generating a singal.

    I started this topic, but I'm stuck in the comments, can someone help out me.

    Thank you in advance...

    The Format based on the string will do this for you.  Right click and change the options to fill with zeros.

  • After updating my iPhone 6 (9.3.4) the WiFi signal becomes very low! I did everything, but the problem does not stop! I don't a not update my other devices & their very good WiFi signals. Please help me solve this terrible problem...

    After updating my iPhone 6 (9.3.4) the WiFi signal becomes very low! I did everything, but the problem does not stop! I don't a not update my other devices & their very good WiFi signals. Please help me solve this terrible problem...

    Here's a tip for the user on the problems of Wi - Fi. Suggest from the top and bottom. Maybe one of them will help you.

    (1) restart you device.

    (2) resetting the network settings: settings > general > reset > reset network settings. Join the network again.

    (3) reboot router/Modem: unplug power for 2 minutes and reconnect. Update the Firmware on the router (support Web site of the manufacturer for a new FW check). Also try different bands (2.4 GHz and 5 GHz) and different bandwidths (recommended for 2.4 to 20 MHz bandwidth). Channels 1, 6 or 11 are recommended for 2.4 band.

    (4) change of Google DNS: settings > Wi - Fi > click the network, delete all the numbers under DNS and enter 8.8.8.8 or otherwise 8.8.4.4

    (5) disable the prioritization of device on the router if this feature is available. Also turn off all apps to VPN and retest the Wi - Fi.

    (6) determine if other wireless network devices work well (other iOS devices, Mac, PC).

    (7) try the device on another network, i.e., neighbors, the public coffee house, etc.

    (8) backup and restore the device using iTunes. Try to restore as New first and test it. If ok try to restore the backup (the backup may be corrupted).

    https://support.Apple.com/en-us/HT201252

    (9) go to the Apple store for the evaluation of the material. The Wi - Fi chip or the antenna could be faulty.

    Council: https://discussions.apple.com/docs/DOC-9892

  • simple AppleScript has stopped working with the latest version of numbers

    Hello

    I have a simple AppleScript that converts marked cells in number of "-" to "+". Now with the new version of numbers (3.6.1) Applescript only converts the first cells and ignores the other marked cells.

    I'd appreciate it if someone could have a look?

    Thanks in advance!

    on run {input, parameters}
    
      --select cells, run; converts positive numbers to negative; and vice versa
    
      tell application "Numbers" to tell the front document to tell active sheet to tell (first table whose class of selection range is range)
           tell the selection range to repeat with i from 1 to count cells
                tell cell i    
                     try     
    
                          set its value to (its value) * -1          
    
                     end try         
                end tell    
           end repeat
      end tell
      --end of script
    
      return input
    end run
    

    Hello

    Because the selection changes when the script change the value of the first cell, numbers select this cell.

    Use the get, like this:

    say (get selection range) to repeat with i from 1 to count cells

  • Problem updating my state machine, using the emg signal

    Hello

    I have problems with my code. My entry is an EMG signal that I gather from three different electrodes using usb 6008. In the program, I divide the signals and display them in a chart that is unique. What I want now is to read the signal, and if a signal passes a threshold I want an LED lights. This must remain lit until there is another signal that passes the threshold.

    To put it simply: "large enough signal--> lamp on--> stay informed--> enough large signal--> lamp--> stay off the coast and then start again."

    I tried a few different approaches, but I decided using a state machine. Now, the problem is that when the signal to enter the state machine the program crashes. I think it's because the table that I use to convert the signals does not update when I get my state machine, so the signal stops to come. But how to get around this problem? It is even possible to code what I want?

    I have attached the code. All the tips are welcome, I have been struggling with this for some time now.

    Thank you

    jenmich

    The problem is internal while the loop is run until the stop condition is true, but he never does a new Boolean entry. So that it remains for always in the same State. Remove the inner loop and put the shift register on the outer loop instead.

    You must also use a daqmx configures the element, and then set the properties of daq. The read.vi can be set to read a number of samples of each iteration.

    Also: you can expand the table to index for several items of output. If you want that element number 0, 1, and 2, you have yet to wire the index entries

Maybe you are looking for