Writing double and unsigned integer to serial port

Hi all
     I have a basic question.  I am trying to write a double or unsigned intger to serial port.  Is it possible to do so?  If it is he case, how do I do it?
Thank you very much.
Best
Hideya

Hideya,
The serial port sends one text character at a time. So you must convert your numeric value to a text or string representation and then send the string.
LabVIEW has several functions on the String palette for numeric conversions. You must decide how to represent the number as text, floating point or exponential notation, number of significant digits, and other formatting issues. These may be dependent on what will be done with the data after being sent.
Lynn

Similar Messages

  • How to read and write from the serial port using java

    can anyone tel me how to capture data from a serial port and display on the screen and also store it in a database.

    Java Comm API, JDBC

  • Reading/writing to serial port w/ VISA in Labview

    I'm writing a Labview program to control and to read data from a Varian vacuum pump controller. It is connected to the serial port in my computer, and I have been trying to open a VISA session to communicate with the instrument. So far, however, the computer cannot see the instrument--I get the same error messages reading and writing to the instrument as I do to an empty serial port. Does anyone have any suggestions on what the problem might be? Thank you.

    There are a lot of possiblities. Is the cable correct? You probably need a crossover cable (TX and RX) swapped. You also need to check and make sure the serial ports on both ends are set the same (i.e. baud rate, handshaking, stop bits, etc.). Make sure that the port is enabled. I've seen people try to use a comm port only to find that a modem card installation caused the port to be disabled. You could also try using hyperterminal to talk to the instrument. If you can communicate there, you can eliminate any hardware problem.

  • Problem writing to serial port

    Hi All,
    I am very new to LabVIEW (just a couple of months). I need to communicate with a serial port of an Advanced Energy RF generator (Ovation) serial port (AE Bus)
    The manual talks about little endian conversion, CSR and checksum that I just can't make it work. does anybody know how to write and read to this serial port?
    I have used the write and read to serial port from examples with no luck and no response from the generator. I have attached the generator's manual here, the serial commands section starts at page 65 (4-25)
    Has anybody written a program to talk to Ovation RF generator? can anybody help me out and get me started? I am stuck!!!. ... appreciate your help. thanks.
    ~Johnny
    ~ Johnny
    Attachments:
    Ovation - AE RF generator.pdf ‏1444 KB

    Thanks... so I started with the basic serial write and read, enetered hex text strings into the serial write, including the checksum and what I read back is not always correct because for example I need to calculate the XOR in the program and not just eneter it as a hex value. I should also put the write and read into a loop because I will be writing and reading to serial port 2 dozen times.
    I am working with two devices, one is the generator, the other is a controller board that has a very similar serial bus structure as the generator's AE serial bus. the controller board has stepper motor drivers that move two variable capacitors. for the generator, I need to turn the power on and off and set to different power levels. for the control/stepper motor driver board: I need to read the values from a text file(attached). the text file has 3 table, table1, column1 is the number of steps that the stepper motor will move and column2 is the nominal capacitor values for C1. same thing table2; values are number of steps versus nominal cap values for C2. I need to creat a matrix such that to move the C1 to steps listed in the table, and for every step increment in C1, I need to move the C2 motor to 20 different position (listed in the table3 that has the desired percent value of total capacitance ) position and make a measurement of the impedance of the capacitors with agilant E5061 network analyzer and write the data back into the same text file at the end where it says "IMPEDANCE_REAL     in Ohm    one line per C1 position"  and into a excel sheet too while taking a measurement... and do the same thing all over again for C2 versus C1. I think  I need to use the producer consumer design pattern eventually when I get the details worked out first.
    any suggestion? .... much thanks.
    ~ Johnny
    ~ Johnny
    Attachments:
    Basic Serial Write and Read1.vi ‏24 KB
    cap-table.txt ‏7 KB

  • Closing a serial port after executing a for loop of write and reads.

    Hello,
    Labview is opening and then closing each write to the port. I have tried to leave the close outside of the for loop, but labview wont allow it. What do I need to change to make all the writes and reads execute on 1 open and close of the serial port.?
    Thanks.
    Attachments:
    Controller.vi ‏27 KB

    J_es--
         The program that you posted looks to be ok for the most part, you might consider putting an open after your configure (but that's trivial). The other thing that is a minor issue is the loop tunnel coming out of your for loop is currently being auto-indexed.  This function is used to index data for each interation of the loop.  You are using a static address (not an array) and so you don't need this.  If you right-click and remove the auto-index the broken wire will go away. Other than that it should be ok.
         I would suggest looking at one of the shipping examples that come with LabVIEW.  "Basic Serial Read and Write" is essentially the same thing that you are doing and is tested here and might save you a bit of time.  Anyway, take a look if you have a second. Best of luck with your application!
    John H.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Access server's serial port thru an applet

    hello everyone, i am writing a program that will allow remote computer to read and write on server's serial port. currently i am in the testing stage, so i am programming everything on the same computer. i already wrote an application using java comm api to write and read on the serial port. After getting that working i continue to write an applet doing the same thing, reading and writing to the serial port locally. however, i get errors. what i ultimately want to do is allow remote users on the internet to read and write onto my computer (sever)'s serial port. Will RMI able to help me on what i ultimately want to do? do i need to access RMI even if i am running the applet locally?

    I think that this is something close to what I need to do for my company. Actually what I do need to sounds pretty simple but I have not been having much luck: I need to create a webpage with an applet that will 1-read a list of file names, 2-allow the user to select one of the files and 3-read the selected file off the server and 4-stream the file down to a local printer. Basically we want to generate printer labels locally...upload them to our web server and allow our user to remotely access them via a webpage and print them. I am new to java and have been able to do this with a java applet on my local machine that reads the file off the internet and streams it down to the printer...but when I fo to put that applet on the server and try it it does not work. Any help or suggestions would greatly be appreciated. Thanks.

  • Serial Port Config

    I've seen this problem only on Solaris 10 6/06
    A port configured for Bi-directional modem does not
    initialize properly on startup. If one opens up SMC and
    re-saves the configuration it will work okay. But if the computer
    is rebooted, the configuration once again does not load.
    The work-around is to write a script using pmadm and ttyadm
    to manual reconfigure the port on startup.
    This new "feature" makes 6/06 unreliable for use in my remote
    data-acquisition network.

    With what are you reading and writing to the serial port?
    What is on the other side of the serial port? A serial port is not a loopback device - you cannot write to it and then read what you have written. To achieve that you need to run a null-modem cable between two serial ports in order to allow bi-directional communication via serial on the same platform.
    Also - why still use serial? It is old and outdated technology. We are not even wiring serial console ports any more. Ethernet management ports and lights out management s/w are far more superior, than a simple redirection of the console display and keyboard via a serial port.
    No more Fossil drivers. PPP killed SLIP. Internet kill the BBS star.. and Flash games killed Door games... Old style serial communication is pretty much dead on the modern computing platform.
    Unless you are hooking up something like a GPS device or FMC?

  • Hyperterminal to serial port

    I use the hyperterminal to communicate and send commands to serial port COM1.
    On the hyperterminal window, I used to type such a command:
    AT+ZV SPPCONNECT.......
    This command is sent to the device connected to the COM1 port.
    Now I want to cancel the hyperterminal, and sue a Java program.
    I used the javax.comm library to build a java application that communicates with the COM1 port.
    Inside that program, I connected to the COM1 port. How do I send that text command from inside the java program to the COM1 port. There is a method called (send) inside the (serialport) class, do I just say:
    serialport.send "AT+ZV SPPCONNECT.......".
    I mean, is sending text commands through the hyperterminal simply equivalent to sending those text commands to the COM1 port using the java application described above.
    Message was edited by:
    lrantisi

    I wouldn't see how it could be otherwise.
    Did you try it?

  • Listen to serial port open by another applicatio​n

    I have a test setup where another application is communicating with a device over a serial port and I want my Labview gui to be able to listen to the communication. Since two applications cannot have the same serial port open I can't just open the port and do a visa read. Is there any way to do an unreserved open and only listen to communication on the serial port or do I physically have to break out the receive line in hardware and add a second serial port in order to do this?

    A better solution would be to have your reader post a message to a queue with the data. You can have a separate task that handles the UI updates. Depending on the type and amount of data you may not need to post all of the data.
    The answer to your specific question though is no, you cannot have two readers on the same connection.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • 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

  • Low Level Serial Port Access

    This question has gone unanswered several times on this forum in the past but I thought I would try it once more.
    Is there any Java API that is in, or will work with J2ME to allow direct read and write to the serial port similar to the functionality that javax.comm provides for j2se.
    This would be useful for a project where a palmos device is used to communicate with equipment used to monitor industrial processes.

    Some MIDP 1.0 devices support access to the Serial
    Port.
    I have done it with Motorola i85, i50 (iDen) and
    Motorola T720i.
    I think 95cl also supports it. I'm ALSO having problems with serial port access on
    my T-Mobile Moto T720i phone. I've had MUCH success
    with the Nextel i85, i50, i95cl, etc phones, but the
    same code isn't running on the T720i.
    What do I need to do differently???
    Thanks,
    -Tim

  • I am trying to upload dives from my dive computer onto my macbook pro but program says serial port not found - dive computer is listed on macdive

    I have a dive program called Macdive and am trying to upload my dives from my Sherwood Wisdom dive computer via usb lead. The dives will not upload and program says that serial port not found.  does anyone know how I can activate?

    Try a new post in the appropriate iPhoto forum.
    DALE

  • Reading 2 serial port in a same time

    i want to monitor 2 type of data in a same time
     1- i have 6 sensor and i send them from micro avr and packed in this format >> 
    printf("%4d%4d%4d%4d%4d%2d@%4.2f\r\n",a,b,d,c,e,p,f);
    i want to recive all 30 data bytes  in one port then unpacked them...
    2- i have a gyro sensor that sends data very slow every 500ms thats data like this   >> 
    x+40.2\s\s\Y+42.3\r\n
    i want recive all 16 data byte in another port and send feed back (write serial) too.
    i recive gyro sensor data recive in fix 16 byte and dont have any problem  .
    but i have problem that i dont recive fix data from 30 data(from micro) its hangs or recive lower.
    its becuse i use 2port in same time if i use it alone there is no problem.i recive it fix.
    plz help me.
    also im sory im not good at english.
    Attachments:
    8-28-2012 8-07-41 PM.jpg ‏289 KB
    read and write in 2 serial port.vi ‏28 KB

    Hey,
    I would first add some error handling to your loops.  The way you have it setup, the loops could be running in error and you will never know about it.  The code I have attached will stop the loop if an error occurs.
    Does it throw any errors when you run it?
    Lewis Gear CLD
    Check out my LabVIEW UAV
    Attachments:
    read and write in 2 serial portv2.vi ‏28 KB

  • Serial port settings

    I can not communicate with a serial device using the Labview 6 example program. I suspect that the baud rate or stop bit setting is wrong. How do I change it?
    We have Labview version 6.
    Attachments:
    SerialComm1.vi ‏45 KB

    Hi RayPh,
    Are you able to communicate with the instrument using other application software such as HyperTerminal?
    If so, check the settings under properties.
    In Labview: At the Block Diagram, select Instrument IO from the Functions Palette. Select Serial and choose "VISA Configure Serial Port". Wire the configuration settings from the application software to this vi.
    The Context Help will show a description of each terminal and their default settings.
    You can also check the following link for more details:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=5065000000050000008E490100&HTHREAD=000084366&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

  • 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

Maybe you are looking for

  • Voice memos playlist missing on iphone 4S

    Voice memos playlist music missing on iphone 4S. They syncr with itunes, appear there but I can't find them under music on my iphone.

  • DATA QUALITY connection on INGRES

    Post Author: ryefrancis CA Forum: Data Quality and Data Insight Hi, Would like to ask if any you guys have any idea on the error prompt "NO COLUMNS SHOULD BE RETRIEVED FOR THIS TABLE. A POSSIBLE REASON IS THAT YOU DO NOT HAVE SELECT PERMISSION FOR TH

  • Select query based on Simple Type field in JDT

    Hello Experts, We have a JDT table consisting of a field "CONSUMPTION_ID" which refers to a Simpletype.So at oracle level the datatype of the field shows as CLOB instead of String. I am unable to use this simple type field in the WHERE clause in my b

  • Background job failing with license check error

    Hi Experts In our ERP 6.0 system ,all the background jobs are failing with license check error. Have checked the license in SLICENSE and the license is fine. There is no warning while users are loggign in ,but when any background job is runing its fa

  • Can't connect to Australian AppStore after upgrading to iOS 6 in Europe...

    How do I connect back to my Australian App Store? Installed iOS 6 last night (Europe) and can't install updates...