Creating a string of bits to send through questions series VISA, complete noob here...

Hi all

I'm trying now, to browse the values I have on my collection of GUI and with these, construct a message to send through VISA.

I have the usb-> rs232 cable and NO, and I have attached a connector, with the pins 2 and 3 tied together so that I can loopback and see the messages I send.

I'm supposed to (from the instructions that I read on a design doc) will send a message of length of 24 bits.

And please bear with me, I've never worked on this low a level before, nor with the serial interfaces, so I can be completely off on how I'm doing... and this is my

first really relay with LabView for this project.

I have some time execution of every 20ms in a loop.

I have a structure of the event looking for user actions on my front.

I also breast that everything in a loop, a flat sequence structure... my assumption was, every 20ms, the flat sequence structure would run, except where it is interrupted by an event... that could trigger and then continue with the flat structure...

I have seen that the entry VISA (and read) take a string.

So, I started the flat structure with build my string of bits/bytes outgoing... first section is coded hard and then, through the two sequences, loop it and based on the values of the controls within each cluster, I concatenate to my outgoing string... in which case, I send by the visa by the closure, and post it on the message indicator.

It seems that I can send on only 8 bits at a time through VISA... so, I try to understand (and I wonder people with the req on this part) why they said to send such a long chain... or am I supposed to send each message of 8 bits, one at a time?

If one bit 8 message at the same time, I wonder how I have let him know when I am finished?  I have heard and read things about start and stop bits, but I don't know where to put them.

In addition, is the string that I'm supposed to put them together to send something waiting for data series bits/bytes? I saw a reference to a string of bytes while the research, but I Coulnd't ' t find a piece of string byte on the pallets.

And when I run the present (a simpler example of my real application, simply to show here the parts I am trying to figure)... the message echoing again to me is:

111000010000\n

When if I have all the tubes with a value in them... I want to get something new like:

1110000111111110111111110\n

I'm also noting that messages do not seem to be transmitting every 20ms... seems only to get a message back when when I trigger an event, as the option switch on the LED.

In any case, I'm confused, I think that, on certain basic principles and hope someone can maybe send me some links or give me some advice on where I'm wrong so seriously...

Is my construction of the right to follow path string message?

Is something wrong with the flow of the program... the events + flat sequence structure?

I received this property by searching for forums and other papers OR, but I'm stuck sort of and confused I think on some concepts with read/writes...and possible VISA my flow control.

Any suggestions and/or links GREATLY appreciated.

Thank you

Cayenne

PS. Some asked to record for older versions, so I enclose a copy saved to more 2011 v10

Cayenne,

Your sequence structure is not necessary.  You have a dependency on the data, as well as the structure of sequence is not really do anything for you.  Seems to me that what you want to do is to build the table of your clusters that you already own and send the table directly in a > 0? function.  It will accept berries and an array of Boolean output.  You can then use the Boolean array to the Number function to create a U8.  Do this for each of your clusters and integrate the results in a table of U8 and fixed data.  Then use the array of bytes to the string function to get a string to pass in the VISA to write it.  Without loops or the necessary structures.  Any additional manipulation you need, I recommend to the byte level.

Tags: NI Software

Similar Questions

  • How to create an XML Document and convert it into a string? (send through wireless network)

    Hello

    I am now able to post data to a web server by using Blackberry JDE (medical use).

    Now, instead of display the plain text, I would like to send an XML file.

    I am able to do it using this code on a 'normal ': Java application

    import java. IO;
    Org.w3c.dom import. *;
    Import javax.xml.parsers. *;
    Javax.xml.transform import. *;
    Javax.xml.transform.dom import. *;
    Javax.xml.transform.stream import. *;

    public class {XML
    Public Shared Sub main (String [] args) {}
    try {}
    DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();
    DocumentBuilder builder = factory.newDocumentBuilder ();
    Doc document = builder.newDocument ();
               
    Root element = doc.createElement ("root");
    doc.appendChild (root);
               
    Child element = doc.createElement ("child");
    child.setAttribute ("name", "value");
    root.appendChild (child);

    Add a text element to the child
    Text = doc.createTextNode ("text");
    child.appendChild (text);

    implement a transformer
    TRANSFAC TransformerFactory = TransformerFactory.newInstance ();
    Transformer trans = transfac.newTransformer ();
    trans.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION, 'yes');
    trans.setOutputProperty (OutputKeys.INDENT, 'yes');

    create the string of the xml tree
    StringWriter sw = new StringWriter();
    StreamResult result = new StreamResult (sw);
    DOMSource source = new DOMSource (doc);
    TRANS. Transform (source, result);
    String xmlString = sw.toString ();
    System.out.println (xmlString);
    } catch (Exception e) {}
    make error management
    }
    }
    }

    However, on the Blackberry JDE, many functions is not recognized.

    I saw the class DocumentBuilderFactory (net.rim.device.api.xml.parsers.DocumentBuilderFactory), the DocumentBuilder (net.rim.device.api.xml.parsers.DocumentBuilder) class and the interface of Document in the docs of Blackberry Java (4.2.1).

    So, I'm able to create an XML Document... but I don't know how to convert to a string?

    How can I do this? The TransformerFactory class doesn't seem to exist... and I did not find an alternative yet.

    At the present time, here is the code I use to publish data:

    String coord = lat + ";" + LNG; post data
    con = (HttpConnection) Connector.open (url); Open the connection URL
    con.setRequestMethod (HttpConnection.POST); POST method
    con.setRequestProperty ("Content-Type", "application/x-www-formulaires-urlencoded");
    out = con.openOutputStream (); display the results in a stream
    out. Write (Coord.GetBytes ());

    responseCode = con.getResponseCode (); Send data and receive the response code
    If (responseCode! = HttpConnection.HTTP_OK) {}
    System.out.println ("HTTP STATUS CODE: 404"); error
    } else {}
    System.out.println ("HTTP STATUS CODE: 200"); successful
    }
    If (con! = null) con. Close; close the connection to the URL

    As mentioned, rather than display a string with a delimiter between each value (there will be a lot more than two values finally), I would like to publish an XML.  It will be more "elegant" and easier to parse by my code on the web server.

    Maybe I don't have to convert it to a string?

    In other words, how can I convert my XML Document to send it via the wireless network?

    Thanks for your help!

    TransformerFactory does not exist in the BlackBerry API.  As far as I can tell, you need to implement yourself.  You can do this by walking the DOM and the output of channels.  They have an example of the market of the DOM in the XMLDemo, but they view as fields, you just need to write strings.

  • Maintenance mode to create query strings?

    Why should I switch to Maintenance Mode to create query string parameters?  I created query string parameters in the past and I have never been held to switch to maintenance mode.  If I go to activate maintenance mode, here is the message I get:

    Maintenance mode is currently DISABLED. Click on the button at the bottom of the page to activate the Maintenance Mode. With the Maintenance Mode on visitors register as not being on the Web site.

    Then... I guess I have to move fast while it is in maintenance mode, so I don't miss the important Web site visitors.  I just took an Eloqua University class on the web of profiling and of maintenance mode was not mentioned when creating query string parameters.

    Just wondering why this requirement has been added in order to create new query string settings?  I'm sure there is a good reason, but I was surprised by this today.

    Hi Vince,.

    Maintenance mode is necessary if you are generating a high volume of web traffic. When the volume of Internet traffic is low, the system is able to create the settings while continuing to capture relevant data provided by all. If the traffic volume is high, the system cannot create additional "fields" in the database at the same time perform all write-queries that generate your visitors. In addition, when the new channels/parameters sets query are created, the system must comb all existing data to find these settings in one of the existing data, so if clickstream data is generated more quickly that the script can work through the data, it would cause a problem.

    So yes, it is possible that sometimes maintenance mode will be needed, and other times not. If necessary, its best to activate only for very short periods of time, as Yes, all incoming data in maintenance mode is ignored.

  • Logical operations on a string of bits

    Hi, I have a very simple question that I can't seem to understand.  I'd just like to perform logical operations (AND, GOLD, etc.) on 2 strings of bits that are 24 bits long each, however I can't find in the palette of functions a function that acts as a binary constant.  I see that constant digital and hex functions.  You can somone please let me know where I can find it.  For example, I would AND ' 111111111111111111111111 '& ' 000000000000000000000000'.

    You know the difference between numeric and string data types in LabVIEW? Blue = digital = integer. Pink = string. In the example you linked to, they use an integer constant when the display format is set to "binary". The 'b' of the constant indicates the radix, which in this case is 'binary '. Right-click on a digital constant and you can change its display format. You can select one of the predefined formats or you can specify a by clicking on the option "Advanced Editing Mode. Eligible formats are defined by using LabVIEW. For example

    %b = binary

    % 8 b = binary, using the width of minimum field of 8, fills spaces (for example, '1101')

    % 08 = binary, using 8 minimum field width, filled with zeros (for example, "00001101")

  • go into strings of bits on a single byte (best practices)?

    I'm looking for a more eloquent way to convert:

    • Several strings of bits in a single byte.
    • Only string to array of bytes that represents the value of the number

    See the VI for an example functional but not scalable.

    Each string has a value of 0 or 1, and they will be converted to a single byte.

    I'm surprised there is no native functions in the section conversions which allows the user to do.

    I would like to change the conversion into a function with the following entries:

    • any number of strings of bits

    Output:

    • Byte or Word

    I'm on LabVIEW 2012 and I can't open your VI or Hoovahh modified version so maybe I write exactly the same thing, but this snippet does what you want?

  • How to create the string of JSON using QVariantMap array?

    Hi all

    How to create sub string of Json using QVariantMap array?

    {
        "Test1": [
            {
                "dataTest1": "0000",
                "dataTest2": 1412,
                "dataTest3": "",
                "dataTest4": "0000",
            }
        ],
        "Test2": {
            "data1": 1412008,
            "data2": "0000",
            "data3": "A",
            "data4": "0000",
        }
    }
    

    Waiting for your answer please reply me as soon as possible.

    JSON array is QVariantList

    JSON object is QVariantMap

    then create a QVariantLsit and insert your QVariantMaps

  • All my coming on my site through my contact form is sent by the email I signed up for my account creative with cloud.  I want to send through my gmail account

    All my coming on my site through my contact form is sent by the email I signed up for my account creative with cloud.  I want to spend to send through my gmail account, how can I do this?  and no I'm not just talking specify how email is attached to the contact form, I don't know what e-mail is sent to the email specified in the contact form.

    I want that he sent to [email protected] and because my business catalyst account is set up with yahoo, he tries to transmit the request to the gmail via the yahoo email address and the email of yahoo always returns a mailer damon saying he could not send the message to the gmail account.  I want to jump the middlemen and just connect my gmail account.

    any help would be appreciated

    Login to your Admin site > Site Manager > system email > Set Default "From" E-mail > add the gmail account

    Thank you

    Sanjit

  • How can I navigate through a series of images without having to create slides for each image?

    Hello

    I'm working on a project, where I want the user to navigate through a series of photo. Insofar as I have solved the problem by creating a slide for each image and assigning the next and back button to go to previous slide / next. The problem here, it's that sometimes there is a slight lag during the passage of the blade to slide. Is there an elegant way to solve this problem?

    Thank you

    Nik

    Hello and welcome,

    Do you want something like what I show here: http://blog.lilybiri.com/blog-after-posterous-clickclick ?

    Lilybiri

  • Create the directory in the operating system through PL/SQL

    Hi gurus,

    I'm creating a procedure to automate the creation of the external tables and Oracle (using the dynamic SQL) directories.

    I wonder if it is possible to create the directory in the operating system through the procedure.

    As in SQL more
    SQL > host mkdir/oracle/test

    THX,
    Levi Pereira

    http://www.Oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:4500682002852519:P11_QUESTION_ID:952229840241

  • I spent hours on web sites looking for advice clean my iMac - they were all dead ends.  I send a question to this 'Community' first, but must have done it badly because there was no trace of it.  I have the effect on this model beach ball

    I spent hours on web sites looking for advice clean my iMac - they were all dead ends.  I send a question to this 'Community' first, but must have done it badly because there was no trace of it.  I now have the beach on this computer ball effect.  Are there places I can delete cookies etc to help out?  Thank you for your help.

    horse8905

    Don't know what's happening, you do not give a lot of information, but if you have the constant beachballing (spinning wait cursor), which could mean that the hard drive is dying.

    Open Console.app in Applications > utilities. Filter, called "String Matching," right, high enter "I/o" without the quotes. What happens when you do this?

  • I would like to know if I can integrate a form that extends through a series of Web pages

    Hello, I would like to know if I can integrate a form that extends through a series of Web pages (for example, the series of form that begins on the homepage of 1800dentist.com) a site newly created the muse. Does anyone know a solution to create this same type of form in Adobe Muse built the site? I'd be fine with learn to code, I'm not sure where to start. Any help at all would be greatly appreciated!

    Hello

    There is no output from the solution of the box for this in Muse. However, if you host your site on Business Catalyst, then you can get it easily. For more information, please see the following post: Re: can break you BC forms in separate pages for surveys?

    Kind regards

    Aish

  • What is 64-bit JRockit?  (newbie question)

    Hello

    My apologies in advance if this seems ridiculously obvious, but we are running a 64-bit version of Suse linux 10 with WebLogic and JRockit JVM. We try to check if we use 64-bit JRockit, or if it's sort of a 32-bit version. The product documentation is not too helpful - the closest we can find is compatibility lists. I am confused because the only other things I can find to '64 bit JRockit' are actually JRockit Mission Control and JRockit real time and they seem to be different products.

    I have a suspicion that the JRockit we installed (which came with WebLogic Setup) is able to run under both platforms, but I can't find anything to confirm or deny this. I also thought that it would be possible to invoke the JVM with some arguments to change mode, but I couldn't find anything to confirm or deny this.

    Is it a 64 bit JRockit JVM?

    Thank you
    Sanfo

    There is no such thing as ridiculous questions! To know if you have the 32-bit or 64-bit JRockit install the 'java-version' command. The string of generation output will look something like "(construire R27.6.0-50_o-100423-1.6.0_05-20080626-2105-linux-ia32, mise à jour mode)" if it is a 32-bit JVM and correspondely something like "(build R27.6.0-50_o-100423-1.6.0_05-20080626-2105-linux-ia64, update mode)" for a 64-bit JRockit. You can find more JRockit versions here: http://www.oracle.com/technology/software/products/jrockit/index.html.

    Best regards
    Tuva

  • How to stop the series 'VISA read' the sends packets instead of bytes available.

    Dear Labvillians,

    Highlights:

    How can I stop series "VISA read" send me packages rather bytes?

    Background:

    I have a system which publishes series of 14 bytes on a semi-regular interval packets.

    At busy times, the producer of these these queues of data packets, effectively producing Super-paquets multiple of 14 times larger than 8 packages (112 bytes) bytes.

    My protocol handler is designed to process bytes, packets, or packets Super.

    Now, my request has multiple devices and the order of message processing is essential to the proper functioning.

    My observation is that read VISA waits until the end of a package / super package before moving the data to the application code. (See chart below)

    My expectation is that VISA read should give me bytes available, get too smart for itself and not wait for a package.

    .

    I noticed this on PXI, PC shipped, PSC and, more recently, cRIO

    I've experimented with Scan interface the cRIO rate, which helps to reduce the backlog of packages but don't decide to package under read byte.

    I understand that a solution is FPGA code write to handle and pass the bytes by R/T-FIFO, and there are some great examples on this site.

    Unfortunately, it does not help with FPGA devices not.

    I have also dabbled in the event based sequential reads, but he is evil on vxWorks devices.

    Any help is appreciated

    It is helpful to sometimes talk to yourself.

    I hope that is useful for someone sprinkle in the future

  • I have a personal account of CC.  I'll get a CC account through my work for my machine here soon.  In the meantime, I can run my CC on my work computer or which will cause problems in the future?

    I have a personal account of CC.  I'll get a CC account through my work for my machine here soon.  In the meantime, I can run my CC on my work computer or which will cause problems in the future?

    When you install the cloud on a computer, the use of the programs is related to the Adobe ID used for installation

    Then use the cloud with a different ID, you need to disconnect from your personal account and sign in to your professional account to install and use

    If you would eventually use only the ID of your work on your work computer, it would probably be best to completely remove your personal ID and Cloud programs before you install using your work ID.

    Sign out of your personal account... Uninstall... to run vacuuming...

    -http://helpx.adobe.com/creative-cloud/help/install-apps.html (and uninstall)

    -using the vacuuming after uninstalling and prior to the relocation is necessary

    -https://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html

    -Restart your computer... Log in to your account... Install

  • I would like to create a wavy line (the zig zag feature is exactly what I need here) to the outline

    I would like to create a wavy line (the zig zag feature is exactly what I need here) to the contour of the form and then fill it with a solid color. Any ideas?

    It's about what I want; However the ripple needs to be rounder and less peaked

    Screen Shot 2013-08-11 at 8.20.43 AM.png

    Barbara,

    If you want to create a gap between the wavy line and the underlying object, you can:

    (1) select the wavy line and object > decompose the appearance;

    (2) the tick of the feature new appearance Panel flyout, let slip under the stroke of origin and increase the weight of the race as you like and change the color to white.

    If you want to make the transparent gap, you can:

    (3) select the wavy line and object > decompose the appearance and separate;

    (4) select the path white and underlying object and in the transparency palette dialog box check do the with unchecked Clip opacity mask and mask Invert checked.

    It can be done in other ways, too.

Maybe you are looking for