Signal at Serial Port

Hello,
I am receiving signal at the serial port through wireless communicator at a baud rate of 9600. I want to analyze this signal and for that i need to know that what sampling frequency i should use and what is its relation with the baud rate.
Thanks alot

Abuzar,
The sampling rate for your signal is the rate at which the digitizer in the microcontroller takes samples.  If you are trying to get a good reprodcution of the waveform, the sampling rate is probably 300 to 1000 Hz.  If you are anywhere near 1000 Hz sampling, you will not be able to transmit all the data through your 9600 baud link (~ 1 ms per byte).
Lynn

Similar Messages

  • Send signal to serial port

    Hi, I have a trouble.
    I need to send a signal to serial port to pilot a relè.
    I can't find how to send a Vcc signal for some second on a pin in java.
    Someone have an idea?
    Thanks a lot!
    Edited by: Alberto.Marcigaglia on Aug 29, 2008 2:27 AM

    There are many results from the search below:
    http://www.google.com/search?q=java+serial+port
    I suggest that you use the 3-rd party RXTX package rather than the obsolete javax.comm package. There are a number of very detailled posts in these Sun forums regarding the installation and use of RXTX - search for them.

  • Start a program with a signal from serial port

    Hi, my program need to continue when it's gets a signal from the
    serial port, I've understand that i need to use Java Communications 3.0 API.
    couldn't install it.
    when i import, in my program, javax.comm.* it can't be resolve.
    thank for eny help..:-)

    Glad you got it to work. I would only say 2 very important things:
    1) Do not use an IDE as long as you can't code using notepad and command console and don't understand the concept "classpath". Now you've to learn both the IDE and the Java language basics. This is going to take a longer time than when you learn it one by one.
    2) You should NEVER place any 3rd party libraries in JRE/lib or JDK/bin. This is receipt for major future troubles. You should define the classpath yourself. You shouldn't misuse the default classpath.

  • 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

  • "Example on reading combined signals from a serial port and separating them for display purposes". I am a beginner in Labview and would appreciate if anyone help with that

    I am working on a wireless vital sign monitor. I have 3 signals; heart rate and temperature. I filter and amplify the signals before converting them into digital form. I then pass them via MAX232 before passing them to RS232 serial cable.
    I am therefore working on a program to receive the combined signal and separate them.
    I have come across serial read and write examples on ni.com but am looking for one where I can actually separate combined signals and display them separately.

    Reading the serial port will give you a string. How you divide the channels depends on how the data was formatted before it was sent over the serial channel.
    If you are designing the instrument, as it seems from your query, then you can set up any form you wish. If your data is always floating point numeric, you could use space or tab characters to separate data words. You could use and XML format. If the instrument is provided by a vendor, contact them for the protocol.
    If tabs are used between words and returns between sets of readings, the resutlant string can be interpretted by the Spreadsheet String to Array function in LV.
    Things to avoid are characters often used by serial communications systems as control characters. Carraige returns are
    often used as command terminators by serial protocols, but may also be used by the port.
    Lynn

  • How to get a signal from the serial port to start a labview program?

    I need to synchronize the data obtained from a program (which is not in Labview)with the data collected with Labview on a different computer. I can send some data strings to the serial port of the computer running the Labview program when the other program starts. However, I need to be able to read the trigger in my Labview program. Do you know what I should do? Thanks.

    If you don't have any other programs listening on the COM port, you need to let a LV program run BEFORE the signal comes, otherwise you won't be able to read it. You can have the program wait in a slow timed loop so that it doesn't use up too much CPU time, and when the required "trigger" comes, to move into the main part of the program.
    You basically need a while loop waiting for a certain string in the serial buffer. Once the string is found the while loop is exited, and the data acqquisition or whatever else you require from the progam can be performed.
    In the example attached the program wait for ANY text to be sent to the COM port. Please note that you need to configure the VISA resource before using it. Once there is something at the COM port, the loop will exit and the rest of the program will be executed.
    Hope this helps
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Wait for serisl message.vi ‏17 KB

  • Serial port: Input/output signal errantly combined

    I am currently in the process of using LabView to replace another user interface for a scientific instrument.
    LabView is connected to this instrument through a serial port.  The instrument streams 25 bytes of binary data every second to the computer.  I can read the binary string (VISA Read) and save contiuously to disk using a while loop.  In addition, there are a few instructions I can send to the instrument that will do various functions (start logging, turn LEDs on/off, etc).  I can successfully send these instructions to the instrument using the previous interface, and in a stand-alone vi using VISA Write, but when I place the VISA Write function into the larger interface vi, signals go haywire.  Specifically, there are two separate LEDs that I can toggle with two different commands, but when in the larger interface vi, both commands toggle the same LED.  Also, it appears that the singal I send to the instrument (a single ASCII character) immediately bounces back to the computer into the 25 bytes of streaming binary data.  In other words, after I press the LED "on" key, one column of my streaming data changes when it is not supposed to (ex: after Binary to ASCII conversion, it changes from a single digit to a twenty digit value).
    Initially, I thought the problem was the sequence of VISA Read/Write.  In the current configuration, I read all data, then allow for Write commands.  Both the VISA functions are within the same While loop to continuously monitor the data.  Is it possible the Write signal output is not leaving the while loop and being read as input?  What would make the instrument read two different commands as the same one?  My goal is to run an interface that displays the streaming data as ASCII, and allows for a few different toggle options while the interface is running - is there are more efficient/elegant way than a while loop?
    ~Going Bananas
    Solved!
    Go to Solution.

    New replies now in gray.
    CodeMunkee wrote:
    1.  If you keep giving me good advice like this, I'll be tempted to change the background to Baltimore prison purple.
    I'll ignore this statement.
    2.  The buffer now lives outside the loop.  I understand clearly.  Part of the problem might be my instrument - when I cycle power the 19 digit number that was 'echoed' disappears.  Forget about that display stuff, it works properly - I accidentally removed the time delay when editing the vi.   But you do bring up an interesting point...
    Without the delay, the loop ran much faster.  If the bytes weren't at the port, the read statement would have returned nothing when it read zero bytes, thus blanking out the indicator rather quickly.
    Yes, Hexadecimal display shows 04 to indicate the end of the 25-byte data sample.
    Doing a bytes at port read is not always a good idea.  If not all the bytes had arrived yet when you ask for the read, you won't get all the data.  The remaining data being sent in that stream from the instrument will show up at the front of the buffer on the next read command. 
    While this isn't a common occurence, it does happen.  How can I prevent this from ever happening?
    Since you know each commands ends with a hex 04 (ASCII character for EOT), you could enable the termination character when you configure the serial port.  Set the termination character to be 4.  Then when you execute the VISA read, read a large number of bytes such as 25 or more.  The read will terminate at either the timeout, the requested number of bytes, or when the termination character is read.  With this setup, you could eliminate the wait statement and also not request the number of bytes as the port.  The VISA read will control the pacing of the loop.  Any extra bytes after the termination character are part of the next frame of data and will wait around until the next time you read the VISA port.
      3.  Implementing your ideas for the latch button works better.  I am still encountering issues with these commands however.  Attached is the new vi.  There are two commands I want to send, 't' turns on the LED light (they blink for 30 sec then time out), and the latch works perfectly for that, 'p' turns on the magnetometer light (an additional 'p' is required to turn it off), but I cannot get the command sent to the mag while the loop is running.  It turns on either at the beginning of the vi, or at the end of the vi (after Finish button is pressed).  This leads me to think the command 'p' is stuck inside the loop.  I tried adding another film strip (see attached vi) for the toggles to force the issue, but it didn't work. Additionally, the 'p' command effectively works as a 't' command, and the LED lights begin to blink when I press the 'p' button.  This isn't supposed to happen, and leads me to believe the 'p' command does in fact exit the loop but in the wrong manner.
    The "film strip" is another frame of a flat sequence structure.  It enforces the order of execution.  The next frame can't execute until everything in the prior frame has completed.  It isn't necessary in your case because the Error and VISA wires determine the order of execution with respect to the other VISA statements.  But it shouldn't hurt.
    There is no reason the "p" case structure should behave any differently than the "t" case structure.  Although you should wire the error wire through in the False case of the "p" structure like you did for the "t" structure.  There is no "exiting of the loop" in either case.  The loop runs until the stop button is pressed.  I would check the manual to see that t and p commands do what you think they should do.  Do they need a termination character of their own when they are sent?  Should they be upper case letters rather than lower case?  You can run NI Spy on your serial port and see the operations occurring with it and see the data coming in and what data is going out.  I would be suspicious that the device is not handling the command properly.
    Any ideas?  I think I've tried to put the toggle buttons outside the loop before, but then could only toggle once before the loop took over.  Ideally, these toggles would be available at any time while the data is streaming, so therefore inside the loop?
    The toggle buttons need to be within the loop so that they can be read on every iteration of the loop.  Outside the loop, as you discovered, they are only read once at the very beginning before the loop is started.
    4.  Thank you for the suggestion about the Selection Mode for the Open/Create File option.  It is annoying to create a file first.  I made the change, but I still get error messages when I use a file that does not yet exist.  LabView takes me to the first Open/Create/Replace vi when the error occurs.  Is there something else I must do?
    On the open file VI, there is an input that is Open as default when unwired.  Create a constant there and change to Replace or Create.
    Remember, if you have any questions about the way LabVIEW is handling something with serial ports, close the port within LabVIEW.  Open Hyperterminal and try the commands from there.
    Message Edited by Ravens Fan on 01-13-2009 03:55 PM

  • Help with reading information coming from a software into LabVIEW through Serial port

    Hi,
    I am new to LabVIEW and also an amateur in using RS232 for communication. I have this software that has these icons like speed increase/decrease, elevation up/down, start/stop. Now, when I click these buttons on the software, they perform the appropriate functions. For example, if I press start button, the signal must go through a serial COM port into LabVIEW to start the machine. How do I do that? How do I find what format the code word is when I press a button on the software? And how to decode the information to read whether the button pushed is start etc...? Any help would be appreciated.

    I may not be perfect, but I'm all I got!

    That information would be in the programming manual for the device you're controlling. Unless you have a device that has no documentation or you cannot get the documentation that's the first place you should look. If you cannot get the documentation at all then you've got some reverse-engineering to do. To do this you will either need a serial port sniffer (a hardware device), or you can try to use a software-based port capturing program. On Windows PortMon is the most prevalent. This will show you how the port was configured (baud rate, stop bits, etc). Warning: the information is technical.
    As far as how to get it running in LabVIEW, you should take a look at the serial port communication examples that ship with LabVIEW. The most problems occur in figuring out how to (a) terminate a write command, and (b) determining when to stop reading. For (a) this is typically done by appending a carriage return or linefeed to the command. This is device dependent. For (b) this is usually done by the byte stream ending with a character like a linefeed. Again, this is device-dependent. 
    You may also want to peruse this KB article: Serial Instrument Control Tutorial. There are also lots of tutorial on the internet for basic tutorials on serial port communication.

  • Write to Serial Port without splitting string data

    Hi, all, thank you for your help in advance.
    Problem:
    I am trying to write to the serial port with VISA write module. Somehow the string I tried to send was splitted before it was sent. For example, if I want to send "127", it sends "7', "2", "1". I don't know if there's anyway to configure the module so that it sends out the whole string at once. I use the return count to indicate how many times it spits the data. So "127" now returns "3" (sent three times. I would like to have it to return "1" so that "127" was sent in whole).
    Project:
    I am working on an application where a DC motor is controlled by a controller talking to the PC's serial port. "127" stands for its maximum power. The controller devides the power into 128 steps. Therefore I need to input number from 0 to 127 to command the speed.
    Any help or suggestion will be appreciated!

    Thanks for the prompt replies.
    About Number/ASCII
    I am using the Atmega128-Controller Chip to read in the signals sent from the computer serial port. Then it sends signals to the motor controller. The Atmega chip reads the ASCII string and converts it to hexadecimal number, sending that number to the motor controller. I can program the Atmega chip so that it either translates the ASCII string into hex as mentioned or accepts as it is. Either way, I want it to read two byte information at once (00 to 7F).
    If the VISA serial write can send only one byte at a time, then I may have to program the chip so that it buffers the readings. I have tried using number/hex converter and number/string converter, either case, the fact that VISA Write spits one byte at a time hinders the programming. For example: I defined numbers 1 to 5 represents 20% to 100% power output with 20% increment Then I defined "10" as "90%" power, but it reads "1" "0" seperately, so the actual out put is "20%" then "0%".
    I used the example VI provided by NI : advanced serial write/read. For convenience, attached here. Not all modification I made is saved.

  • Inconsistent prob when adding listeners to serial ports for sending AT cmds

    I have an app that sends and receives SMSs from two different cell phone carriers (lets say verizon and sprint by example).
    For that matter i have two cell phones, exactly the same model, one from each carrier, connected to the PC serial ports, COM, COM6 and COM7 being aware that they are available.
    -The application communicats with the phones through the a serial communication API and sending AT commands.
    -The application can send messages correctly from both phones within the same transaction, this is, i click in send message and the message is sent from both phones.
    The problem is when receiving, getting the SMS received by the phones:
    -When i have ONE phone connected to the PC it work properly for both phones.
    -When i have BOTH phones connected, only Carrier1 phone receives properly.
    When checking, i just find out that the problem rises when i try to add the listeners (see code comments below).
    When both phones connected there seems to be a problem that i cant figure out, and may be its a conceptual misunderstanding from me.
    I attach the code if you can help me,
    thank you,
    fernando
    // class fields
    private static String PORT_CARRIER1;
    private static String PORT_CARRIER2;
    private static CommPortIdentifier portId;
    private static Enumeration portsList;
    private static SerialPort carrier1SP;
    private static SerialPort carrier2SP;
    private static InputStream carrier1_input;
    private static InputStream carrier2_input;
    private static OutputStream carrier1_output;
    private static OutputStream carrier2_output;
    // ... all the code below is from the app method where everything is initializated     
    portsList = CommPortIdentifier.getPortIdentifiers();
    while(portsList.hasMoreElements()){
         portId = (CommPortIdentifier) portsList.nextElement();
         if(portId.getPortType() == CommPortIdentifier.PORT_SERIAL){          
              // try to open ports
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1SP = (SerialPort) portId.open("SMS", 5000);
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2SP = (SerialPort) portId.open("SMS", 5000);
                   else System.out.println("Error " + portId.getName());
              }catch(PortInUseException piue){
                   System.out.println("Exception while opening serial ports: "+piue.getMessage());
                   continue;
              // try to open input streams
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1_input = carrier1SP.getInputStream();
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2_input = carrier2SP.getInputStream();
              }catch(IOException ioe){
                   System.out.println("Exception while opening input streams: "+ioe.getMessage());
                   continue;
              // try to open output streams
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1_output = carrier1SP.getOutputStream();
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2_output = carrier2SP.getOutputStream();
              }catch(IOException ioe){
                   System.out.println("Exception while opening output streams: "+ioe.getMessage());
                   continue;
              // adding listeners
              try{
                   if(portId.getName().equals(PORT_CARRIER1))
                        carrier1SP.addEventListener(new ListenerPuerto(this, carrier1_input, "CARRIER1"));
                   else if(portId.getName().equals(PORT_CARRIER2))
                        carrier2SP.addEventListener(new ListenerPuerto(this, carrier2_input, "CARRIER2"));
              }catch(TooManyListenersException tmle){
                   System.out.println("Error while adding listeners: " + tmle.getMessage());
                   continue;
              // Adding specific event to listeners
              if(portId.getName().equals(PORT_CARRIER1))
                   carrier1SP.notifyOnDataAvailable(true);
              else if(portId.getName().equals(PORT_CARRIER2))
                   carrier2SP.notifyOnDataAvailable(true);
              // Setting params to serial communication
              try{
                   if(portId.getName().equals(PORT_CARRIER1)){
                        carrier1SP.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
                        carrier1 = true;
                   }else if(portId.getName().equals(PORT_CARRIER2)){
                        carrier2SP.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
                        carrier2 = true;
              }catch(UnsupportedCommOperationException uscoe){
                   System.out.println("Error while setting params for serial communication: " + uscoe.getMessage());
                   continue;
              // ... nothing else important ...thanks in advance

    Thinking of a java application as its what I am most
    comfortable with, but also thinking of having an
    apache server, and using jsp pages or servlets...
    because I hate formatting things in a java frame..
    have never quite mastered that! Any thoughts on what
    I should use?I'd prefer a Swing GUI for a maximum of controls. If you have any problems regarding layout, you can post concrete questions here (or even better: the Swing forum).
    And my main stumbling block would be how do I send
    signals to the green light from the computer? How do
    I get signals from the light beams to the computer?
    How do I use a serial port (for eg) from a java app.There's an additional library for serial I/O, it's named javax.comm ... should be downloadable somewhere on the java.sun.com site.

  • Serial Port Overrun

    Hello All,
    I am developing Teststand sequences which run Labview code. I use 1 labview vi to configure and drive the serial port, the first call configures the serial port. The second call writes a message and reads the response, the last call releases the resource. When running the call write&read I intermittently receive the error shown in the attached jpg, this causes my whole sequence to lockup till I return to restart the test. I need to run this repeatedly overnight so its a problem. I have a feeling this isnt so much a serial port overrun problem as a hardware clash ( i also configure and run a camera ).
    I have spotted a number of posts a on this same topic but I havent yet found a soultion only advice, which I have already tried.
    Help greatly appreciated
    Regards Chris
    Attachments:
    Serial Port Error.jpg ‏63 KB

    Are you familiar with handshaking?  There were several posts on this subject recently.  The end device is sending data faster than your computer and Labview program can handle.  You need to implement handshaking.  There are two types of handshaking, software and hardware:
    Software, also called XON/XOFF.  With this setup, when the computer serial port incoming buffer gets nearly full, it automatically sends an XOFF command (don't worry about what it is since it is automatic).  The XOFF command tells the endpoint device to stop sending data.  When the buffer gets near empty, the computer sends an XON command.  The endpoint device then starts sending data again.  For this protocol, the endpoint device must be able to support this, and must be configured to use this type of handshaking.  You would have to read the manual to find out how to set it up.  For the computer end, you can set it up with an option for the configure serial port function on the input labeled "Flow Control".  Right click on this terminal and select Create - Constant.  A text ring will be created.  Select XON/XOFF in the text ring.
    Hardware, also called RTS/CTS.  Same principle in that the computer signals the endpoint when to stop sending data and when to start again.  However, instead of sending a command, the computer drops the CTS line (Clear To Send).  Actually, the endpoint device raises the RTS (Request To Send) when it wants to send data, and the computer responds with raising CTS if it is ready to receive data.  When the buffers get full, the computer drops CTS which tells the endpoint to stop sending data.  When the computer is ready to start receiving again, it raises CTS.  Again, both sides must be configured for this.  The text ring has an RTS/CTS selection.
    You will have to read the manual on your endpoint device to see what it supports and how to configure it.  Warning:  If sending binary data, DO NOT use XON/XOFF.  The binary data may just happen to form a pattern that looks like XOFF, and everything will lock up because XON will never be sent.  So if binary data is being transferred, use RTS/CTS.  If normal ASCII characters are being sent, you can use either protocol.
    - tbob
    Inventor of the WORM Global

  • Send to the request by serial port

    HELP !!!
    Bonjour... et merci de bien vouloir me dépanner ...
    J'ai une application où un automate programmable (TSX57 de Schneider El.) doit communiquer avec un PC par une liaison série RS-232 pour échanger des informations.
    Du côté du PC, j'ai Labview 6.1 comme outil de développement avec IMAQ Vision Builder.
    Je désire que l'automate donne un signal au PC (par le port série), pour que ce dernier exécute un Vi, préalablement généré par IMAQ Vision Builder, qui émettra des informations via l'automate.
    Avez-vous un exemple en Labview ou des explications claires qui me permette d'émettre des caractères "à la demande" du récepteur ???

    Vous devez m'excuser parce-que je ne peux pas essayer une reponse en Francais, mais...
    You will need a loop running in which you read one or more characters from the serial port (using a suitable timeout) and maybe accumulate them in a shift register until you determine that a valid message has been received (or your program has to exit). Then you either carry out your processing or discard the message if it is invalid. I'm sure that looking at the VISA examples will help you work out how to do this. The VISA termination character property can be very useful if your messages are always terminated with a known character such as a CR.

  • Why there is a bandwidth limitations in serial ports

    hi all
    why there is a bandwidth limitations in serial ports ??
    like the highest one is 45 mbps
    but Ethernet ports reach 100 GB !!
    thanks,

    Dear,
    each standard has its own specification about media, connectors and protocols. Depending on the type of media and technologies that ware available when the standard has been defined, a maximum speed has also been defined.  The speed depends on the specific media (copper or optical, twisted pair or coax, cat 5 or cat 6), electrical signals (volts, waveform, clock), distance  between device,.... each protocol defines a maximum speed.  It's true that ethernet protocols have a very high speed but over a copper line they are also limited to 100 meters while other serial protocols, xDSL for example, can transmit up to 20Mbps over copper line over a distance of some kilometre. So speed reduction is often a way to have longer connections.
    Bye,
    enrico
    PS: please rate if useful

  • Multiple serial ports reading from a shared USB port

    I have a program that reads from 4 flow controllers, which send data through RS232 serial ports. Because the computer is located pretty far away, the vendor suggested to use an Edgeport box to convert RS232 to USB, then convert to ethernet port using a SuperBooster converter. The signal travels long distance in ethernet cable to the computer and get converted back to USB, then to the computer. In MAX, I was able to see 8 com ports from the Edgeport box, and I was able to communicate with my flow controllers.
    The problem is, it will give me some error message occasionally. Sometime it's a VISA Read error, sometime it's a VISA framing error. Could this be caused by the way the signal is transmitted?
    In the program I have four parallel WHILE loops that constantly do READ and WRITE to the 4 flow controllers. Could this be causing the errors? If so, what is the best strategy to design this program?
    Thanks

    I agree with Mike, you will need an error handling strategy that accounts for these errors.  And retries the communications.  This can be a little tricky, but very doable.  I believe some sort of statemachine approach will work best for this. 
    As for your heated probe.  I would make some sort of hardware interlock that will shut it down in case of a coolant failure.  NEVER, EVER trust the computer to be running where safety is concerned, either for personal or hardware.  There are plenty of ICs that can monitor temperature, and have warning, and alarm outputs!  Another option is some sort of watchdog on the communications bus for the coolant control, but I think this is a bit more tricky. 
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Control a generator with a control volage by serial port RS232

    Hello everybody,
    I would like to control a generator thanks to a control voltage. This last one would be sent to a switch wich turns on the generator.
    To do that, I want to link the switch and the computer with a serial port RS232 by using NI-USN 232 cable.
    I made some research on this subject and I am only a beginner on LabView but I would like to use one (or several) pin which will send 5V in voltage when I want.
    Is that possible? Is there another way to make it?
    Thanks in advance.

    Thank you for your answer.
    Maybe, I didn't explain myself correctly. 
    For example, on the Raspberry Pi, you can control a card by sending 3,3V signal with RS232 port (I made it last year so it makes a sense).
    What I want to do here is to control an electronic card that turns on my generator after. I don't have enough to buy a generator controlled unless you know one not very expensive.

Maybe you are looking for