RS232 Serial Port - LEDs

Hi,
I have some experience with Java, though not with any direct hardware communication.
Can anyone help me make a simple program which will allow me to control a couple (or more) of LEDs?
Any advice much appreciated.
(I get the impression so far that this is very doable, and that I need CommAPI).
Thanks in advance,
J

presuming the device with the LEDs has a serial connection to your PC, then yes, you'd need to get the Comm API. Then you connect to the device thru it. After that, it's entirely a matter of what the command protocol is that the device expects to receive.

Similar Messages

  • RS232 serial port or 98SE on M105S3041

    I need RS232 to communicate with my CNC mill.
    I purchased and installed a PCMCIA Serial I/O card but I can't make a serial mouse work. Running XPsp3. Do I have to disable the touchpad? I expected it would work like my M645S4070: plug in a USB mouse, turn off the touchpad, and then the USB mouse is the sole active mouse.
    I installed 98SE on the same machine (M105S3041). 512mb RAM. The MS flag banner comes up, and that's as far as it'll go. Anything else I need to do?
    Solved!
    Go to Solution.

    Yes, M645-S4070 is replacement for the M105, as WinXp is no longer supported. I took screenshots on the M105, and sent them to a flash drive to transfer to M645. When I asked to Safely Remove Hardware, I see that the flashdrive is there, and
    "CH352 =>PCI SERIAL&&PARALLEL" is also listed.
    You say
    In Device Manager, double-click the device to open Properties. On the Details tab what does it have for Hardware Ids? Copy the longest line. It looks something like this.
    I reply
    The longest line is
    PCIWEN_104C&DEV_8039&SUBSYS_FF001179&REV_00
    Attachments:
    Safely remove hardware.jpg ‏71 KB
    Device Manager.jpg ‏81 KB

  • VISA unable to communicate with or see RS232 serial com port

     I have a Dell Optiplex GX260 which has recently had Windows XP (Service Pack 2) re-installed on it.  National Instruments VISA is unable to communicate with the single RS232 serial com port on the computer.  Neither the "VISA Resource Name" control in LabVIEW 8.5 nor the "Measurement and Automation Explorer" can see the serial port.  Refreshing the list does not help.  "HyperTerminal"is able to both see and communicate with instruments connected to the serial port.  In Windows "Device Manager, the serialport appear in the list of hardware without any warnings.
    Can anyone please help with suggestions as to how I may be able to get VISA in LabVIEW to 8.5 to see and communicate with the serial port?
    System Details:
    Dell Optiplex GX260 (One RS232 serial port)
    Windows XP Home Edition Service Pack 2
    LabVIEW 8.5
    Solved!
    Go to Solution.

    AKA_TG wrote:
    Just passing by but I gotta say
    Guyts who answer like that do really irritate me
    Someone oughta apologize to the porr guy trying to get some help here.
    Go ahead and put me on your ignore list please!
    First, there is a plethora of messages on this forum and a plethora of information in the NI KnowledgeBase. If someone doesn't make the simple effort to take 5 minutes to perform a search what does that say? The issue being raised has come up, literally, dozens of times. Do you like answering the same question over and over and over and over and over again?
    Second, my feelings are not unique. You will find that the irritation of people not bothering to do a simple search is shared by most of the regulars here. Why do you think search engines are available? Just so that ads can be sold?
    Third, posting the SAME question in multiple threads is self-defeating. People who try to answer don't know what's already been suggested, and end up wasting their time as well as the poster's time in providing the SAME answer and/or suggestions that were provided in the other thread. 
    Fourth, simple forum netiquette. In both threads the poster essentially hijacked someone else's thread. This is frowned upon in just about every forum that I've ever seen.

  • The "VISA Configure Serial Port" VI will only run at 9600 Baud

    I have written a Serial Port monitor "RS232 RW.vi"  that works for the most part. The problem is that it will not respond to alternate port configuration settings.... For instance: the default RS232 Serial port configuration is:
    (COM1,9600 baud,8 data bits,1 Stop bit, None no parity)
    As a test, I am using a Null Modem Cable to connect From my LabView Com1 port to another PC running RealTerm Serial Port Monitor.. Using my newly designed "RS232 RW.vi"  With port settings of (COM1,9600 baud,8 data bits,1 Stop bit, None no parity),  I can send and receive data back and forth all day long no problems....
    However, if I configure the "RS232 RW.vi"  port to any other configuration, such as (COM1,2400 baud ,7 data bits,1 stop bit, Odd parity).. It will not take the expected chances and continues to operate @ 9600 baud etc.
    I then changed the "RS232 RW.vi"  default settings to (2400,7,1,Odd)
    it still refuses to deviate from (COM1, 9600,8,1,None...)
    I also went into the Win XP  Device Manager on the LabView system and manually configured Com1 to 2400,7,1,Odd  
    and still,.... the "RS232 RW.vi"  will only operate @ 9600,8,1,None
    Can anyone else test drive my VI and see if they have the same problem of not being able to see new changes in the Port configuration settings ..other than (COM1, 9600,8,1,None...).... ?
    FYI.. Unfortunately my LabView is running on Version 6.0 so you may need to up-convert the attached vi
    Solved!
    Go to Solution.
    Attachments:
    RS232 RW.vi ‏102 KB

    Instead of just appreciating the comments, you need to implement them.
    Having the VISA close inside the loop is definitely the problem.  And Crossrulz is 100% correct about the problem being that the serial port gets reset to the default baud rate after closing the port.  Here is the proof.
    Note that while you may have set the port settings manually in device manager, those settings are revised by the VISA driver.  If you look in Measurement and Automation Explorer under Devices and Interfaces >> Serial and Parallel, you'll see the default settings that the VISA driver uses.  If you change the setting there, your program will work the way you want.  But that is not the correct fix.  The correct fix is to get the VISA close out of the while loop.
    The port settings are established in this order.
    1.  By the Windows device drivers.
    2.  By the VISA driver as established in MAX.  Since you are useing VISA, these settings will automatically override #1.
    3.  By the port settings you set programmatically in your LabVIEW program.
    Attachments:
    Example_VI.png ‏18 KB

  • 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?

  • Error 37 using serial port with an executable file

    Hi all,
    I have developed a VI that controls a setellite receiver using RS232
    serial port (LabVIEW 5.1.1).
    The VI program run properly, but when I compile it and try to run the
    executable file I receive an "Error 37, Device not found" error message.
    I have already put serpdrv and my_file.ini files in the same directory
    of my executable program my_file.exe, but I have not been able to solve
    the problem.
    Any help greatly appreciated.
    Regards
    Antonio
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    [email protected] wrote:
    >
    > Hi all,
    > I have developed a VI that controls a setellite receiver using RS232
    > serial port (LabVIEW 5.1.1).
    > The VI program run properly, but when I compile it and try to run the
    > executable file I receive an "Error 37, Device not found" error message.
    > I have already put serpdrv and my_file.ini files in the same directory
    > of my executable program my_file.exe, but I have not been able to solve
    > the problem.
    > Any help greatly appreciated.
    >
    > Regards
    >
    > Antonio
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.
    Maybe you used the serpdrv from an older version of LV
    Regards, Roland
    Roland Lampka - Nortel Dasa - ESN 565-7257 - FAX 8160

  • Warning 1073676424 from VISA Set I/O Buffer Size.vi on a serial port

    I am porting an application from LabVIEW 6.1 on Windows to LabVIEW 7 on OS X (Mac). It was very painless except some GUI modifications.
    The application involves 30 KB data from a instrument through a RS232 serial port. I found the application misses data whenever the computer is busy. The problem came down to the unchanged buffer size.
    Attempt to change the buffer size of a serial port with "VISA Set I/O Buffer Size.vi" fails with a warning of 1073676424 (The specified I/O buffer is not supported). Even the example vi from NI web site "Advanced _Serial_Write_and_Read.vi" has the same warning.
    I wonder what I am missing.

    Under the hood VISA is using the POSIX serial interface for Mac OS X (same as for Linux and Solaris). This interface does not support changing the buffer size. Hence, the buffer size is fixed to the internal OS buffer size. The only thing that changing the buffer size will do (for the out buffer) is to have VISA not flush the data after every write. This is a limitation in the serial API for Mac OS X. Therefore, VISA reports a warning.

  • 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.

  • Interfacing of RS232 serial devices through USB ports within LabVIEW 6.1 and Windows 2000 Pro?

    I have a data acqusition requirement of using 5 RS232 devices, but the motherboard i use only has two serial ports. However, it does have 4 USB ports. Does anyone know if it is possible to use these USB ports to input data from an RS232 device through a serial to USB converter?
    Does LabVIEW 6.1 support this under Windows 2000 Pro?
    Thanks in advance,
    Fraser

    Hi Fraser,
    I just moved an app to a new laptop and had to use a USB to serial comm adapter. At first try the app did not find the comm port.
    After sleeping on it, we downlaoded the most up-to-date driver for the device and upgraded VISA to the latest and gretest version.
    Everything worked fine after that.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Thinkpad with serial port (RS232)

    For my job I need a laptop with a serial (RS232) port.
    I have the choice of the following laptops: Lenovo Thinkpad X230, X230T, T430, T530, W530.
    Neither of them have a serial port, right?
    I saw some mention of an adapter for the ultrabay slim bay, that would support an RS232 adapter.
    Does that work for all the above mentioned models?
    And if so, would the RS232 port work in the same way as the regular one? I need to program e.g. an Agilent datalogger with Labview to measure and recieve the measured data through the serial port.
    Kind regards,
    Rachel.

    thare are two ways :
    1. you can buy a usb to seial cable converter.
    2. if your laptop have a Docking Station. there is a serial port in the Docking station.  Put your laptop on the Docking station, the windows system will automatically recognizes the serial port.
    For example, my laptop is thinkpad x61t,  Itself does not have any serial port, But there is a serial port on the Docking station.
    I am a volunteer, don't work for Lenovo. I am a software engineer.
    thinkpad x61t, os:win7 Awavo Software com port monitor serial port monitor

  • Serial Port and light LED

    I have build a device for the serialPort(COM2) This device use the pin 2 and 3. Ok. Now, my question is:
    To light this one LED, is it enough to open the serial port?
    Thanks
    T.P.

    This won't work. Pins 2 and 3 are for sending data (2 is transmit, and 3 is receive.) You would be much better off using pins 5 (9-pin connector) or 7 (25-pin connector) for GROUND and then using DTR (pin 4 on 9-pin and pin 20 on 25-pin) as your signal. This will give you a 12V difference between the pins - you'll need a resister in series with the LED as well (from memory, LEDs aren't very happy with 12V over them for long.)
    There may, or may not be enough current to drive the LED as well. And you'll have to get the polarity correct.
    As for the software, if you simple open the port then DTR will raise giving you a signal.

  • Send thru serial port (RS232) the instruction CTRL+"something"

    How to i send thru a serial port (RS232) the instruction "CTRL", like CTRL+"something", im only looking for the special character CTRL, i have seen that it can send a CTRL+A ... CTRL+Z thru a type cast, but  is not what im looking for, im sending a special instruction (CTRL+PQT<package>) thats requires this character.
    reards

    The control key is not something you can send through a serial connection.  It is a modifier key (like Shift and Alt) and not a character that would have an ASCII value associated with it.
    However, many of the special ASCII control characters (those below decimal 32) can often be entered as a CTRL+key combination.  For instance, the beep is ASCII 8 and is also a CTRL-G combination.  The backspace is ASCII 9 and CTRL-H.  CTRL A is ASCII 1 so sending a string set in hex display as 01 or \01 in \codes display would work.
    What is (CTRL+PQT<package> supposed to mean?  Is it Ctrl P followed by Q T then something else?  What equipment are you trying to interface with?

  • Create and Send an array of hex code to a device through serial port

    My name is Tina Drew,
    I am working programming a project involving an RFID system. In order to get the project to work the way that I desire, it must send a hex code of 01 to start the device and 6A to run in continuous mode. I have part of the program by the device does not appear to be responding to the hex signal. Maybe my programming is incorrect. In addition, it will not read the information from the microreader through the serial port. It says that the time has expired before the operation can be carried out. What should I do? A sample of the program is attached.
    Please contact me as soon as possible at 410-651-7604 or [email protected]

    You forgot to attach your program. It happens to the best of us. I sure wish NI would move the darn attachment button next to or before the submit button.
    Things to check:
    Baud Rate
    Number of stop bits
    Parity bit
    DCE device talking to DTE or vice versa. If both devices are DCE or both DTE, you must use a null modem cable.
    You can use Hyperterminal to see if you can communicate with your device manually (On the hyperterminal screen, hold down the Alt key and type 001 from the numeric keypad, not the numbers from the top row above the letters, a smiley face will appear if the device echos back the character. If it don't, you can setup hyperterminal to display the character - look under file-properties-settings-ASCII Sending-Echo typed characters locally). If you receive a good response, this will tell you if you have the correct baud rate, etc... After proving that this works, make sure your vi's serial port configuration match your hyperterminal settings. You can use a breakout box to determine if you have a good DCE-DTE match. DCE will assert the RS232 signals DSR, CTS, and CD. DTE will assert DTR and RTS. By hooking up a breakout box on one end of the com link, you can see which LEDs are on and this tells you whether you have a DCE or DTE. Most computers are DCE. Modems are DTE. Your device would have to look like a modem to the computer as far as RS232 signals go.
    - tbob
    Inventor of the WORM Global

  • "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

  • 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.

Maybe you are looking for

  • HT6546 How do you get podcast subscriptions to download on my iMac?

    I had several podcast subscriptions automatically downloading daily to iTunes on my iMac. When I installed Maverick they stopped and I can't find a way to get them started again. I looked for help on the iTunes site and all it talks about is in conne

  • Error while starting NW server and j2ee server is getting stopped.

    Hi, I am working in NW04s. It contains ABAP sp5 and java sp9 versions. The server was working find till ten days back. After the gap of ten days, when i started to work on this SAP system, i was not able to start the j2ee server. During the startup o

  • Pixelated images in cover flow after saving in PS

    If I resave any images in Photoshop (without any reduction to file size/resolution), they appear extremely rough (as if they're tiny thumbs) when previewed in coverflow. Images downloaded direct from a camera always open in the Preview application -

  • Getting error in SOAP XI Channel

    Hi My scenario is File to Proxy and we are using PI7.31 Java only stack. I am getting below errors in Proxy -SOAP-XI communication channel. I have tried this with the several ways as suggested in other SCN, but no luck. can someone please tell how to

  • How can i use  27" Thunderbolt to VGA moniter

    Hi. I have Mac mini late 2012 i7 and 27" thunderbolt display. How can i use 27" thunderbolt display through vga moniter. I use mac mini-->27" Thunderbolt -->mini DP to VGA adapter --> VGA moniter. I used before 27"iMac --> Mini DP to VGA adapter -->V