Serial communication mark space

I need to send Mark and Space characters using serial communications. I have not found a way to do this with LabVIEW. Anyone have any knowledge on this topic?
Matthew Fitzsimons
Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

mfitzsimons wrote:
I need to send Mark and Space characters using serial communications. I have not found a way to do this with LabVIEW. Anyone have any knowledge on this topic?
I have found the answer to my own question. Using VISA Configure Serial Port you can set the parity to Mark or Space. Here is some information on mark and space:
Mark parity means that the parity bit is always set to the mark signal condition and likewise space parity always sends the parity bit in the space signal condition. Since these two parity options serve no useful purpose whatsoever, they are almost never used.
For example, when even parity is chosen, the parity bit is transmitted with a value of 0 if the number of preceding marks is an even number. For the binary value of 0110 0011 the parity bit would be 0. If even parity were in effect and the binary number 1101 0110 were sent, then the parity bit would be 1. Odd parity is just the opposite, and the parity bit is 0 when the number of mark bits in the preceding word is an odd number. Parity error checking is very rudimentary. While it will tell you if there is a single bit error in the character, it doesn't show which bit was received in error. Also, if an even number of bits are in error then the parity bit would not reflect any error at all.
Source: http://www.taltech.com/TALtech_web/resources/intro-sc.html
Matthew Fitzsimons
Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

Similar Messages

  • Can't mount Android phone; Why not?  {or, How to uninstall Mark/Space software?}

    Ladies and Gents...
    There's a Heritic in the building... 
    I'm a loyal T-Mobile customer, and I finally gave up on waiting for the iPhone.
    So, I'm moving from my LEMON of a BlackBerry 8900 over to an Android phone:  A Samsung Galaxy S II.
    But, I'm having trouble mounting it via USB cable to ONE of our TWO Mac Minis.
    It would seem that SOMETHING is wrong about the second one, but I sure can't figure out what to uninstall, reinstall, etc.
    Here follows my description of the two computers.
    {A description of what happens can be seen "down-page".}
    =====
    This is the description of my wife's Mac Mini.
    I'll call it the FIRST computer because things DO happen correctly on this machine.
    Hardware Overview:
      Model Name:    Mac mini
      Model Identifier:    Macmini1,1
      Processor Name:    Intel Core Duo
      Processor Speed:    1.66 GHz
      Number Of Processors:    1
      Total Number Of Cores:    2
      L2 Cache:    2 MB
      Memory:    2 GB
      Bus Speed:    667 MHz
      Boot ROM Version:    MM11.0055.B08
      SMC Version (system):    1.3f4
      Serial Number (system):    YM6090xxxxx
      Hardware UUID:    00000000-0000-1000-8000-00xxxxxxxxxx
    System Software Overview:
      System Version:    Mac OS X 10.6.8 (10K549)
      Kernel Version:    Darwin 10.8.0
    =====
    Here's my own computer.
    I'll call it the "Second" one, as it's the one that does NOT connect to the SGS2.
    Hardware Overview:
      Model Name:    Mac mini
      Model Identifier:    Macmini2,1
      Processor Name:    Intel Core 2 Duo
      Processor Speed:    2 GHz
      Number Of Processors:    1
      Total Number Of Cores:    2
      L2 Cache:    4 MB
      Memory:    4 GB
      Bus Speed:    667 MHz
      Boot ROM Version:    MM21.009A.B00
      SMC Version (system):    1.19f0
      Serial Number (system):    YM7291xxxxx
      Hardware UUID:    00000000-0000-1000-8000-00xxxxxxxxxx
    System Software Overview:
      System Version:    Mac OS X 10.6.8 (10K549)
      Kernel Version:    Darwin 10.8.0
    =====
    When I'm seated in front of my wife's Mac Mini,
    I select on the Android (Samsung Galaxy S II) the following:
    Settings > Wireless and Network > USB utilities.
    On the window that then appears, it states:
       USB mass storage
       Tap the button below to copy files between the computer and SD card.
       [Connect storate to PC]
    Note that at this point the micro USB cable has NOT yet been connected.
    I click the button, and this dialog box pops up:
       USB utilities
       Connect USB cable to use mass storage.
       [Cancel]
    I connect the cable, (and I do not press the button)...
    The tan or "baby-puke green" Android symbol pops up on the top third of the screen, with a USB symbol in the place of its upraised left hand.
    Beneath that is this text:
       USB connected
       You have connected your phone to your computer via USB.  Select the button below if you want to copy files between your computer and your android's USB storage
       [Connect USB storage]
    Please note:  The above DOES appear on our first Mac Mini (my wife's).
    However, it only briefly FLASHES on the screen when connected to (my own) second Mac Mini.
    I press the [Connect USB storage] button...
    I get this dialog box:
       Connect USB storage
       Connecting USB storage will stop some applications in use.  They may not be available until you disconnect USB storage.
       [ OK ]  [ Cancel ]
    I click on OK.
    The clockwise spinning circle briefly appears in the bottom of the screen, then my phone and micro SD card appear in the "DEVICES" section of an open Finder window of our 1st Mac Mini.  I can transfer files back and forth on our first Mac Mini.
    Remaining on the screen of the Android (SGS2) is the green android and this message:
       USB storage in use
       Before turning off USB storage, make sure you have unmounted ("ejected") your Android's USB storage from your computer.
       [Disconnect storage from PC]
    As indicated earlier, I can transfer files.  Instead, I now click the "eject" icon for both the microSD card and the phone, then click on the above "[Disconnect storage from PC] button.  All is copacetic on this Mac.
    NOW...    Moving over to MY Mac Mini...
    I repeat the above steps, but when prompted to attach the cable, the baby-puke green android briefly flashes on the screen, then a screen wipe takes him away and reverts to the following message:
       USB mass storage
       Tap the button below to copy files between the computer and SD card.
       [Connect storage to PC]
    nuts.
    I've been doing this over and over and over again, there is just no getting around this.  There is SOMETHING about my own Mac Mini that's causing a problem with mounting the Android phone.
    The only plausible expanation that I can think of is:
    Before R.I.M. released the Macintosh version of their "Blackberry Desktop Manager" application software, I had to purchase a compeditor's product and install it.
    {I'm sorry to say that I can not be certain of what the product was called;
    I _reasonably_sure_ that it was "Missing Sync for Blackberry" by "Mark/Space".
    A distant second possibility is "PocketMac for the Blackberry", but I can NOT be absolutely certain of either item.}
    To this day, I am not convinced that the first sync software I used was sucessfully or correctly UNinstalled.
    Does anyone have any ideas?
    What do I need to locate/fix/remove, and how, etcetera?
    =====
    p.s.:  It occurs to me that this is first and second a question of:
    - How, so long after the fact, do I delete all the old files that were associated with the "Mark/Space" software,
    and
    - Is the presence of the "Blackberry Desktop Manager" software on a Mac Mini's OS X 10.6.8 system going to create problems syncing to an Android?

    Safe Mode (booting while holding down Shift key) should have disabled all the Login items, as well as any non-Apple startup items, including the launchd items.
    I'm out of "Easy" ideas, and anything I say after this, is just wild ideas, so feel free to ignore me.
    Have you tried different USB cables?  Maybe there is an issue with the USB connector, or the way you have to bend things to access your Mac mini USB ports is different from accessing your Wife's Mac mini USB ports?
    Try alternate USB ports.  Maybe there is a bad/marginal port/connector.
    Try removing all your existing USB devices.  If you are using a USB keyboard and/or mouse, try using a different USB keyboard and/or mouse (maybe borrow them from your Wife's Mac mini).  Basically remove all other USB devices and replace the essential keyboard and mouse with known good ones).
    Desperate measure (Backup first before proceeding down this path).  Using a Firewire cable, boot your Wife's Mac mini into Firewire Target Mode.  Connect a Firewire cable between your Mac mini and your Wife's while your Wife's is in Target Mode.  Now boot your Mac mini holding down the "Option" key, and select your Wife's Mac mini's disk to boot from.   Essentially you will be using your hardware and your Wife's software to see if you have a hardware issue, or if it is a software issue.  That is to say if it works with your Mac mini booted from your Wife's boot disk, then your hardware is fine, but there is something wrong with your software.  If it does not work, then it is your hardware.
    Hopefully, you Wife will not kill you for even mentioning this.  ALSO, if you do try this, BACKUP, BACKUP, BACKUP first, especailly her system.  Not that anything will go wrong, but if it does, the last thing you want is an annoyed Wife :-)  BACKUP!

  • Fpga serial communication

    hello,
    i am using Crio and i am having a problem in serial communication even i flowed the exact steps from the exampls i always recive the same error which is "poly VI visa configure serial port: bad linkage to sub vi" is it a visa settup issue?? knowing that when i run NI MAX it indicates that there is a visa error under the peripheric and interfaces of my Crio.
    thax in advance.

    Can you show the code? With that error I would expect one or more broken wirtes.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Applet- RS232 serial communication

    Hi,
    Can any one tell how to do applet -RS232 serial communication?Do i signed applets? any secuirty policies to incorporated?
    Thanx
    /JP

    you need to install the jre, and place the win32.dll at JavaSoft\JRE\1.3.1_06\bin, that properties file place at JavaSoft\JRE\1.3.1_06\lib, comm.jar at JavaSoft\JRE\1.3.1_06\lib\ext\
    and in ur code try to use it to open ur com port
    public String test() {
    String drivername = "com.sun.comm.Win32Driver";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance(); driver.initialize();
    catch (Throwable th)
    {* Discard it */}
    drivername = "javax.comm.*";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance(); driver.initialize();
    catch (Throwable th)
    {* Discard it */}
    portList = CommPortIdentifier.getPortIdentifiers();
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier) portList.nextElement();
    if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    if (portId.getName().equals("COM2")) {
    //if (portId.getName().equals("/dev/term/a")) {
    try {
    serialPort = (SerialPort)
    portId.open("SimpleWriteApp", 2000);
    } catch (PortInUseException e) {}
    try {
    outputStream = serialPort.getOutputStream();
    } catch (IOException e) {}
    try {
    serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch (UnsupportedCommOperationException e) {}
    int i=0;
    while(true)
    try {
    messageString="hi";
    System.out.println(i++);
    outputStream.write(messageString.getBytes());
    } catch (IOException e)
    System.out.println(e);
    messageString=String.valueOf(e);
    return messageString;
    and yet u need to signed the applet
    1. Compile the applet
    2. Create a JAR file
    3. Generate Keys
    4. Sign the JAR file
    5. Export the Public Key Certificate
    6. Import the Certificate as a Trusted Certificate
    7. Create the policy file
    8. Run the applet
    Susan
    Susan bundles the applet executable in a JAR file, signs the JAR file, and exports the public key certificate.
    1. Compile the Applet
    In her working directory, Susan uses the javac command to compile the SignedAppletDemo.java class. The output from the javac command is the SignedAppletDemo.class.
    javac SignedAppletDemo.java
    2. Make a JAR File
    Susan then makes the compiled SignedAppletDemo.class file into a JAR file. The -cvf option to the jar command creates a new archive (c), using verbose mode (v), and specifies the archive file name (f). The archive file name is SignedApplet.jar.
    jar cvf SignedApplet.jar SignedAppletDemo.class
    3. Generate Keys
    Susan creates a keystore database named susanstore that has an entry for a newly generated public and private key pair with the public key in a certificate. A JAR file is signed with the private key of the creator of the JAR file and the signature is verified by the recipient of the JAR file with the public key in the pair. The certificate is a statement from the owner of the private key that the public key in the pair has a particular value so the person using the public key can be assured the public key is authentic. Public and private keys must already exist in the keystore database before jarsigner can be used to sign or verify the signature on a JAR file.
    In her working directory, Susan creates a keystore database and generates the keys:
    keytool -genkey -alias signFiles -keystore susanstore -keypass kpi135 -dname "cn=jones" -storepass ab987c
    This keytool -genkey command invocation generates a key pair that is identified by the alias signFiles. Subsequent keytool command invocations use this alias and the key password (-keypass kpi135) to access the private key in the generated pair.
    The generated key pair is stored in a keystore database called susanstore (-keystore susanstore) in the current directory, and accessed with the susanstore password (-storepass ab987c).
    The -dname "cn=jones" option specifies an X.500 Distinguished Name with a commonName (cn) value. X.500 Distinguished Names identify entities for X.509 certificates.
    You can view all keytool options and parameters by typing:
    keytool -help
    4. Sign the JAR File
    JAR Signer is a command line tool for signing and verifying the signature on JAR files. In her working directory, Susan uses jarsigner to make a signed copy of the SignedApplet.jar file.
    jarsigner -keystore susanstore -storepass ab987c -keypass kpi135 -signedjar SSignedApplet.jar SignedApplet.jar signFiles
    The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
    5. Export the Public Key Certificate
    The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
    The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
    5: Export the Public Key Certificate
    The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
    In her working directory, Susan uses keytool to copy the certificate from susanstore to a file named SusanJones.cer as follows:
    keytool -export -keystore susanstore -storepass ab987c -alias signFiles -file SusanJones.cer
    Ray
    Ray receives the JAR file from Susan, imports the certificate, creates a policy file granting the applet access, and runs the applet.
    6. Import Certificate as a Trusted Certificate
    Ray has received SSignedApplet.jar and SusanJones.cer from Susan. He puts them in his home directory. Ray must now create a keystore database (raystore) and import the certificate into it. Ray uses keytool in his home directory /home/ray to import the certificate:
    keytool -import -alias susan -file SusanJones.cer -keystore raystore -storepass abcdefgh
    7. Create the Policy File
    The policy file grants the SSignedApplet.jar file signed by the alias susan permission to create newfile (and no other file) in the user's home directory.
    Ray creates the policy file in his home directory using either policytool or an ASCII editor.
    keystore "/home/ray/raystore";
    // A sample policy file that lets a JavaTM program
    // create newfile in user's home directory
    // Satya N Dodda
    grant SignedBy "susan"
    permission java.security.AllPermission;
    8. Run the Applet in Applet Viewer
    Applet Viewer connects to the HTML documents and resources specified in the call to appletviewer, and displays the applet in its own window. To run the example, Ray copies the signed JAR file and HTML file to /home/aURL/public_html and invokes Applet viewer from his home directory as follows:
    Html code :
    </body>
    </html>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="600" height="400" align="middle"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1,2">
    <PARAM NAME="code" VALUE="SignedAppletDemo.class">
    <PARAM NAME="archive" VALUE="SSignedApplet.jar">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    </OBJECT>
    </body>
    </html>
    appletviewer -J-Djava.security.policy=Write.jp
    http://aURL.com/SignedApplet.html
    Note: Type everything on one line and put a space after Write.jp
    The -J-Djava.security.policy=Write.jp option tells Applet Viewer to run the applet referenced in the SignedApplet.html file with the Write.jp policy file.
    Note: The Policy file can be stored on a server and specified in the appletviewer invocation as a URL.
    9. Run the Applet in Browser
    Download JRE 1.3 from Javasoft
    good luck! [email protected]
    i already give u many tips, i use 2 weeks to try this to success, hopw that u understand that, a result of success is not important, the process of how to get things done is most usefull!

  • Having issues with simple serial communication.

     I followed a tutorial online to start learning basic serial communication. The tutorial involved shorting pins 1 and 3 on the Comm 1 port, and writing a simple program (attached). I edited the program a little, to show the varied results that I get when trying to write and read a simple phrase via serial port. 
    Could someone explain what causes the kind of result shown in "Serial Comm Example.png"? I believe it has to do with timing. Why would only parts of the phrase be transmitted?
    Thanks,
    Sarah
    Solved!
    Go to Solution.
    Attachments:
    Serial Comm Example.vi ‏30 KB
    Serial Comm Example.png ‏139 KB

    sarahzig wrote:
    The tutorial involved shorting pins 1 and 3 on the Comm 1 port
    Shouldn't that be pins 2 and 3?  On a standard DB-9 serial port, pin 2 is the Recieve and pin 3 is the Transmit.
    Now for your code...
    1. Move the Configure Serial Port to be before the loop.  You only need to configure the port once.
    2. Close the port after the loop.
    3. Handle your error after the close.
    4. Stop your loop on an error or the stop button was pressed.  You will need an OR in there.
    5. No need for the Flush Buffer function.  Remove it.
    6. Using the Bytes At Port is a dangerous thing.  It introduces all kinds of interesting race conditions.  Instead, tell the VISA Read to read the number of bytes you expect to read.
    6a. Alternatively, be sure to send an End Of Line character at the end of your sent data and set the number of bytes to read to something a lot more than you would ever expect to read.  The VISA Read will stop reading when it a) sees the number of bytes it was told to read, b) sees the termination character (currently enabled and set to a Line Feed, which is part of the End Of Line), or c) the timeout happens.  Whichever happens first.
    7. With 6, the wait is no longer needed.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • How to send data using serial Communication

    I want to make serial communication using RXTXcomm.jar file.I was written the code.From this I got the list of serial ports avilable on pc but then after when I was tring to send command to machine which is attached to port it didn't gave any reply.
    Tell me that how to send command to port?

    This is how I do it:// open port, get ownership
    SerialPort serialPort= (SerialPort)portId.open(APPLICATIONNAME, timeout);
    // no framing and no threshold
    serialPort.disableReceiveFraming();
    serialPort.disableReceiveThreshold();
    // communication speed, parity, stopbits and databits
    serialPort.setSerialPortParams(BAUDRATE, SerialPort.DATABITS_8,
         SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
    // no handshaking or other flow control
    serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);
    // timer on any read of the serial port
    serialPort.enableReceiveTimeout(TIMEOUT);
    // open streams for reading and writing
    InputStream is= serialPort.getInputStream();
    OutputStream os= serialPort.getOutputStream();... then you use the 'os' stream for writing and the 'is' stream for reading.
    kind regards,
    Jos

  • How do i open a new window? serial communication problem

    I am trying to make a serial communication interface, with changeable settings,
    but i wanted it to be that the settings to be openend in a new window, how am i able to do that.
    I tried to make a separate subvi, but unable to do that, here is my explanation in images and the vi files.
    -Just a student-
    Attachments:
    LVTerm.vi ‏50 KB

    Hello Nandha,
    SubVI's can be created by selecting the part that you want in the subVI and than select "create subVI" from the "Edit" menu.
    Or cut the selected part and open a new VI and paste in the code. Then you have to connect all the controls and indicators to your connector pane. To do this right click the icon in the upper right corner and "Show connector". Select a pattern that has enough connectors, my personal favorite is the 4x4x4. Select the wire tool and select a connector and then the control or indicator you want to connect. Try to keep controls to the left and indicator to the right.
    Now you have to figure out when you want to show the settings window. Is it necessary that the communication goes on during manipulation of the settings?
    Kind regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Changing the name of serial communication example in lab windows. Urgent help required

    I am using the example of getting data from rs 232 in lab windows. I want to use this in my final year project that's why I want to change its name that appears as  "serial communication example" how can I change its name and how can I make its exe file that will run on any system even without lab windows.
    How can I modify this example to save the data. I am very new to lab windows, I was using hyper terminal previously.

    I am not informed about the file format that hyperterminal uses.  However, CVI allows wiring to files.  To get a list of functions that deal with file handling, press <Ctrl-Shift-p> to get the "Find Function Panel" dialog.  Type in "file" and press the "Find" button.  This will open a list of funtions that contain "file" in their name.

  • Problem download: Java serial communication

    Hi,
    I need to work with Java serial communication api for Windows.
    As mentioned on SUN site, downloaded the following:
    1) comm2.0.3.zip, &
    2) rxtx-2.0-7pre1-i386-pc-mingw32.zip
    Extracting, unable to see win32com.dll & javax.comm.properties
    Can you help me?
    Thanks,
    Priya

    Hi priya
    There is problem in your downloaded s/w
    Download commAPI once again then try
    Read the readme file and follow the instruction

  • VISA Read function Read buffer problem in serial communication

    Hi,  I use VISA write and read function in serial communication app, the device continuously sends 0x00 if it is not receive a request from Labview program running on PC.
    And the request sent by labview is programmable. I met a weird problem, each time the request changes, the VISA read buffer output port still shows the last request firstly, from second time, shows the right request.
    It works like: Req code: ... 50, 51,51,51,50....;  VISA Read buffer: ...50, 50, 51, 51, 51, 51, 50....
    Please refer to the program.
    Attachments:
    readOne_test.vi ‏21 KB

    How are you running this?  You don't have a while loop around it.  Is it part of a larger VI?  Please don't tell me you are using the run continuously button.
    You don't have any wait statement between you VISA Write and your bytes at port.  So it is very likely the receive buffer is still empty since you didn't give your VI time to wait for the device to turn around and give a reply.  If you read 0 bytes, your VISA read string will be empty.  How does your decoder subVI (which you didn't include) handle an empty string?

  • To read 512 bytes using serial communication

    I want to read 512 bytes of data using rs 232 with the timeout of 30ms. I am using "Serial read with timeout -Palm.vi". Is there a limitation of the number of bytes I can specify to this VI?
    Thanks!!
    Attachments:
    Serial_Read_with_Timeout--Palm.vi ‏63 KB

    Hi software enigineer,
    It is not possible to transfer 512 bytes per 30 ms here. To do this would require a baud rate of 136533 (512*8/.03) and the maximum possible baud rate is 115000. The recommend baud rate for a serial transfer is 9600, which would mean transferring at most 36 bytes if the timeout is kept at 30ms. Moreover, there is usually some overhead involved in serial communication, and I would recommend sending a little less than the maximum 36 bytes every time too.
    On another note, I noticed that in your block diagram, you are using the Bytes at Serial Port vi. Definitely use the output of this vi to determine how many bytes to read at a time and read the bytes as they become available in the serial buffer rather than reading in a large buffer
    all at once. Continuously read and append the output until there are no more bytes to be read or until the termination character is read. This will avoid any lost data transmission due to overflow.
    Good luck with your program!
    Kileen Cheng
    Applications Engineer
    National Instruments

  • User-specified DAQ interruptions, instrument control through serial communication

    I'm working on an instrument control program, and I've run into a structural problem that I cannot figure out.
    The instrument in question is effectively a thermostat.
    The program has two functions:
    1.)  Background sampling to record temperature in a log over time.
    2.)  Adjust temperature according to user input
    The issue is that the instrument uses EIA-232 serial communication to talk to the PC.
    This prohibits simultaneous execution.  Attempting to send a command while the program is taking a sample will result in serial blockage errors.
    So the program must interrupt background sampling until the specified command has been completed.
    I can't figure out how to do this.
    My best idea was to create a manual pause control.  If the user wants to adjust the temperature, he hits a switch to pause the sampling, sends the appropriate command, then hits the switch again to reinitiate sampling.  This method will suffice, but is not ideal.
    Beyond that, I really have no idea how to prevent the two functions from running into each other.
    Help structuring this program would be greatly appreciated,
    Thank you

    Look into Semaphores (icons with traffic light glyphs)
    Set up a Semaphore resource to the COM port that is wired to two parallel structures.
    One structure would do the background polling, the other would handle setting changes.
    Prior to background poll, lock the resource, then unlock it after the poll. Likewise for the setting change command.
    When a resource is locked, the other process cannot access it until it is unlocked. Be sure to dispose of the Semaphore when ending the program.
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Attachments:
    SempahoreExample.jpg ‏256 KB

  • How to make Serial Communication in windows

    Hello, I want to do serial communication using windows platform.Sun provides javax.comm package for solaris & unix but there is no any provision for windows platform.Can I use it in Windows Platform.?

    http://forum.java.sun.com/thread.jspa?forumID=31&threadID=698876

  • Serial communication to read single character

    Hi! List,
    I want to read single character using serial communication(see the attached VI).
    The initialization of the serial port is taken care.
    TIA
    Attachments:
    Serial_comm[2_read_single_character].vi ‏42 KB

    I'm not sure I can understand you. If you want to read just one single character why can't you do so by just passing 1 to the Serial Read function as the number of bytes to read?
    The diagram of above VI doesn't make to much sense to me I have to admit.
    Rolf K
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Serial communication error

    hello,
    when i try to run my application(serial communication simple data transfer using loop back), labview evaluaton 8.6 showing the erron as attached.I dont understand what went wrong, it was working fine earlier.
    Thanks,
    hari
    Solved!
    Go to Solution.
    Attachments:
    laberror.JPG ‏85 KB

    Is that mean permission from NI? it was working fine, once i terminated the labview application abruptly when not responding since then i have this problem.
    hari

Maybe you are looking for

  • How do i get the app and the podcast option to show up on the side where it says music film ect..?

    In need to delete some podcasts and apps off my computer but its not giving me the option to click them I did something before to make them show up but ive forgotten I need help

  • [GREP] – find/replace only first comma in paragraph

    Is it possible to find and replace only the first comma in paragraph with certain paragraph style with end of paragraph character using GREP search? Or in other words – to split paragraph into two paragraphs by replacing the first comma in paragraph

  • Project Siena can't download?

    Hello everyone, When I try to Publish a simple Project Siena app it comes up with a dialogue saying Publish update required, I click download then it brings up an error message saying Download error, There was a problem updating Project Siena. Please

  • Software Update Problem and Apps Failing to Launch

    Ok, so, I have done a lot of hunting around to resolve this problem, (possibly problems) and tried some of the few fixes I have found, (though all were not exactly describing my problem). Said fixes were mentioned on here and on other sites/forums. A

  • User profiles deleted with migration assistant

    I just bought my daughter a new MacBook Air to replace her 3 year old MacBook Pro.  When she tried using Migration Assistant to transfer her files, it totally wiped out her user profiles so she couldn't log into the MacBoook Air any longer and she ha