RS232 comunicaat​ion doubt

Hi all
I have a Doubt with serial comunication. I need read and write data. The data for read comes for external hardaware(microcontroller), and data for write is for send to microcontroller. The read and write work very well separately, but when I want user the two in a single VI, no work well. I use a stacked sequence with 3 frames. one for read, one with a delay and the last for write.but No work well....
Can you help me?
I need know how use read and write

Other than what Raven's Fan has pointed out, I don't see anything either.  You are intending to see a carriage return to terminate your received data, correct?  This is how you have it set up.
Reese, (former CLAD, future CLD)
Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home

Similar Messages

  • RS232 communicat​ion with cDAQ

    Hello,
    I am about to commence a project which will require my LabVIEW application to communicate with an RS232 device.  I am planning on using an Ethernet 4-slot Compact DAQ module, but can't see a way to connect through.
    Is this possible? Is there a C-Series module I can buy for RS232 comms?
    Dave 

    So you mention you have a ethernet cDAQ.  Would it then be possible to add an ethernet switch, and a Ethernet to Serial device?  I have never used one but it appears that a quick google search finds lots of modules that can take ethernet from an RJ45 and convert it to RS232 in a DB9.  Here are a few links.
    http://www.perle.com/products/RS232-to-Ethernet.sh​tml
    http://www.lantronix.com/device-networking/embedde​d-device-servers/xport.html
    http://www.bb-elec.com/Products/Ethernet-Serial-Se​rvers-Gateways/Ethernet-Serial-Device-Servers.aspx
    http://www.digi.com/products/faceted?keywords=prod​ucts/serialservers/
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Desperate questios on RS232 Communicat​ion

    Hallo all expert,
    The attachment is a vi which is expected to write/read data to/from COM1 of my machine. For verification, I simply short circuited pin 2 and 3 of the RS232 port. However there are some questions following my experiment:
    1. In the chart the label of x-axis can not be restored to be 0 to 100, it automatically increases without limits. I wish it start from 0 instead resuming a time instant;
    2. In the "read string" field the display is not updated during my typing characters in "string to write", although I have enabled "Update Value while Typing";
    3. The display in the chart doesn't correspond to what I have typed. Should I need more functions in order to show up the data?
    My final purpose is to use this interface to communicate a pic chip which I programed to realize A/D conversion. At begin, a value is ought to be sent to the chip where the value is compared and if it is "1"f, then the conversion is initiated, and the value is read in the chart and could be also saved a excel file for documentation.
    I'm wondering how to input value "1", instead string "1". I successfully type "Ctrl-A" in HyperTerminal, but have no idea which function is due to be used to realize the corresponding conversion.
    Attachments:
    myrs232r_r.vi ‏36 KB

    There are several ways to send a hex 01 with the VISA Write, and all have been explained numerous times onn the forum. One wya is to simply right click on your string control/constant and select Hex Display. You can right click and select '\' Code Display and enter \01. You can have a numeric control and use the Byte Array to String. You can have a numeric control and use the Typecast function to convert to a string.
    Your error can be due to the device not sending any data back, hence the VISA Read times out waiting for non-existant data. If you sometimes get data and are unsure of the length, you need to use VISA Bytes at Serial Port wired to the byte count input of VISA Read. This has also been discussed numerous times on the forum.
    Message Edited by Dennis Knutson on 04-19-2007 06:15 AM
    Attachments:
    write hex to serial.PNG ‏4 KB

  • Communicat​ion via RS232 with a Kollmorgen Servostar 300 using LabView.

    Hello,

    Sorry I am new posting a message here and I post it before I was able to describe my problem.
    I have a Kollmorgen Servostar 300 to control an AKM24F motor and I would like to send the instructions to the controller via RS232 using LabView. I think I had achieved communication from a PC to a Servostar 300 using LabView via the serial port.
    So far I have setup in LabView the configuration of the RS232 (8 bit, no parity, baud rate 38 400), the address of the servostar (ADDR 0), the way the servostar should respond to the host (PROMPT 1) and the error flag (MSG 1), and no error had been detected when I run the program. I should mentioned that after I sent an instruction such as ADDR 0 terminated with a carriage return, I set a delay time of 150 ms, then I read the amount of bytes that are in the buffer, and then I read the buffer, as I mentioned no error message has appear and the ADDR 0 instruction is read from the buffer. Following the same procedure I sent an instruction to move the motor but nothing happens.
    So far I am not sure if the way I am trying to communicate with the servostar is the correct or if I am missing something, any guidance that anyone my give would be greatly appreciated.

  • The output of a power supply in labview using a Magna Power LXI over RS232 to simulate a periodic voltage.

    How can I toggle the output of a power supply in labview using a Magna Power LXI over RS232 to simulate a periodic voltage?  Any help would be apreciated?

    LXI is Ethernet communication.
    Does the power supply have an RS232 port?
    Are you looking for an RS232 to Ethernet (LXI) Converter
    https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=rs232%20to%20ethernet%20ip
    But to simulate a periodic voltage you need to send the SCPI "Source" command to the power supply in a loop.
    Changing the Voltage setting in periodic value.
    How fast of a periodic voltage do you need?
    You may be limited to how fast LabVIEW, Windows and your power supply can respond to commands.
    Use VISA writes. It is the same for LXI as it is for RS232. The LabVIEW code would be the same.
    After you select the corrent VISA Ref, either a com port or an IP address, LabVIEW does not care if it is LXI or RS232.
    From a Magna manual I found
    Command Syntax
    [SOURce]:VOLTage[:LEVel][:IMMediate][:AMPLitude] <nrf+>
    [SOURce]:VOLTage[:LEVel]:TRIGgered[:AMPLitude] <nrf+>
    Examples
    VOLT 200
    VOLTAGE:LEVEL 200
    VOLTAGE:LEVEL:IMMEDIATE:AMPLITUDE 2.5
     

  • Control Instrument using RS232 port

    I have tried to download the IVI driver of the Agilent E3633A that stated can communicate using GPIB or Serial.
    I tried to initialize the instrument but no successful.
    I used a twisted ( tx and rx swap) RS232 cable (female to female) to connect between the instrument and PC com port.
    Please help to advice on how to control the equipments using RS232 port inlabview. Thanks!

    Hello,
    Here's what you can do to verify that you have established communication with the instrument.
    First gather the relevant information:
    1. Find a command that you know your instrument "understands" (it is highly likely that it will understand *idn? which should prompt the instrument to reply with a description of itself).
    2. Verify the serial settings that your instrument uses by default, such as baud rate, number of data bits (likely 8), parity, and the number of stop bits. You can also verify what termination character the instrument uses (which it likely does); this is the last character you will need to send after sending the relevant command characters, and it will indicate the end of the command to the instrument so that it stops reading from the serial port. I doubt that the instrument is configured for flow control of any kind by default, so don't worry about that unless there is specific indication of this in the manual for your instrument.
    3. Verify the type of your cable; that is, you will need to connect pin 2 of your computer's COM port to pin 3 of your instrument's COM port, and pin 3 of your computer's COM port to pin 2 of your instrument's COM port. Some cables automatically switch these connections with the wires inside the cable, others are "straight through." You can bypass the cables altogether and just use wires to make the relevant connections initially; don't worry about a twisted pair at first, just keep the wires short and you should be ok (unless you are in a particularly noisy environment).
    Now build the LabVIEW program:
    1. Open a blank VI
    2. Navigate to and pin down the following functions palette on the block diagram:
    All Functions -> Instrument I/O -> Serial
    3. Place onto the block diagram the four VIs/functions in the top row in the order they appear (should be VISA Configure Serial Port, VISA Write, VISA Read, VISA Close); note that the open will be performed implicitly the property node inside the VISA Configure Serial Port VI (don't worry about this).
    4. Hover over the upper left hand terminal of the VISA Configure Serial Port VI, right click, and choose
    Create -> Constant; now select the PC COM port you connected your instrument to in the newly created constant
    5. Create constants for the inputs to match the serial parameters that you found for your instrument above if the default values don't already match. Note that the defaults used by this VI include activating the linefeed termination character to be used when reading, as well as standard settings for serial port which may already match your instrument (check by hovering over the ports with the wiring tool; the default values will show in parenthesis)
    6. Wire the top right hand terminal to the top left hand terminal of adjacent VI's (which should be in the order noted above); this connects the resource name to each so they perform the operations on the chosen serial port
    7. Wire the bottom left to the bottom right hand terminals in a similar fashion; this connects the error clusters
    8. Almost done... now hover over the remaining left input of the VISA Write function (called write buffer), right click, and create a constant; type *idn? (and include a linefeed character at the end by typing the key)in the string constant that you just created
    9. Similarly for the read function, create a constant for the input that indicates the number of bytes to read (perhaps make this number 100 as you will likely terminate the read appropriately when a termination character is read; your instrument will likely send this), and create an indicator for the "read buffer" output which will show you the string that is read back when you run the program.
    10. You should now be able to run the program; hope it works.
    I would have included a screenshot or example instead of a description, but I don't have access to that at this time and perhaps it is best to actually go through the process of building the VI anyway if you are new to LAbVIEW.
    Good luck and repost if you continue to have troubles!
    Thank you,
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • PAC RS232

    Hi,
    I am about building small stand-alone control station for a vacuum appliance. There are some vacuum pumps, valves and one ion source to control. Most problematic is that some of these devices use RS232 interface. In my opinion the best option would be a PAC. My question is which modules should I choose to be able to communicate through RS232?
    Martin

    That's a lot of serial ports for a PAC application.  Depending on the size of your program, one cFP controller is all you will really need to handle the processing.  Normally you would have one controller module mounted on a backplane with several I/O modules.  The problem is that there is not an I/O module available that has serial ports on it.  You only have what you get with the controller module. The cost of the controller modules will become prohibitive if you are only buying them for the serial ports.  
    I have seen in the past external RS232 switches that could be addressed serially.  Something like that could be a more cost effective way to get all your ports.  Will you need to communicate with multiple devices simultaneously?

  • Ion upgrade and settings

    Upgraded ion before reading about the broken configs in the "announcements" section  :shock:
    After that:
    a) the statusbar isn't being displayed anymore
    b) the menu on left-button-click over each frame does't show the "split frame" options anymore
    c) now I have a border around the frame, which I don't like.
    I get this when ion3 starts:
    >> /usr/lib/ion3/lc/mod_ionws.lc: bad header in precompiled chunk
    >> Unable to find 'mod_ionws' on search path.
    >> /usr/lib/ion3/lc/mod_floatws.lc: bad header in precompiled chunk
    >> Unable to find 'mod_floatws' on search path.
    >> /usr/lib/ion3/lc/mod_panews.lc: bad header in precompiled chunk
    >> Unable to find 'mod_panews' on search path.
    >> mod_statusbar.lua:305: Screen already has an stdisp. Refusing to create a statusbar.
    >> /home/alex/.ion3/statusd_maildir.lua:36: attempt to index global 'statusd' (a nil value)
    >> /home/alex/.ion3/statusd_linuxbatt.lua:22: attempt to index global 'statusd' (a nil value)
    I just need some hints on where to start.
    Thanks

    Tiling still works on my machine... can you describe "doesn't work" ?
    I highly doubt the problem is in the packaging, as the build instructions for keybindings are basically just a `cp *.lua /etc/ion3`

  • Doubt in fbl1n transaction

    hi i have a doubt....
    in fbl1n transaction, there are open items and cleared items.
    in it the cleared items  for certain document types such as invoice etc is not present in the open item table (bsik)
    however the cleared items for document types such as general  voucher its present in the open items table (bsik)
    is this possible as all cleared item entries shld b present in the open item table with an indicator set for cleared or not...
    plz exlain!

    Hi
    There are 2 tables(open and Closed Items)  in FI for Account Payables and Account Receivables and GL accounts
    1.Account payables: BSIK is Open Items and BSAK is Closed items
    2.Account Receivables; BSID and BSAD for OPEN and closed items
    3/GL accounts :  BSIS and BSAS  for Open and Closed Items
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Doubt in creation of a new object

    Hi All,
                 I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
    of any existing object, then what should we enter in the Program field for creating the object?
    I hope I am clear with my question.
    Thanks in Advance,
    Saket.

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • I have a external Hard drive of 1TB. I want to transfer HD movies to it from my MAC but it can only take 4 gb at a time, now i have to format it which is the best format in this situation NTFS or exFAT, as i use windows part ion as well??

    I have a external Hard drive of 1TB. I want to transfer HD movies to it from my MAC but it can only take 4 gb at a time, now i have to format it which is the best format in this situation NTFS or exFAT, as i use windows part ion as well?? plzz help
    Merry Christmas

    Repartition and format the drive for a Mac:
    Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.

  • Doubt in sender mail adapter

    Hi Everyone,
    Can we read and validate the attachment of the mail.If so how to do it.
    Thanks in advance,
    Sakthi

    Hi Sakthi,
       Please refere the below links:
      http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/52b240ac052817e10000000a1550b0/frameset.htm
    Let me know if you have any doubts regarding this.
    Thanks,
    sekhar.

  • PI' RFC  Connection pool  doubt.

    Hi PI exports:
    i have a doubt about  pi' RFC  Connection pool ,pi RFC receive channel can set the conn pool size ,but when start the rfc receiver channel ,is there always only one Connection  pool ,or there is only one Connection  pool  instance?
      thinks
    Edited by: kevin liang on Oct 19, 2009 6:45 AM

    Hi,
      Connection poolins size means how many number of connection you want to make open to send data to ECC, We can define maximum number of connection in Receiver RFC Adapter,Go to additional parameters section and define Max Number of connection give the number there,thats it.Internally it works as Connection poolin mechanism.
    Regards,
    Raj

  • Small Doubt Regarding SY-MANDT

    Hi All,
         SELECT changenr FROM cdhdr CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
                                             WHERE mandant = syst-mandt
                                             AND   objectclas = 'MATERIAL'
                                             AND   objectid   = wa_matl-matnr
                                             AND   tcode      = 'MM02'.
         I have written the select stament as shown above.
         In this i have a doubt like adding a field sy-mandt  in the where condition will increase the Efficiency of program or not.
    regards,
    raghu.

    Hi..
    No doubt the efficency would be affected but from business point of view there will many  things that need to be checked as in:
    If you are viewing data from CDHDR and CDPOS which is client specific then you are not viewing complete data.
    These tables give us and document changes made to a particular object in SAP but if anything is cross client like company code(lets assume) then changes to it wont be visible in all the clients..
    so there can be some key information you can miss out while working on some of the objects.
    else in this case its good to make query cross client.
    regards
    vishal

  • Doubts with control break statements on internal table loops (AT/ENDAT)

    Hi, i've had a couple of doubts for a long while which I hope someone can clarify today:
    1) I know how to use the AT statements, however, i'm not sure I get correctly what this part of help regarding this commands means:
    <i>"The control level structure with internal tables is static. It corresponds exactly to the sequence of columns in the internal table (from left to right). In this context, the criteria according to which you sort the internal table are unimportant."</i>
    I've always sorted the internal table before the control break and it works that way. For example:
    SORT ITAB BY EBELN EBELP.
    LOOP AT ITAB.
      AT NEW EBELN.
    *   Code for the order header
      ENDAT.
    ENDLOOP.
    If I <b>don't</b> sort the internal table, it doesn't work! (i get dupplicated processing). In the example, if i have more than one register with the same EBELN and they're not consecutive, the header gets processed twice. I really don't get that part of the help text.
    2) I know this: <i>"At the start of a new control level (i.e. immediately after AT), the following occurs in the output area of the current LOOP statement:
    All character type fields (on the right) are filled with "*" after the current control level key.
    All other fields (on the right) are set to their initial values after the current control level key."</i>
    My doubt is: WHY is that this way? Because sometimes (most times) I need those fields INSIDE the statement! So when that happened i've solved it in one of three ways:
    LOOP AT ITAB INTO WA_ITAB.
      WA_ITAB_AUX = WA_ITAB.
      AT NEW FIELD.
        WA_ITAB = WA_ITAB_AUX.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    LOOP AT ITAB INTO WA_ITAB.
      AT NEW FIELD.
        READ TABLE ITAB INDEX SY-TABIX INTO WA_ITAB.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    * (Without AT)
    LOOP AT ITAB INTO WA_ITAB.
      IF WA_ITAB-FIELD <> FIELD_AUX.
        FIELD_AUX = WA_ITAB_FIELD.
    *   ...Rest of the code for the first register
      ENDIF.
    ENDLOOP.
    Is there any problem with this way of coding? Can be done better?
    Thank you very much in advance.

    Hi..,
    1)
    See if u sort the table on a field on which u r using AT ENDAT .. then all the records which are having the same value for that field will form a group or those reocrds will be at one place.. so when u sort the table for all the records  AT ENDAT  will get executed onli once..
    If u dont sort this table on this field then all these records will be at different places and in between there may be records with different value for this field.. so this AT ENDAT will get executed for each record !!
    2)
    No u cannot use the Right hand fields of the field in the table .. Because these AT events work as Group based operations... So till that field on which AT ENDAT is working it breaks that record into two groups.. One is the left hand fields including that field.. and right hand fields as another group.. and makes the right hand group as stars ****.  Thats y u can observe that even any one field in the left hand group changes the AT ENDAT will get executed  !!!!
    Hope u understood !!!
    regards,
    sai ramesh

Maybe you are looking for

  • A flickering problem

    I've got a game GUI and need to use the paint() and repaint methods. But I get a very annoying flicker on my screen. I saw a method called update but don't know how it works or what to do with it. Any one tell me what it does or any other way to get

  • Difference in S_ALR_87012172 & FAGLL03

    Hi Gurus,  We have an issue that total balance of the two reports S_ALR_87012172 & FAGLL03 are not matching.  This is because of alternative recon.account maintained with respect to GL maintained in customer master. Therefore, whenever posting done f

  • IPhone 5s display has yellow hue/warmer colors?

    Should I be concerned that my 5s's display is warmer than the display on my 4, 4s and iPad 3? With full brightness on each device, the 4, 4S, and iPad 3 all have, well, "normal" whites. My 5s display has a yellow-ish hue to everything. Unnoticeable o

  • Retrieving Message ID of previous message

    Hi, I have created 2 Message Mappings and 2 Interface mappings in my scenario. Hence three messages(one branched message and two child messages) are getting generated. I need to retrieve msg ID of first child msg in MM of second message:I have used t

  • Database recover

    While trying to recover the database, I did: SQL> recover database until cancel; Media recovery complete. SQL> alter database open resetlogs; alter database open resetlogs ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced I