Setting Stop Bits for Serial Port

I am using the serial communication VI (in examples/instr/smplserl.llb) to send hexidecimal commands through the serial port. I am hooked up to an oscilloscope to make sure that the commands are being sent correctly, and I have found that no matter what I set the stop bits to, I always get two stop bits. I need only one stop bit. Is there any way to fix this?

How would I do this to my attached example? We have LabView version 6.0
Attachments:
SerialComm1.vi ‏45 KB

Similar Messages

  • Slmodem/wvdial: cannot get information for serial port

    Hi,
    I have the following problem when trying to set up my Intel WinModem with arch:
    After configuring wvdial I get an error when trying to launch it
    /dev/ttySL0: Cannot get information for serial port
    Does anybody know about this problem? There is absolutely no information about it on the internet.
    Thanks for any help!!!!!

    Hi,
    I have the following problem when trying to set up my Intel WinModem with arch:
    After configuring wvdial I get an error when trying to launch it
    /dev/ttySL0: Cannot get information for serial port
    Does anybody know about this problem? There is absolutely no information about it on the internet.
    Thanks for any help!!!!!

  • How can I define the start bit in Serial Port Init VI?

    I don't know if the number of start bits of the Serial Port Init VI match with the serial communications requirements of the device I need to communicate with.
    Is there any way of modifying this parameter?

    LabVIEW uses the standard WindowsAPI for all of its serial functions. As such, LabVIEW does not support a customizable start bit since the native serial driver does not.

  • Asserting the RTS signal for serial ports

    I've posted a few times, about asserting the DTR signal line for the serial
    ports.
    To start off with, i have now come to the realization that I was STUPIDLY
    trying to set the wrong thing... I needed to set the RTS, not the DTR!!!
    Most of the replies I got said to use the IN PORT and OUT PORT vi's, from
    the advanced, memory/portI/O palette.
    When i had a fiddle around with these, and looked them up in more depth, I
    found a few things...
    1. I have read a few times, that these are not portable, because of machine
    dependancy... Can anyone tell me how portable they are? Such as, are they
    fine for all Intel based architechure's, or what
    2. I found that if I initialize the serial port, using the Serial Port
    Init.vi, and then use
    the Out Port.vi, to set the RTS, by addressing the
    register at 0x2FC, for COM 2, the next thing I did, which was write to the
    serial port, hung. When I highlighted execution, it was stuck in the Serial
    Write.vi Can anybody tell me what I'm doing wrong?
    Your help would be greatly appreciated!
    Slade Squire
    Programmer
    Rectifier Technologies Pacific
    Melbourne, Australia
    [email protected]

    You should read replies to your posts more carefully since Craig Graham have
    pointed out that VI to use to assert RTS and DTR lines of a serial port. You
    also should search this group for the RS485 and RTS/DTR topic; it is a
    recurrent question and there are some pitfalls on toggling RS485 direction
    in LabVIEW.
    As for RTS flow control, you will see something only when the input buffer
    of the serial port is full, in which case RTS is asserted to signal the
    transmitter to pause transmission.
    Jean-Pierre Drolet
    "Slade Squire" a �crit dans le message de news:
    [email protected]...
    > Something else I forgot to mention....
    >
    > When I try and set RTS in the flow control parameter of Serial Port
    Init.vi,
    > it doesn't do anything!
    > Why?
    > (I know it doesn't do anything, because I have an oscilliscope set up on
    the
    > end of the com cable, wired to the RTS pin)
    >
    > "Slade Squire" wrote in message
    > news:[email protected]...
    > > I've posted a few times, about asserting the DTR signal line for the
    > serial
    > > ports.
    > > To start off with, i have now come to the realization that I was
    STUPIDLY
    > > trying to set the wrong thing... I needed to set the RTS, not the
    DTR!!!
    > >
    > > Most of the replies I got said to use the IN PORT and OUT PORT vi's,
    from
    > > the advanced, memory/portI/O palette.
    > >
    > > When i had a fiddle around with these, and looked them up in more depth,
    I
    > > found a few things...
    > >
    > > 1. I have read a few times, that these are not portable, because of
    > machine
    > > dependancy... Can anyone tell me how portable they are? Such as, are
    they
    > > fine for all Intel based architechure's, or what
    > >
    > > 2. I found that if I initialize the serial port, using the Serial Port
    > > Init.vi, and then use the Out Port.vi, to set the RTS, by addressing the
    > > register at 0x2FC, for COM 2, the next thing I did, which was write to
    the
    > > serial port, hung. When I highlighted execution, it was stuck in the
    > Serial
    > > Write.vi Can anybody tell me what I'm doing wrong?
    > >
    > > Your help would be greatly appreciated!
    > >
    > > --
    > > Slade Squire
    > > Programmer
    > > Rectifier Technologies Pacific
    > > Melbourne, Australia
    > > [email protected]
    > >
    > >
    > >
    >
    >
    LabVIEW, C'est LabVIEW

  • Reading and Writing For Serial Port (RS232)

    Hi there;
    I want to send data from my comport to a device and take data from there. I use Windows operating system. I looked at a bit javax.comm and RxTx.
    Firstly do i have to use RxTx for my project because of i am using Windows operating system?And;
    Where should i began to start simply send and receive data via RS232?
    Edited by: furkankamaci on Feb 14, 2009 8:05 AM

    Use RxTx and follow its examples.

  • DVD St. Pro won't stop asking for serial number even after I've entered it.

    Hey everyone,
    I just bought a new copy of Final Cut Studio 2, and I've installed everything. I've noticed, though, that DVD Studio Pro keeps asking me to enter the serial number upon startup even though I have already entered it multiple times. Any ideas?
    -William

    Try this: http://discussions.apple.com/thread.jspa?messageID=4582284&#4582284

  • Virtual serial port??? Vista 64 bit, usb dongle, palm 755p verizon

    I have a new 64 bit Vista OS and I'm having all the same problems everyone else is.  I can't hotsync using the cable.  I purchased the bluetooth dongle (Kensington) that many have said works.  My phone recognizes the PC.  My instructions on the phone for the hot sync using bluetooth instructs me to set up a virtual serial port.  The instructions are not very clear.  This is where it falls apart for me.  Can anyone explain how to set up this virtual serial port?  Thanks.
    Post relates to: Treo 755p (Sprint)
    This question was solved.
    View Solution.

    Well I'm happy to report a successful solution.  At the recommendation of some other threads I went out and bout and ioGear GBU321 USB Bluetooth adapter and setup was a breeze and it works (although it is SLOOOOOOW compared to a cable hookup, allow some time and plug your treo in during your first sync).
    To setup you do the following (And this may also work for your Kensington):
    Insert the driver CD
    Insert the dongle when asked.
    Install the drivers
    Pair your device.  Basically go to the Bluetooth setup screen on the Palm and select "Trusted Devices".  You'll find the bluetooth adapter, select it and then either the palm or the PC will either provide or ask for a paring code.  The instructions will guide you through but basically you'll want to make sure the same numbers are entered on both screens (this prevents you from accidentally pairing with some random nearby computer)
    This will actually set up your virtual port for you. 
    You then go into the hotsync manager and click "serial" and select the port just created from the pairing process. 
    If you don't know what port was created bring up "Control Panels" and select "Phone and Modem" (Assuming you are in "Classic View").
    Click on the modem tag and you'll see something like "Standard Modem Over Bluetooth Link" and next to it will be the assigned port.
    I hope that helps.  I know I was relieved to not have to trash either my Palm or my PC (Although when the Pre or an iPhone with a physical keyboard comes out all bets are off)
    Post relates to: Treo 755p (Verizon)

  • How to access the serial port on sdk 3.1.3 ?

    Hi all,
    I know that accessing serial port is not possible on firmware 2.x for non jailbroken iPhones.
    But what about firmware 3.0?
    Apple has focused firmware 3.0 on accessories, through bluetooth or through serial port. So, accessing serial port should be possible.
    But I can't find any documentation / sample code for that.
    Would you please help me?
    Regards,
    Alx
    PS: I tried to read the port /dev/cu.iap and get this message:
    Error opening serial port /dev/cu.iap - Permission denied(13).
    Looks bad.

    Yes I am enregistred in the Mad For iPod program?
    And I try to communique with my accessorie
    So the Code
    +*// SerialPortsModuleAppDelegate.m*+
    +*// SerialPortsModule*+
    +*// Created by BPO iMac on 08/02/10.*+
    +*// Copyright _MyCompanyName_ 2010. All rights reserved.*+
    +*#import "SerialPortsModuleAppDelegate.h"*+
    +*#import <fcntl.h>*+
    +*@implementation SerialPortsModuleAppDelegate*+
    +*@synthesize window;*+
    +*- (void)applicationDidFinishLaunching:(UIApplication *)application {*+
    +*// Override point for customization after application launch*+
    +*[window makeKeyAndVisible];*+
    +* portSerie = [SerialManager alloc];*+
    +* [portSerie init];*+
    +* int nb_port;*+
    +* nb_port = [portSerie findRS232Ports];*+
    +* NSString path_port;+
    +* path_port = [NSString alloc];*+
    +* int num_port;*+
    +* if(nb_port!=0)*+
    +* {*+
    +* num_port=0;*+
    +* path_port=[portSerie pathAtIndex:num_port];*+
    +* int resultat= [portSerie openInput:path_port baudrate:9600 bits:8 parity:0 stopbits:1 flags:O_RDONLY];*+
    +* if(resultat==-1)*+
    +* {*+
    +* NSLog(@"Communication Error");*+
    +* }*+
    +* resultat= [portSerie openOutput:path_port baudrate:9600 bits:8 parity:0 stopbits:1];*+
    +* if(resultat==-1)*+
    +* {*+
    +* NSLog(@"Communication Error");*+
    +* }*+
    +* }*+
    +* [path_port release];*+
    +* *+
    +*- (void)dealloc {*+
    +*[window release];*+
    +*[super dealloc];*+
    @end
    +*// SerialPortsModuleAppDelegate.h*+
    +*// SerialPortsModule*+
    +*// Created by BPO iMac on 08/02/10.*+
    +*// Copyright _MyCompanyName_ 2010. All rights reserved.*+
    +*#import <UIKit/UIKit.h>*+
    +*#import "SerialManager.h"*+
    +*@interface SerialPortsModuleAppDelegate : NSObject <UIApplicationDelegate> {*+
    +*UIWindow window;+
    +* SerialManager portSerie;+
    +*@property (nonatomic, retain) IBOutlet UIWindow window;+
    @end
    +*// SerialManager.m*+
    +*// K3 Tools*+
    +*// Created by Kok Chen on 4/28/09.*+
    +*// Copyright 2009 Kok Chen, W7AY. All rights reserved.*+
    +*#import "SerialManager.h"*+
    +*#include <unistd.h>*+
    +*#include <termios.h>*+
    +*#include <sys/ioctl.h>*+
    +*#include <IOKit/IOKitLib.h>*+
    +*#include <IOKit/serial/IOSerialKeys.h>*+
    +*#import <fcntl.h>*+
    +*#import <UIKit/UIKit.h>*+
    +*@implementation SerialManager*+
    +*- (id)init*+
    +* self = [ super init ] ;*+
    +* if ( self ) {*+
    +* termiosBits = -1 ;*+
    +* inputfd = outputfd = -1 ;*+
    +* useTermiosThread = NO ;*+
    +* needsNotification = NO ;*+
    +* termioLock = [ [ NSLock alloc ] init ] ;*+
    +* }*+
    +* return self ;*+
    +*static int findPorts( CFStringRef *stream, CFStringRef *path, int maxDevice, CFStringRef type )*+
    +*kernreturnt kernResult ;*+
    +*machportt masterPort ;*+
    +* ioiteratort serialPortIterator ;*+
    +* ioobjectt modemService ;*+
    +*CFMutableDictionaryRef classesToMatch ;*+
    +* CFStringRef cfString ;*+
    +* int count ;*+
    +*kernResult = IOMasterPort( MACHPORTNULL, &masterPort ) ;*+
    +*if ( kernResult != KERN_SUCCESS ) return 0 ;*+
    +* *+
    +*classesToMatch = IOServiceMatching( kIOSerialBSDServiceValue ) ;*+
    +*if ( classesToMatch == NULL ) return 0 ;*+
    +* *+
    +* // get iterator for serial ports (including modems)*+
    +* CFDictionarySetValue( classesToMatch, CFSTR(kIOSerialBSDTypeKey), type ) ;*+
    +*kernResult = IOServiceGetMatchingServices( masterPort, classesToMatch, &serialPortIterator ) ;*+
    +* // walk through the iterator*+
    +* count = 0 ;*+
    +* while ( ( modemService = IOIteratorNext( serialPortIterator ) ) ) {*+
    +* if ( count >= maxDevice ) break ;*+
    +*cfString = IORegistryEntryCreateCFProperty( modemService, CFSTR(kIOTTYDeviceKey), kCFAllocatorDefault, 0 ) ;*+
    +*if ( cfString ) {*+
    +* stream[count] = cfString ;*+
    +* cfString = IORegistryEntryCreateCFProperty( modemService, CFSTR(kIOCalloutDeviceKey), kCFAllocatorDefault, 0 ) ;*+
    +* if ( cfString ) {*+
    +* path[count] = cfString ;*+
    +* count++ ;*+
    +* }*+
    +* }*+
    +*IOObjectRelease( modemService ) ;*+
    +* IOObjectRelease( serialPortIterator ) ;*+
    +* return count ;*+
    +*// return number of ports*+
    +*- (int)findPorts:(CFStringRef)type*+
    +* CFStringRef cstream[64], cpath[64] ;*+
    +* int i ;*+
    +* *+
    +* numberOfPorts = findPorts( cstream, cpath, 64, type ) ;*+
    +* for ( i = 0; i < numberOfPorts; i++ ) {*+
    +* stream = [ [ NSString stringWithString:(NSString*)cstream ] retain ] ;*+
    +* CFRelease( cstream ) ;*+
    +* path = [ [ NSString stringWithString:(NSString*)cpath ] retain ] ;*+
    +* CFRelease( cpath ) ;*+
    +* }*+
    +* return numberOfPorts ;*+
    +*- (int)findPorts*+
    +* return [ self findPorts:CFSTR( kIOSerialBSDAllTypes ) ] ;*+
    +*- (int)findModems*+
    +* return [ self findPorts:CFSTR( kIOSerialBSDModemType ) ] ;*+
    +*- (int)findRS232Ports*+
    +* return [ self findPorts:CFSTR( kIOSerialBSDRS232Type ) ] ;*+
    +*- (NSString)streamAtIndex:(int)n+
    +* if ( n < 0 || n >= numberOfPorts ) return nil ;*+
    +* return stream[n] ;*+
    +*- (NSString)pathAtIndex:(int)n+
    +* if ( n < 0 || n >= numberOfPorts ) return nil ;*+
    +* return path[n] ;*+
    +*// common function to open port and set up serial port parameters*+
    +*static int openPort( NSString *path, int speed, int bits, int parity, int stops, int openFlags, Boolean input )*+
    +* int fd, cflag ;*+
    +* struct termios termattr ;*+
    +* *+
    +* fd = open( [ path cStringUsingEncoding:NSASCIIStringEncoding], openFlags ) ;*+
    +* if ( fd < 0 ) return -1 ;*+
    +* *+
    +* // build other flags*+
    +* cflag = 0 ;*+
    +* cflag |= ( bits == 7 ) ? CS7 : CS8 ; // bits*+
    +* if ( parity != 0 ) {*+
    +* cflag |= PARENB ; // parity*+
    +* if ( parity == 1 ) cflag |= PARODD ;*+
    +* }*+
    +* if ( stops > 1 ) cflag |= CSTOPB ;*+
    +* *+
    +* // merge flags into termios attributes*+
    +* tcgetattr( fd, &termattr ) ;*+
    +* termattr.c_cflag &= ~( CSIZE | PARENB | PARODD | CSTOPB ) ; // clear all bits and merge in our selection*+
    +* termattr.c_cflag |= cflag ;*+
    +* *+
    +* // set speed, split speed not support on Mac OS X?*+
    +* cfsetispeed( &termattr, speed ) ;*+
    +* cfsetospeed( &termattr, speed ) ;*+
    +* // set termios*+
    +* tcsetattr( fd, TCSANOW, &termattr ) ;*+
    +* return fd ;*+
    +*- (int)openInput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags*+
    +* return ( inputfd = openPort( pathname, speed, bits, parity, stops, openFlags, YES ) ) ;*+
    +*- (int)openInput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops*+
    +* return ( inputfd = openPort( pathname, speed, bits, parity, stops, ( O_RDONLY | O_NOCTTY | O_NDELAY ), YES ) ) ;*+
    +*- (int)openOutput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags*+
    +* return ( outputfd = openPort( pathname, speed, bits, parity, stops, openFlags, NO ) ) ;*+
    +*- (int)openOutput:(NSString*)pathname baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops*+
    +* return ( outputfd = openPort( pathname, speed, bits, parity, stops, ( O_WRONLY | O_NOCTTY | O_NDELAY ), NO ) ) ;*+
    +*- (void)closeInput*+
    +* if ( inputfd > 0 ) close( inputfd ) ;*+
    +*- (void)closeOutput*+
    +* if ( outputfd > 0 ) close( outputfd ) ;*+
    +*- (int)inputFileDescriptor*+
    +* return inputfd ;*+
    +*- (int)outputFileDescriptor*+
    +* return outputfd ;*+
    +*- (int)getTermios*+
    +* int bits ;*+
    +* *+
    +* if ( inputfd > 0 ) {*+
    +* [ termioLock lock ] ;*+
    +* ioctl( inputfd, TIOCMGET, &bits ) ;*+
    +* [ termioLock unlock ] ;*+
    +* return bits ;*+
    +* }*+
    +* return 0 ;*+
    +*- (void)setRTS:(Boolean)state*+
    +* int bits ;*+
    +* if ( inputfd > 0 ) {*+
    +* [ termioLock lock ] ;*+
    +* ioctl( inputfd, TIOCMGET, &bits ) ;*+
    +* if ( state ) bits |= TIOCM_RTS ; else bits &= ~( TIOCM_RTS ) ;*+
    +* ioctl( inputfd, TIOCMSET, &bits ) ;*+
    +* [ termioLock unlock ] ;*+
    +* }*+
    +*- (void)setDTR:(Boolean)state*+
    +* int bits ;*+
    +* if ( inputfd > 0 ) {*+
    +* [ termioLock lock ] ;*+
    +* ioctl( inputfd, TIOCMGET, &bits ) ;*+
    +* if ( state ) bits |= TIOCM_DTR ; else bits &= ~( TIOCM_DTR ) ;*+
    +* ioctl( inputfd, TIOCMSET, &bits ) ;*+
    +* [ termioLock unlock ] ;*+
    +* }*+
    +*// IO Notifications*+
    +*// prototype for delegate*+
    +*- (void)port:(NSString*)name added:(Boolean)added*+
    +* if ( delegate && [ delegate respondsToSelector:@selector(port:added:) ] ) [ delegate port:name added:added ] ;*+
    +*// this is called from deviceAdded() and deviceRemoved() callbacks*+
    +*- (void)portsChanged:(Boolean)added iterator:(ioiteratort)iterator*+
    +* ioobjectt modemService ;*+
    +* CFStringRef cfString ;*+
    +* while ( ( modemService = IOIteratorNext( iterator ) ) > 0 ) {*+
    +* cfString = IORegistryEntryCreateCFProperty( modemService, CFSTR( kIOTTYDeviceKey ), kCFAllocatorDefault, 0 ) ;*+
    +* if ( cfString ) {*+
    +* [ self port:(NSString*)cfString added:added ] ;*+
    +* CFRelease( cfString ) ;*+
    +* }*+
    +* IOObjectRelease( modemService ) ;*+
    +* }*+
    +*// callback notification when device added*+
    +*static void deviceAdded(void *refcon, ioiteratort iterator )*+
    +* ioobjectt modemService ;*+
    +* *+
    +* if ( refcon ) [ (SerialManager*)refcon portsChanged:YES iterator:iterator ] ;*+
    +* else {*+
    +* while ( modemService = IOIteratorNext( iterator ) ) IOObjectRelease( modemService ) ;*+
    +* }*+
    +*static void deviceRemoved(void *refcon, ioiteratort iterator )*+
    +* ioobjectt modemService ;*+
    +* *+
    +* if ( refcon ) [ (SerialManager*)refcon portsChanged:NO iterator:iterator ] ;*+
    +* else {*+
    +* while ( modemService = IOIteratorNext( iterator ) ) IOObjectRelease( modemService ) ;*+
    +* }*+
    +*- (void)startNotification*+
    +* CFMutableDictionaryRef matchingDict ;*+
    +* *+
    +* notifyPort = IONotificationPortCreate( kIOMasterPortDefault ) ;*+
    +* CFRunLoopAddSource( CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource( notifyPort ), kCFRunLoopDefaultMode ) ;*+
    +* matchingDict = IOServiceMatching( kIOSerialBSDServiceValue ) ;*+
    +* CFRetain( matchingDict ) ;*+
    +* CFDictionarySetValue( matchingDict, CFSTR(kIOSerialBSDTypeKey), CFSTR( kIOSerialBSDAllTypes ) ) ;*+
    +* *+
    +* IOServiceAddMatchingNotification( notifyPort, kIOFirstMatchNotification, matchingDict, deviceAdded, self, &addIterator ) ;*+
    +* deviceAdded( nil, addIterator ) ; // set up addIterator*+
    +* IOServiceAddMatchingNotification( notifyPort, kIOTerminatedNotification, matchingDict, deviceRemoved, self, &removeIterator ) ;*+
    +* deviceRemoved( nil, removeIterator ) ; // set up removeIterator*+
    +*- (void)stopNotification*+
    +* if ( addIterator ) {*+
    +* IOObjectRelease( addIterator ) ;*+
    +* addIterator = 0 ;*+
    +* }*+
    +* if ( removeIterator ) {*+
    +* IOObjectRelease( removeIterator ) ;*+
    +* removeIterator = 0 ;*+
    +* }*+
    +* if ( notifyPort ) {*+
    +* CFRunLoopRemoveSource( CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource( notifyPort ), kCFRunLoopDefaultMode ) ;*+
    +* IONotificationPortDestroy( notifyPort ) ;*+
    +* notifyPort = nil ;*+
    +* }*+
    +*// prototype for delegate or subclass*+
    +*- (void)controlFlagsChanged:(int)termbits*+
    +* if ( delegate && [ delegate respondsToSelector:@selector(controlFlagsChanged:) ] ) [ delegate controlFlagsChanged:termbits ] ;*+
    +*- (void)termiosThread*+
    +* NSAutoreleasePool *pool = [ [ NSAutoreleasePool alloc ] init ] ;*+
    +* int termbits ;*+
    +* while ( 1 ) {*+
    +* if ( useTermiosThread == NO ) break ;*+
    +* if ( inputfd > 0 ) {*+
    +* if ( [ termioLock tryLock ] ) {*+
    +* ioctl( inputfd, TIOCMGET, &termbits ) ;*+
    +* if ( termiosBits != termbits ) [ self controlFlagsChanged:termbits ] ;*+
    +* termiosBits = termbits ;*+
    +* [ termioLock unlock ] ;*+
    +* }*+
    +* [ NSThread sleepUntilDate:[ NSDate dateWithTimeIntervalSinceNow:0.25 ] ] ;*+
    +* }*+
    +* else {*+
    +* [ NSThread sleepUntilDate:[ NSDate dateWithTimeIntervalSinceNow:1.0 ] ] ;*+
    +* }*+
    +* }*+
    +* [ pool release ] ;*+
    +*// If delegate is set, setDelegate also starts a termiosThread if delegate responds to -controlFlagsChanged:*+
    +*- (void)setDelegate:(id)object*+
    +* delegate = object ;*+
    +* if ( delegate == nil ) {*+
    +* useTermiosThread = NO ;*+
    +* if ( needsNotification ) {*+
    +* needsNotification = NO ;*+
    +* [ self stopNotification ] ;*+
    +* }*+
    +* }*+
    +* else {*+
    +* if ( [ delegate respondsToSelector:@selector(controlFlagsChanged:) ] ) {*+
    +* useTermiosThread = YES ;*+
    +* [ NSThread detachNewThreadSelector:@selector(termiosThread) toTarget:self withObject:nil ] ;*+
    +* } *+
    +* if ( [ delegate respondsToSelector:@selector(port:added:) ] ) {*+
    +* needsNotification = YES ;*+
    +* [ self startNotification ] ;*+
    +* }*+
    +* }*+
    +*- (id)delegate*+
    +* return delegate ;*+
    @end
    +*// SerialManager.h*+
    +*// K3 Tools*+
    +*// Created by Kok Chen on 4/28/09.*+
    +*// Copyright 2009 Kok Chen, W7AY. All rights reserved.*+
    +*//#import <Cocoa/Cocoa.h>*+
    +*#import <Foundation/Foundation.h>*+
    +*#import <UIKit/UIKit.h>*+
    +*#import <CoreData/CoreData.h>*+
    +*//#import <IOKit/IOKitLib.h>*+
    +*//#import <IOKitLib.h>*+
    +*#include <IOKit/IOKitLib.h>*+
    +*typedef int FileDescriptor ;*+
    +*@interface SerialManager : NSObject {*+
    +* NSLock *termioLock ;*+
    +* FileDescriptor outputfd ;*+
    +* FileDescriptor inputfd ;*+
    +* id delegate ;*+
    +* // serial ports in system*+
    +* NSString *stream[64] ;*+
    +* NSString *path[64] ;*+
    +* int numberOfPorts ;*+
    +* *+
    +* // termios*+
    +* int termiosBits ;*+
    +* Boolean useTermiosThread ;*+
    +* *+
    +* // IO notifications*+
    +* IONotificationPortRef notifyPort ;*+
    +* ioiteratort addIterator, removeIterator ;*+
    +* Boolean needsNotification ;*+
    +*- (void)setDelegate:(id)sender ;*+
    +*- (int)findPorts ;*+
    +*- (int)findModems ;*+
    +*- (int)findRS232Ports ;*+
    +*- (NSString*)streamAtIndex:(int)n ;*+
    +*- (NSString*)pathAtIndex:(int)n ;*+
    +*- (FileDescriptor)openInput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops ;*+
    +*- (FileDescriptor)openInput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags ;*+
    +*- (FileDescriptor)openOutput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops ;*+
    +*- (FileDescriptor)openOutput:(NSString*)path baudrate:(int)speed bits:(int)bits parity:(int)parity stopbits:(int)stops flags:(int)openFlags ;*+
    +*- (void)closeInput ;*+
    +*- (void)closeOutput ;*+
    +*- (FileDescriptor)inputFileDescriptor ;*+
    +*- (FileDescriptor)outputFileDescriptor ;*+
    +*- (int)getTermios ;*+
    +*- (void)setRTS:(Boolean)state ;*+
    +*- (void)setDTR:(Boolean)state ;*+
    +*- (void)setDelegate:(id)object ;*+
    +*- (id)delegate ;*+
    +*// delegates*+
    +*- (void)port:(NSString*)name added:(Boolean)added ;*+
    +*- (void)controlFlagsChanged:(int)termbits ;*+
    @end
    Could you help me ?

  • TROUBLE BUILDING VISA Configure Serial Port .vi

    I posted by mistake in DAQ.  My application Builds fine in LV 7.0, however in LV 8.2 using the Project folder, I receive the following :
    Polymorphic VIs cannot be used as Startup/Exported or Dynamic VIs for applications or shared libraries.
    C:\NEM DS18S20 TEST-8.20\NEM0775B\NEM0775B.llb\VISA Configure Serial Port
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 1035 occurred at ABAPI Dist Check if PolyVI.vi -> ABAPI Load All Libraries And VIs.vi -> ABAPI Dist Build LLB Image.vi -> ABAPI Copy Files and Apply Settings.vi -> EBEP_Invoke_Build_Engine.vi -> EBUIP_Build_Invoke.vi -> EBUIP_Build_Rule_Editor.vi -> EBUIP_Item_OnDoProperties.vi -> EBUIP_Item_OnDoProperties.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  Operation is invalid for this type of VI.
    I am using, Polymorphic VI = VISA Configure Serial Port to configure my serial port and then count bytes received for certain serial Port CmDs.
    I am only using the Serial Port (Instr) of the Polymorphic VI.  What is the easiest way to BUILD a application that will work????   I've used this method back to 4.1.  Can I change VISA Configure Serial Port .vi from a Polymorphoric to a Non Polymorphic and still initialize the Serial port??  This new BUILD/PROJECT METHOD is not good. 
    Please Help
    Brian Campbell

    Briancam-
    Have you set the VISA Configure Serial Port as a startup VI in your build specification? If you are using that VI as a subVI in one of your VI's, then you do not need to manually add it to the startup list, LabVIEW should automatically add it as a dependency.
    Xaq

  • Empty serial port buffer?

    Is it possible to empty the buffer of the serial input port without reading from it?

    izze wrote in news:5065000000080000002B8B0000-
    [email protected]:
    > Is it possible to empty the buffer of the serial input port without
    > reading from it?
    You have several options.
    Old standard serial VI's
    Use "Bytes at Serial Port" to get number of byte present and wire it to
    "Serial Port Read" and don't use the data from the VI.
    VISA flush buffer
    The function "VISA Flush I/O Buffer".
    This did not work for me, it took to long time.
    VISA eqvivalent of number of bytes at serial port.
    There is a VISA property to read number of bytes on the receive buffer of
    the serial port. Use this to get number of bytes and wire this number to
    the VISAread function.
    The pro
    blem is that this only works for serial port.
    Use VISA read
    -1- Get VISA timeout value (VISA property node)
    -2- Set VISA timout to 0 (VISA property node)
    -3- make a while loop with
    VISA read function with e.g 1000 bytes to read.
    End the while loop when number of bytes read is 0
    -4- Set VISA timeout back to the value set in step 1
    Rolf

  • Java applets in a browser, and Serial port input

    I know that there is a special package for serial port input in java. (java.Comm.SerialPort)
    What I am trying to figure out before a final decision on design is made, is if there is anyway of reading serial port input into a java applet that is running inside of a browser.
    I have found lots of reference to Serial port input, but nothing that really goes in the direction that I am lookind for.
    Any little tid bits of information pertaining to this would be greatly appreciated.
    Cuervo

    You should also consider that applets are not allowed to access their client system's hardware without being signed; in other words, the user must agree (by clicking a button) to disable the applet security features. Why would you use an applet to do this? Applets are meant to be an extension of a website. You should use an application in this situation.

  • Problems with access to serial port using reentrant code

    Hi,
    I have a VI that send commands and receive answers from an instrument using
    de serial port.
    This VI runs perfectly when used alone.
    However I'm trying run two instances of that VI simultaneously using
    reentrant code and I'm facing some problems.
    Sometimes everything is OK but sometimes, in the process of writing to
    serial port the following error happen:
    Error code 36.
    Invalid refnum device.
    What is this?
    Does someone know how to prevent this?
    Thanks in advance for any help.

    "Paro, Paula [CMPS:2721:EXCH]" wrote:
    >
    > Hi,
    >
    > I have a VI that send commands and receive answers from an instrument using
    > de serial port.
    > This VI runs perfectly when used alone.
    > However I'm trying run two instances of that VI simultaneously using
    > reentrant code and I'm facing some problems.
    > Sometimes everything is OK but sometimes, in the process of writing to
    > serial port the following error happen:
    > Error code 36.
    > Invalid refnum device.
    >
    > What is this?
    > Does someone know how to prevent this?
    >
    > Thanks in advance for any help.
    You can't use reentrant vi's vith serial vi calls without supervising of
    driver.
    Use VISA instead and you have to control the VISA session opening and
    closing. Another word is that the only one serial port sess
    ion should be
    opened at a time.
    Reentrant vi's for serial port without checking serial port session is a
    mistake of program algorithm. Change it in any convenient way.
    Sergey Krasnishov
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]
    http://acs.levsha.ru

  • Reading Serial Port?

    Sorry, I'm not sure if this thread is the same thing but is Java capable of reading in 15 pins RS-232 port data stream? If so, could some one please point me to a good place to start, such which classes shall I use? thanks

    Peter__Lawrey wrote:
    You are right serialization and serial ports have little to do with one another.
    You could start by looking at [http://java.sun.com/products/javacomm/]
    I couldn't find an obvious forum for serial ports either [http://www.google.co.uk/search?q=java+serial+api+forum]
    Thanks, Pete. Thanks, George. It seems like Sun is no longer supplying Javax comm development kits from that link. I take that all newer version of JDK are shipped with it?

  • Does it exist a way to create a COM port based on a VXI serial port instrument

    The goal is to be able to access a serial port located in a VXI instrument either through VISA ASRL device or through Windows API (createfile, writefile, readfile)functions

    It's just not feasible. Windows requires a kernel driver for Serial ports, and you couldn't implement your VXI accesses in the kernel because we don't provide kernel-level APIs to you. NI-VXI and NI-VISA are user-level APIs only.
    If you absolutely must do this, note that I said it is not feasible - but it is possible. You'd have to have your kernel driver call out to another user-level process that in turn made VISA calls. This has been done before, both at NI and elsewhere, and I highly discourage it because it's extremely error-prone and you're too likely to get blue screens. A kernel driver just is not meant to make calls back out to the user level.
    Dan Mondrik

  • Java bean to get information from serial port

    we are migrating from 6i to 10g. In 6i, we used mscomm32.ocx to access to com port. Now in 10g we need a java bean. Anybody has a java bean to access to serial port or anything similar?
    My email is [email protected]
    Thanks in advance.

    we set properties to the serial port, open the port, read (listen) from port, ... Here there are some pieces of code to you see it:
    -- Si está abierto el puerto puedo leer
    IF (MsCommLib_ImsComm.PortOpen(:ITEM('IF_OCX_COM').INTERFACE)=-1) THEN
    -- Miro si hay caracteres
    a:=MsCommLib_ImsComm.InBufferCount(:ITEM('IF_OCX_COM').INTERFACE);
    IF a>0 THEN
    set_item_property('COMUNICACION_ICS.ESPERA',DISPLAYED,PROPERTY_FALSE);
    --Datos de un bloque nuevo, hay que insertar la fecha
    IF :global.estado = 0 THEN
    --Leo la fecha en la que se ha leído los datos
    --SELECT SYSDATE INTO fecha
    --FROM DUAL;   
    fecha := To_Date(:System.Current_Datetime,'dd-mon-yyyy hh24:mi:ss');
    -- Borro la pantalla si hay mas de 1920 caracteres
    :global.tc := :global.tc + 21;
    IF :global.tc > 1920 then
    :comunicacion_ics.if_txt_com_rec :='';
    :global.tc := 0;
    end if;
    --Introduzco la fecha en el control de texto, para su posterior proceso
    :comunicacion_ics.if_txt_com_rec := :comunicacion_ics.if_txt_com_rec||CHR(10)
    ||'__' || To_Char(fecha,'DD-MM-YYYY,HH24:Mi:SS')||chr(10);
    guarda := Fichero.Escribe(:global.fic,CHR(10)||'__' || To_Char(fecha,'DD-MM-YYYY,HH24:Mi:SS')
    ||chr(10));
    if guarda < 0 then
    raise e;
    end if;
    END IF;
    -- Indico que se están recibiendo datos de este bloque
    :global.estado := 2;
    --Leo la cadena
    linea_ics := Var_To_Char(MsCommLib_ImsComm.Input(:item('IF_OCX_COM').INTERFACE));
    linea_ics := replace(linea_ics,chr(13),CHR(10)); -- CHR(10)
    --La añado al control de texto para que se vea
    -- Borro la pantalla si hay mas de 1920 caracteres
    :global.tc := :global.tc + a;
    IF :global.tc > 1920 then
    :comunicacion_ics.if_txt_com_rec :='';
    :global.tc := 0;
    end if;
    :comunicacion_ics.if_txt_com_rec := :comunicacion_ics.if_txt_com_rec||
    linea_ics;
    --Escribo la linea en el fichero
    -- Propiedades de Buffers
    -- Tamaño del Buffer de Entrada
    :prop_com.txt_in_buf := MsCommLib_ImsComm.InBufferSize(:ITEM('IF_OCX_COM').INTERFACE);
    -- Tamaño del Buffer de Salida
    :prop_com.txt_out_buf := MsCommLib_ImsComm.OutBufferSize(:ITEM('IF_OCX_COM').INTERFACE);
    -- Tamaño de la cadena de Entrada
    :prop_com.txt_input_len := MsCommLib_ImsComm.InputLen(:ITEM('IF_OCX_COM').INTERFACE);
    -- RThreshold
    :prop_com.txt_rthres := MsCommLib_ImsComm.RThreshold(:ITEM('IF_OCX_COM').INTERFACE);
    -- SThreshold
    :prop_com.txt_sthres := MsCommLib_ImsComm.SThreshold(:ITEM('IF_OCX_COM').INTERFACE);
    -- EOF Enable
    :prop_com.chk_eof_enable := MsCommLib_ImsComm.EOFEnable(:ITEM('IF_OCX_COM').INTERFACE);
    -- Propiedades Hardware
    -- Parity replace
    :prop_com.txt_par_repl := MsCommLib_ImsComm.ParityReplace(:ITEM('IF_OCX_COM').INTERFACE);
    -- NULL Discard
    :prop_com.chk_null_discard := MsCommLib_ImsComm.NULLDiscard(:ITEM('IF_OCX_COM').INTERFACE);
    -- RTS Enable
    :prop_com.chk_rts := MsCommLib_ImsComm.RTSEnable(:ITEM('IF_OCX_COM').INTERFACE);
    -- NULL DTR
    :prop_com.chk_dtr := MsCommLib_ImsComm.DTREnable(:ITEM('IF_OCX_COM').INTERFACE);
    Thanks. Inma

Maybe you are looking for

  • How to find out the list of Production orders created for sales orders

    Dear All, Our company wants to generate a report for a List of Materials sold out in a particular Product Hierarchy. Along with that we want to know the list of Production orders created for the sales orders. How to identify the production orders whi

  • Cost Component Splits

    Hello, We're using Special Procurement Keys in order to transfer cost estimates in a production plant to a DC.  These cost estimates currently all come over with a full cost component split.  For plants that do not belong to the same company, we don'

  • HTML Table lines limit

    Hi, We are displaying the trip details in a HTML page in ITS server. It has been working fine until the upgrade to ECC 6.0. Not when the trip has more line items (206 line items) the display gets cutoff after 189. This number is not consistent, It va

  • Can Skype be used to talk through a hand held phon...

    I have no active phone lines but have Phone jacks but can Skype be used with a normal phone to call someone ? If so how do i set it up?

  • The bar at the top of each document?

    What is that bar at the top of each document? Is there any way to put something in the bar on the first page and not have it appear in the bar on the second page? It's very annoying to have that happen all the time.