Show 8 bit binary data on graph

Hello..
I have an 8bit binary numeric control and I want it to be shown on graph so that it would look like a digital bit pattern just like image below.
Please Help..

Try something like the attached draft (LabVIEW 8.2).
convert number to boolean array
convert boolean array to (0,1) array
graph (0,1) array.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
GraphBits.vi ‏13 KB
GraphBits.png ‏8 KB

Similar Messages

  • DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file

    Hi
    DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
    Two main
    sections:
    1)     
    Perform
    write and read operations to and fro different spread sheet files, such that
    each file have a single row of 32bits different binary data (analogous to 1D
    array) where the left most bit is the MSB. I don’t want to manually enter the
    32 bits binary data, I want the data written or read just by opening a file
    name saves with the intended data.
          2)     
    And
    by using test patterns implemented using the digital pattern generator or  build digital data functions or otherwise, I need to
    ensure that the     
                binary data written to a spreadsheet file or any supported file type
    then through the NI-USB 6509 is same as the data read.
    I’m aware I can’t use the simulated
    device to read data written to any port but if the write part of the vi works I
    ‘m sure the read part will work on the physical device which I’ll buy later.
    My Plan
    of action
    I’ve
    created a basic write/read file task and a write/read DAQ task for NI USB 6509
    and both combine in a while loop to form a progress VI which I’m confuse of how
    to proceed with the implementation.
    My
    greatest problem is to link both together with the correct functions or operators
    such that there are no syntax/execution errors and thus achieve my intended
    result.
    This
    project is one of my many assignments for my master thesis, so please i’ll
    appreciate every help as I’m not really efficient with LabVIEW programming but
    I prefer it because is fun and interesting if I get to know it.
    Currently I’m
    practicing with LabVIEW 8.6/NI DAQmx 8.8 Demo versions and NI USB 6509
    simulated device.
    Please see
    the attached file for my novice progress, thanks in
    advance for the support
    Rgds
    Paul
    Attachments:
    DIO_write_read DAQ from file.vi ‏17 KB

    What does your file look like?  The DAQmx write is expecting a single U32 value, not an array of I64. 
    Message Edited by vt92 on 09-16-2009 02:42 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • Loading binary data to graph

    Hello, I have a VI that uses an XY-Graph to graph 2 plots and after my buffer exceeds a certain limit it writes that data into a binary file and saves it on my computer.  Now I'm trying to make a VI that can open that binary file and display it on an XY-Graph.  But i'm having trouble, I keep getting an error... I'm using the LabVIEW Example VI "Read Binary File" to do this.  My data is a cluster of 2 2D arrays, each array contains the X and Y values needed for the plot.
    I guess passing the data isn't as stragith forward as I assumed, does anyone know what I may be doing wrong? Here's a screen shot of the error.
    Thanks!

    Without the actual code to debug, I can only make a few guesses/observations.
    1.   No need to read the file size, just set the count of Read from Binary File to -1 and read the whole thing.  Your calculation is incorrect, count is the number of 'elements' to read, not necessarily equal to the number of bytes.  For example, if you set the datatype to I32, you will read 4*count bytes.
    2.  That datatype does not seem like the proper one for a multiple XY graph.  You should have an array of clusters containing 2 1D arrays.   Basically an array of what is called 'output cluster' in your screenshot.  To be honest, I am a little flumoxed as to why XY Graph seems to like that datatype.
    Right-click on XY Graph and choose Create Constant and see what you get.
    Message Edited by Darin.K on 12-07-2009 01:26 PM

  • Binary data modulation suggest

    i am having 32 bit binary data(111101010101....), modulate and demodulate the data by using simple ask transreceiver.vi
    after demodulation i got only 26 bit binary data
    first bit and last 5 bit in the 32 bit data are gone
    only 26 bit is available
    pls help suggest whether the problem in the simple ask transreceiver or something else
    Attachments:
    simple_ask_transceiver.vi ‏172 KB

    Have you checked the x-scales of your graphs?  There seems to be a lot of waveform data that appears at x-values to the right of what is shown in the graph that I found when I picked autoscale X axis.

  • Define BINARY DATA column (DB2 to Oracle migration)

    Have a table where a column is defined as 'FOR BIT DATA'. This specifies that the contents of the column are to be treated as bit (binary) data. During data exchange with other systems, code page conversions are not performed. Comparisons are done in binary, irrespective of the database collating sequence.
    During conversion to Oracle using Oracle Migration Workbench, this table is converted irrespective of this definition. Please see below for details:
    DB2 table definition:
    CREATE TABLE ADMIN.XENCY (
              ID INTEGER NOT NULL ,
              XENCYSYMBOL CHAR(2) FOR BIT DATA NOT NULL ,
              IN TS_XENCY ;
    Oracle table definition as generated by OMWB:
    CREATE TABLE ADMIN.XENCY
    ( ID NUMBER(10,0) NOT NULL ENABLE,
    XENCYSYMBOL CHAR(2) NOT NULL ENABLE,
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE TS_XENCY;
    During data loading from DB2 to Oracle it fails for this table with the following error:
    Type: Error
    Time: 14-08-2006 18:21:02
    Phase: Migrating
    Message: Unable to migrate data from source table ADMIN.XENCY to destination table ADMIN.XENCY : ADMIN.XENCY; ORA-12899: value too large for column "ADMIN"."XENCY"."XENCYSYMBOL" (actual: 4, maximum: 2)
    For Oracle the length of the data in this column is 4; however for DB2 it is 2 only as shown below:
    $ db2 "select max(length(Xencysymbol)) from admin.Xency with ur"
    1
    2
    1 record(s) selected.
    $     
    The distinct contents of this table is as follows:
    $ db2 "select distinct Xencysymbol from admin.Xency with ur"
    XENCYSYMBOL
    x'0024'
    x'2020'
    2 record(s) selected.
    $
    How do I define a column as containing binary data in Oracle?
    Thanks in advance.

    The MWB DB2 LUW plug-in incorrectly translates CHAR FOR BIT. Doesn't particularly pay attention to any of the CHAR modifiers. It will just see that column as a CHAR. Obviously, this is a defect.
    Binary data of limited length is stored in RAW type columns in Oracle DB.
    You have two problems (in addition to issuing an ALTER COLUMN to fix the type delcaration or dropping, tweaking the table creation script and reloading. )
    1. The data extraction scripts utilized for that table have not properly encoded the data for transport between DB systems. If there are endian differences between he source and target platform there may be additional problems. Nominally, you can export the binary data in hex format.
    2. The SQL*Loader file needs to be adjusted. (if you dump in hex format, so the data in the file is characters of a hex value )
    XENCYSYMBOL CHAR : hextoraw( : XENCYSYMBOL)
    Loader will convert those hex characters back into RAW as it loads.
    [ The  built in data pump will not work obviously because the system thinks it is a CHAR. So offline data transfer is your only option.  ]

  • Conversion from scaled ton unscaled data using Graph Acquired Binary Data

    Hello !
    I want to acquire temperature with a pyrometer using a PCI 6220 (analog input (0-5V)). I'd like to use the VI
    Cont Acq&Graph Voltage-To File(Binary) to write the data into a file and the VI Graph Acquired Binary Data to read it and analyze it. But in this VI, I didn't understand well the functionnement of "Convert unscaled to scaled data", I know it takes informations in the header to scale the data but how ?
    My card will give me back a voltage, but how can I transform it into temperature ? Can I configure this somewhere, and then the "Convert unscaled to scaled data" will do it, or should I do this myself with a formula ?
    Thanks.

    Nanie, I've used these example extensively and I think I can help. Incidently, there is actually a bug in the examples, but I will start a new thread to discuss this (I haven't written the post yet, but it will be under "Bug in Graph Acquired Binary Data.vi:create header.vi Example" when I do get around to posting it). Anyway, to address your questions about the scaling. I've included an image of the block diagram of Convert Unscaled to Scaled.vi for reference.
    To start, the PCI-6220 has a 16bit resolution. That means that the range (±10V for example) is broken down into 2^16 (65536) steps, or steps of ~0.3mV (20V/65536) in this example. When the data is acquired, it is read as the number of steps (an integer) and that is how you are saving it. In general it takes less space to store integers than real numbers. In this case you are storing the results in I16's (2 bytes/value) instead of SGL's or DBL's (4 or 8 bytes/value respectively).
    To convert the integer to a scaled value (either volts, or some other engineering unit) you need to scale it. In the situation where you have a linear transfer function (scaled = offset + multiplier * unscaled) which is a 1st order polynomial it's pretty straight forward. The Convert Unscaled to Scaled.vi handles the more general case of scaling by an nth order polynomial (a0*x^0+a1*x^1+a2*x^2+...+an*x^n). A linear transfer function has two coefficients: a0 is the offset, and a1 is the multiplier, the rest of the a's are zero.
    When you use the Cont Acq&Graph Voltage-To File(Binary).vi to save your data, a header is created which contains the scaling coefficients stored in an array. When you read the file with Graph Acquired Binary Data.vi those scaling coefficients are read in and converted to a two dimensional array called Header Information that looks like this:
    ch0 sample rate, ch0 a0, ch0 a1, ch0 a2,..., ch0 an
    ch1 sample rate, ch1 a0, ch1 a1, ch1 a2,..., ch1 an
    ch2 sample rate, ch2 a0, ch2 a1, ch2 a2,..., ch2 an
    The array then gets transposed before continuing.
    This transposed array, and the unscaled data are passed into Convert Unscaled to Scaled.vi. I am probably just now getting to your question, but hopefully the background makes the rest of this simple. The Header Information array gets split up with the sample rates (the first row in the transposed array), the offsets (the second row), and all the rest of the gains entering the for loops separately. The sample rate sets the dt for the channel, the offset is used to intialize the scaled data array, and the gains are used to multiply the unscaled data. With a linear transfer function, there will only by one gain for each channel. The clever part of this design is that nothing has to be changed to handle non-linear polynomial transfer functions.
    I normally just convert everything to volts and then manually scale from there if I want to convert to engineering units. I suspect that if you use the express vi's (or configure the task using Create DAQmx Task in the Data Neighborhood of MAX) to configure a channel for temperature measurement, the required scaling coefficients will be incorporated into the Header Information array automatically when the data is saved and you won't have to do anything manually other than selecting the appropriate task when configuring your acquisition.
    Hope this answers your questions.
    ChrisMessage Edited by C. Minnella on 04-15-2005 02:42 PM
    Attachments:
    Convert Unscaled to Scaled.jpg ‏81 KB

  • Fix for "Graph Acquired Binary Data.vi" in daqmx 7.4's "Measure Voltage.llb". (factory gains are reversed)

    While perusing binary data collected from the SCXI 1102 and usb 1600, the gains were found
    to be reversed using daqmx writer/reader example code from NI. This bug only surfaces if your using different gains amongst the channels.
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F7199E619CBF4215E0340003BA230ECF&p_node=201208&p_submitted=Y&p_rank=5&p_answer=yes
    has the fix for the binary to floating point viewer vi, "Graph Acquired Binary Data.vi".
    Enjoy.
    Best,
    Davy Baker
    GAMI

    duplicate post
    Continue in other thread
    Message Edited by smercurio_fc on 11-14-2008 09:10 AM

  • Plotting Data on Graph

    Hi there, I have the following question that I would like to ask.
    I am currently receiving binary data from my ADC chip that I connected to labview via NI data accquirsation card. For every 10 bits of binary data, I have programmed labview to convert it to a decimal number. Therefore, I will constantly be having a set of decimal number in labview.
    Now I will like to plot this set of decimal number on a graph. Since I am using Analog to Digital chip to convert my Sine Wave, eventually what I am suppose to see on the labview graph, would be something like a dotted Sine Wave, which is made up of the decimal number that I had converted.
    My question is how can I build my program so that this set of decimal number can be plotted in a Amplitude and Time Domain on  the Graph?
    Ultimately, what I need to achieve is actually to do a FFT on this constructed waveform so that I can get the frequency of the waveform.
    Therefore, is there is a way to just supply the set of decimal number that I get and do FFT straight away so that I can retrieve the frequency of the waveform and bypass the step of plotting it onto a graph? 
    Hope you can understand what I am trying to say.
    Thanks and Regards
    Keith Tan

    It's not clear what you're exactly doing. You said "I tried to pump the set of 10bits words into a graph". What does this mean? How are you converting the 10 bits to a number? What numeric representation are you using? Integer or floating point? Also, are you using a waveform graph, or a waveform chart? If you feed one number to a graph, then you will only see one point. A chart, on the other hand, has a history, so it will plot that point, plus all the others that have been fed before (up to the history length).
    Can you show us some code?
    UPDATE: Hold on. This seems to be the same question as this one. Please stick to one thread so everyone can see what's already been covered and suggested, and folks don't waste their time answering something that's already been answered. 
    Message Edited by smercurio_fc on 06-11-2009 08:20 PM

  • How do I pull binary data apart?

    I have two waveforms encoded in a 16-bit binary format. I can read the data in fine, but I can't quite split it into two waveforms one on each graph. Instead, I have both waveforms showing up on the same graph. Any suggestions?

    If you had posted an example I am sure we would be able to help. Lacking such I will guess.
    Try running your data into a Index array node. Wire an "0" into the collumn index. This should give you the first channels data.
    Do the same using an index of "1" to get the second collumns data.
    If this guess is bad, please post eaxample.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • 16 bit serial data communication

    Hello,
    I want to acquire data serially which is 16 bit.
    Learning from the post http://forums.ni.com/t5/LabVIEW/16-bit-receive-over-rs-232/td-p/1214869/page/3 
    I was succeeded in joining the two eight bits. But the problem i am facing is that the two eight bits some time interchanges each other from MSB to LSB. The Block diagram Code is same as that from the above thread infact i have also plotted the data on Waveform Chart.
    To simulate the behavior, i have created a program of 16 bit addition and sending the data as LSB and MSB on the serial port.
    Here i am sending you the pics that may help you to identify the problem.
    This is the first picture that shows the serial port properties, The graph, and the resulting string that contains LSB then
    MSB and than the Conversion Result i.e 16 bit output.
    This graph is exactly following the Conversion result
    But when the LSB and MSB are interchanged this can we viewed clearly from this. Here the incremented result is reflected on MSB in place of LSB and has disturbed the whole program
    The graphical representation of the error
    In such Cases it is noted that the return count does not counts correctly as shown
    To check whether the error is not at the transmission end,
    I made another program in which I first send
    1 2
    3 4
    5 6
    7 8
    9 10
    And the same problem came here too. as shown below
    Here you can see that I didn’t send 0 but 0 is here as
    the first received data. Also the data is transmitted in five cycles but
    received in six cycles also the return count is 1 again.
    Waiting for reply
    Thanks
    Note:- I request you to please don't  consider my another thread of Multichannel data receiving as same. They both are for different objective. Thanks

    As i wrote that i have got the idea of 16 bit communication from the thread http://forums.ni.com/t5/LabVIEW/16-bit-receive-over-rs-232/td-p/1214869/page/3
    The Code of this is also the same which is as under
    Spoiler (Highlight to read)
    Spoiler (Highlight to read)
    The Data is transmitted as two serial bits and joined at the end. Wel can you give me a more clear idea of what could be the easy technique of specifying the start bit and stop bits.
    Do you think that the data starts transmitting when some character is send to it. And then two bits and transmitted. Do you think this idea can solve the problem.

  • Where is the binary data of this icon stored and retrieved from Application server?

    Hello guys,
    Today I observed one phenomenon and could not explain it per my knowledge.
    I have one url which points to an icon in application server:
    https://<host name>:44301/sap/public/bc/ur/nw5/themes/sap_corbu/common/libs/Icon/SuccessMessage.gif
    I could successfully open it via chrome:
    and after that I could see an entry in ICM server cache. Everything works perfectly.
    Then I tried to check this icon in mime browser in SE80. To my surprise, the folder /sap/public/bc/ur/nw5/themes is empty.
    However, the ICM cache shows that there is a subfolder called "sap_corbu" under "themes" folder. But why I cannot find it in mime browser?
    Then I write a report to retrieve the binary data of icon via CL_HTTP_CLIENT, and clear the ICM buffer via tcode SMICM.
    I expect this time some database table will be queried to load the content of the icon, since now the buffer is not available.
    To my surprise again, in SAT no database table is involved.
    So now I am confused: since I have already cleared the ICM server cache, where does the icon binary data come from when I run the report to access the icon?
    Best regards,
    Jerry

    Hello guys,
    one colleague today told me that there is a zip file "ur_mimes_nw7.zip" in MIME repository /PUBLIC/BC/UR/ur_mines_nw7.zip. I download it locally and unzip it and indeed find many theme folders including sap_corbu folder and its resource files. So I guess there must be some logic done in web application server which will unzip this archive file and put each theme folder to the corresponding folders in application server. I would assume those logic are done outside ABAP stack side, this is the reason I cannot find any hint of them in ABAP backend via tcode SAT even I clear both client and server side cache.
    Best regards,
    Jerry

  • Binary Data type in Logical - Is it a bug?

    Binary Data type in Logical - Is it a bug?
    Hi ,
    I am using SQL DM 3.0.0.665. I need your thoughs on following.
    I have an attribute in logical model with binary datatype. As I generate physical, SQL DM putting the column in BLOB data type. I thought binary means 1 bit ON/OFF type.
    What is the interpretation?
    Thanks in helping us out.

    I thought binary means 1 bit ON/OFF typeYou can check mapping of logical type to native database types in "Tools>Types administration". Data Modeler comes with set of predefined logical type and their purpose is to cover all native types in supported databases.
    Nothing can stop you to change predefined types if you don't like them or/and to create your own types.
    In the case of "Binary" - it's introduced to cover "binary" type in MS SQL Server - it's sequence of bytes not bits or bit.
    Philip

  • SAP DMS: Read document binary data stored in a 3rd party repository

    Hi,
    I'm totally new regarding SAP DMS and I'm a bit confused about what can or can't do, so maybe the question will be quite generic and unclear.
    The scenario in my company is that we have multiple repository servers where we store our documents. When a document is created or modified in one of these repositories a new record is also created/modified in SAP DMS, but this DMS entry only contains the basic metadata information and a URL link to the document, not the content. When the user is in SAP DMS, the only way to access the document content, is via the link that will open the browser outside of SAP GUI and access the repository data using the laptop credentials.
    I would like to know if DMS provides some kind of interface to be able to access the document content from SAP. Now we only have this unidirectional interface from the repository that creates the record in DMS with the metadata but there is nothing to retrieve the content.
    Our main purpose is that we want to download all the files linked to a user (we have a logic to determine if a DMS file is linked to a user). The content of these files may be stored in different content repositories. So I would like to read the binary data in SAP from the different repositories and then be able to download it.
    Thank you in advance for your help.
    - Marçal

    Hi Sagar,
    This FM can't work since there is nothing configured in SAP to access to the file content. The DMS record only has a URL pointing to it.
    Actually what I want to know is what do I have to configure in SAP in order to be able to use a FM like the one you mentioned.

  • Sample code converting binary data to image file

    Hi experts ,
    I need sample code to convert binary data (bytes) in to an image file.
    any help will be appreciated.
    Thanks and Regards,
    Naresh

    You need to show binary and decimal?  Or now just decimal?
    If binary and decimal, you can right click on your indicator and choose "Display Format...".  If you select the Advanced Editing Mode, you can make soft interesting display formats.  This includes showing the same value in mulitple ways in the indicator.  Try something like "%032b - %d" for the format string.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Storing binary data to a file......

    Hi Friends,
    I am trying to make a webapp in which users can upload Videos and I can store that videos on the server. I have this bit of code:
        public ActionForward execute(
                ActionMapping mapping,
                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception{
                        VideoUploadForm myForm = (VideoUploadForm)form;
                        // Process the FormFile
                        FormFile myFile = myForm.getTheFile();
                        byte[] fileData    = myFile.getFileData();
      }My question is, should i store the byte array into some text file???Then how can i read it back and get the original format i.e *.avi or *.mpg.
    This might be easy,but this is my first time dealing with binary data,so your help would be appreciated.
    Thanks
    P.S: Any links would be appreciated

    Thanks BalusC,
    After lots of hardwork finally I am trying to upload the binary file in the database,but getting this error:
    java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, file_blob) values(1, 1, 'uploaded file from user', _binary'\0\0�!\0\0�\' at line 1
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:2994)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:936)
            at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:773)
            at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)This is my code thats trying to write that binary file:
    public class StoreData {
        private static Log log = LogFactory.getLog(StoreData.class);
        private static final String INSERT_BLOB = "Insert into videos.files (id, owner_id, desc, file_blob)" +
                                                  " values(1, 1, 'uploaded file from user', ?)";
        public void WriteData(VideoUploadForm myForm){
            log.info("Writing file to database");
            Connection conn = ConnectionUtil.getConnection();
         PreparedStatement stmt = null;
            // Process the FormFile
            FormFile myFile = myForm.getTheFile();
            byte[] bytes = null;
            try{
                bytes = myFile.getFileData();
            }catch(IOException ie){
                log.error("Upload File not Found");
                ie.printStackTrace();
            InputStream is = new ByteArrayInputStream(bytes);
            try {
                stmt = conn.prepareStatement(INSERT_BLOB);
                stmt.setBinaryStream(1,is,bytes.length);
                stmt.execute();
                stmt.close();
            }catch (Exception e) {
                log.error("Error writing data to file:");
                e.printStackTrace();
         } finally {
             ConnectionUtil.closeStatement(stmt);
             ConnectionUtil.closeConnection(conn);
    }Looking for some help here.....

Maybe you are looking for

  • ICC Profile for Lenovo EasyCamera

    Alright, I've been looking around everywhere on the site with no luck. I have a Lenovo S10-3. It came with a Lenovo EasyCamera built-in. This camera's color is slightly off, as are most webcameras, making all images more blue than they should be. I w

  • First time using time machine

    a question... if I stop the first time I was connecting to my new Time Capsule... I was doing it using my wireless connection and I decided to stop it and connected directly using a cable...then I started again but it seams not to work as it is conti

  • My visa card suddenly was declined from the itunes store. What's going on?

    My visa card suddenly was declined from the iTunes store. Is it because the amount on it is too small (less than a euro)?

  • Can't access Filter-Render-Lighting Effects

    I have an image in Bridge that exists both as a jpg and camera raw. I can open the jpg version and apply Filter - Render - Lighting Effects. When I try to do the same with the camera raw image, I get as far as Render, and then the Lighting Effects op

  • N97 can not add 700 music in music player

    mmy n97 add 698 music but it could not add 700 music.i format & flash it but I couldn't solved.I deleted privet & Resource & system & sys folder. advice me I'm not her...Never was...Never will be..