How can I write bits through the COM1 serial port?

I'm trying to write bits through the serial port COM1.
Labview "Write VI" only writes everything in string. It seems. How can I write bit by bit through COM1?
Thank you,
Van

Serial transmission (COM port) protocol requires sending a group of bits at one time. You cannot just send one bit. Standard COM port settings must be either 7 or 8 data bits, 1 or 2 stop bits, etc... You have to group your bits 7 or 8 at a time. You could probably send a 0 byte or a 1 byte. This would be like sending 0000 0000 for a low bit and 0000 0001 for a high bit. Your receiving end would have to know how to interpret what you are sending if you choose this method. Of course you have to convert your byte into a string before sending to COM port. Wire a U8 data type to a Build Array input. Then wire the array output to a Byte Array to String input. The output of this function will be the character representation of your byte suitable for sending acr
oss a serial port.
- tbob
Inventor of the WORM Global

Similar Messages

  • I want to write and read a hex file from the flash buffer of the microcontroller through the USB serial port

    hello sir,
    I am developing a GUI screen from that i want to write and read a hex file from the flash buffer of the microcontroller through the USB serial port. the driver i am using is FTDID2XX driver.if anyone having examples of loading file through serial port.Please reply me .
    Thanks

    Looks like you should post your request in the LabVIEW forum, this one here preferentially is for LabWindows/CVI...

  • How can i write and read the same data

    hi,
             i have attached my program to this mail. i have some problems in this program.
    problems:
    1. I want to select the threshold for the rms,varience and s.d.
    But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
     when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
    Once it come down the lower threshold value the output should be stopped.
    2. I want to write this in to a  file and i want to read this file. is this possible or not. 
                please try to help me i am very new with lab view6i
           REGARDS
    CHAMARTHY KOMAL DILEEP.
       [email protected]
    Attachments:
    dileep.vi ‏93 KB

    The easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.
    Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.
    Hope this helps!
    Jarrod S.
    National Instruments
    Attachments:
    dileep_example.vi ‏61 KB

  • How can I create arrays through the same recursive process?

    Hello again!
    I want to create some arrays with names like array1, array2, array3 etc
    through the same for loop.
    Do you know how this can be done? Thanks!
    for (int i = 0; i < 32; i++) {
    byte[] array???=new byte[400];
    }

    I want to create some arrays with names like array1,
    array2, array3 etc
    through the same for loop.
    Do you know how this can be done? Thanks!
    for (int i = 0; i < 32; i++) {
    byte[] array???=new byte[400]; You cannot create new names during runtime (array1, array2 are names).
    You can create a map that associates Strings with byte arrays though:Map<String, byte[]>  map= new HashMap<String, byte[]>();
    for (int i= 0; i < 32; i++)
       map.put("array"+i, new byte[400]);
    // get array associated with array26:
    int j= 26;
    byte[] oneOfTheArrays= map.get("array"+j);kind regards,
    Jos

  • How can I write outside of the targetCompositeChannels.bound?

    I want to warp a layer and store the result in the targetCompositeChannels. Because the result may be so large that some
    pixels are outside the bound of the targetCompositeChannels, the result can not be stored completely.
    PS: In the sample code "PoorMansTypeTool", in a image 100*100, when i set the fontsize large, i.e. 32, the result is only a part of "HELLO WORLD". the plugin doesn't write outside the bound.
    what should i do?
    Thanks in advance!

        JenJenTen,
    I understand that having a preset text that you did not want can be a bit frustrating when sending out text. To clarify, is the preset message like a signature at the end of your text? Does this only happen in text messages or when your send emails also? Is your SMS delivery confirmation on? Messaging>Settings>SMS delivery confirmation.
    LindseyT_VZW
    Follow us on Twitter @VZWSupport

  • Have a 2 year old ipad2 and while speakers work fine I can no longer get sound through headphones, how can I get sound through the headphones?

    I have a two year old ipad2 and while the speakers work ok I can no longer get any sound through the headphones? If any one has any suggestions on how I can get sound to come out of the headphones I would be grateful.

    System Preferences --> Sound --> uncheck the mute button next to the Output volume (assuming it is set).  Or move the Output volume slider.

  • How can i write a vi in using parallel port for digital inputs

    Dear all,
    i am a beginner user of LabVIEW and i want to write a vi in using parallel port for digital I/O. After reading the article "Using the Parallel Port in LabVIEW
    " and download the parallel.zip, i know how to write the vi for output, but i still don't know how to write the input one.i've try to use a Inport.vi to test, but nothing change when i set pin2-9 to high. (my computer:win2K & LabVIEW 6.1)
    Can anybody teach me how to write it?
    Can anyone write the vi for me too?
    Thanks all!
    p.s.i've already install the "accessHW.exe"

    Are you using VISA or the accessHW VIs? You may need to goto the bios and set the parallel port to run in spp mode or standard mode. This is the simpliest configuration and where you should start.
    As far as writing the VI goes, just copy the diagram out of the tutorial you mentioned.

  • How can a CVI module access the UUT serial number already stored in TestStand?

    I'm using the parallel model and I need to program each of my UUT's EEPROM with its serial number. I know that
    TestStand has the serial number and I've gathered from the Developer exchange that it is stored in RunState.Caller.Locals.UUT.SerialNumber, but how does my CVI module access it? Can it be passed to the module, if so, how? or what is the exact form of the TestStand API function that can be used to access the serial number. Thank-you for any suggestions.

    Hi lynx,
    if you have a look at the way in which the parallel and batch process models work, they're a two stage process model, i.e. the process model sequence your (main) sequence sees is called by an another process model. In this case, RunState.Caller on it's own only takes you up one level, but RunState.Caller.RunState.Caller will take you to the top level process model. When dealing with multi-UUT models, it depends on which serial number you're after (parallel serial numbers are stored in the TestUUTs model entry point->Locals.ModelData.TestSockets[0].UUT.SerialNumber
    where the [0] signifies the testsocket you're looking at (i.e. if it's the third testsocket, use [2].)
    batch serial numbers are stored in the same place, with the addition of the BatchSerialNumber (i.e. TestUUTs model entry point->Locals.ModelData.TestSockets[0].UUT.BatchSerialNumber, however there is also a BatchSerialNumber in TestUUTs model entry point->Locals.ModelData.BatchSerialNumber which is the same as the above one.
    You can always use the RunState.Root to get to the main calling process model, and in the case of the parallel and batch process models, the serial numbers are passed down from the top level execution entry point anyway into RunState.Root.Parameters.ModelData.TestSockets[0].UUT.SerialNumber
    (otherwise, if you're very buried in sequences, i.e. your mainsequence calls another which calls another etc etc, your call gets longer and longer - in cases like this I tend to use a Parameter, and pass the serial number down through the levels)
    If you want the data as if it came from the top level, since the LabVIEW adapter needs to see the data in a particular place, you can also use
    RunState.Root.Locals.UUT.SerialNumber.
    The quickest way I've found to find stuff is to create a new sequence file with just a label step in it. Set the sequence file to use the appropriate process model you're interested in, and set the label step to a breakpoint. You can then look at the context tab once you've set the sequence running from your desired execution entry point, and browse away.
    There's some great documentation in \Components\NI\Models\TestStandModels\TestStandProcessModels.PDF
    explaining how the process models actually work.
    A word of warning though - if you decide to change the serial numbers on the fly (one particular case is if you needed a bar code serial number which included information on failures for example), because the serial number is available in several places, you need to check where the report generation is picking up it's serial number information from.
    Hope that helps
    Sash.
    // it takes almost no time to rate an answer

  • How can I write and read the LPT within JAVA?

    Hello!
    I'm new to JAVA.
    I made a simple JAVA application with few buttons and labels with NetBeans.
    I add ActionListener to button but don't know to write the handling code that should to write a byt to the DATA register in the LPT port of the PC box.
    From where can I get the code for this, maybe within JDK documentation?
    Any advices will be appreciated!
    Regards, csPaul

    I have ever programmed an LPT data sender using VB.net and inpout32.dll(will be very easy to search using google). for Java, try this:
    http://www.geocities.com/Juanga69/parport/
    I've just download the sample also, wanna try to...
    And some people say that JNI allow us to embedd C++ code within our Java program.. I don't know about this yet...

  • TS3991 How can I send messages through the messages icon on my Ipad 3?

    I see that there is a messages icon ( for short message service) on my Ipad-3 however I don't seem to be able to use it the way I do it on my Iphone.
    Is there a possibility to use this icon on the Ipad as well?

    The Messages icon on your iPad is not for "short message service" (more commonly known as SMS) - it is for Apple's iMessage service.
    See https://www.apple.com/ios/messages/ for how to set it up.

  • How can I write someting into the Code Library

    have developed Program for continious Pattern Streaming from and to Hard Disk in Microsoft Visual C++.Net;up to 280 Mbit/s Outputrate and 130 Mbit/s Inputrate

    Wow! sounds amazing, if you just go to the link on the left to code library there is a link at the bottom to submit a program, just zip it up and submite it. I'll look for it!
    Gazoo!

  • How can i write a pattern to a output port of NI PCI 6503 with Traditional NI DAQ 7.0 and Visual Basic 6.0?

    Hello, i'm using a NI PCI-6503 (with CB50LP accesory) to write digital patterns to one of the output ports. Can i do it directly from NIDAQ7.0?
    I know  some Visual Basic 6.0 functions to configure a par as output and to write a pattern to a port, but i don't know how run it.
    I've read some examples from "Help" (C:\Program Files\National Instruments\NI-DAQ\Examples\VBasic\Do) but I can't measuring TTL levels on my CB50LP accesory.
                    Thanks!!

    Hello,
    What is your buffer size ? The buffer should be 0 or greater than 2. You can get this error if your buffer size is equal to 1.
    Regards,
    Isabelle
    National Instruments France
    Isabelle
    Ingénieur d'applications
    National Instruments France

  • How can i write a blog in the XI forum.....

    i want to write a blog....
    i have created a scenario which i feel ...may be helpful for many...
    how can i write that in the XI forum.....
    and do my blog need to examined by some authority

    Hi,
    Check this
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/community/gettingStartedWith+Blogs&
    Regards,
    Chandra

  • How can i write the floats value in Unitronics vision230 plc using modbus Ethernet

           How can i write the Float value in unitronics Vision230 PLC usinsg modbus ethernet (MB Ethernet Master Query.vi) I  read and write  the 32 bit register,  for e.g i want to write the 23.45 value on 2nd add. of MF. And MF register is 32 bit register. I  read and write  the 32 bit register.
    Narendra.
    Solved!
    Go to Solution.

     Thanks Amit for your solution but i can not use the string to write the value because  MB Ethernet master Query.vi only accepet the integer value its not take string values or any other i.e floats values etc.....otherwise i have  no problem to write or read the 32 bit register values , only problem is that the MB Ethernet master Query.vi only accept the integer value there4 how can write the float value.
    Narendra
    Message Edited by Artemistech on 01-30-2009 11:06 PM

  • How can i write the data to PIC16F819 using labview?

    how can i write the data to PIC16F819 using labview?
    Need help!
    im using labview in gathering the datas that i need to right to the PIC, then after getting all the datas i am using another program which is ICD2 in order to write it to the PIC. Is it possible to do this task through LV? coz we are spending a lot of time transferring the data from LV to ICD2 manually and its prone to mistake as well.
    any suggestion?
    thanks,
    Pedz

    LabVIEW does not currently have a built-in method to communicate with
    i2c, but there are other vendors that sell devices to communicate in
    this manner with LabVIEW development kits.  One that I know of is
    from MCC... here is a link:  http://www.mcc-us.com
    They sell a device called iPort, and then you can buy LabVIEW VIs to go with it.  I hope this is helpful to you!
    john m

Maybe you are looking for