Is this "OK"? Lots of Serial Write.vi's !

Hello all. I had a recent post and two excellent responses about how to get a constant FALSE condition to send a command ONCE, and a constant TRUE condition to send a command ONCE. In other words, while the buttons are "idle", nothing is being sent. The attached VI works great, but look at all the Serial Write.vi's! It doesn't really bother me, but is it just seems wrong. Are all those vi's "doing something" while they sit there in the case structure? Is there a way to get ONE Serial Write vi outside of the cases? Or should I care?
background: In my other applications, the hardware has a FIFO and memory and I can concatenate lots of strings and send them to ONE Serial Write vi. In my new application, it's paramo
unt to send ONE command and stop, hence the imbedded case structure and shift register to tell that a key has been pressed. The other attached vi is an example of what works on my old hardware but not the new stuff, so you can get an idea of why the new program seems so fat.
Richard
Attachments:
WriteOnce.vi ‏58 KB
ABSsub_VL&P.vi ‏91 KB

If you want to use a single serial write, you can programmatically build your device dependent data string. See attached.
P.S. What a great user profile name. Wish I had thought of it.
Attachments:
build_ser_string_programmatically.vi ‏37 KB

Similar Messages

  • Inconsistent serial write

    hello,
    I'll be brief. I'm a novice, still trying to get the feel of labview. Somehow there's an inconsistency of the serialwrite.vi in my program. Using a protocol analyzer, I could see that sometimes the serial write doesn't send all the strings in the command text box. (For instance, the value of the command textbox is "send 200", and sometimes the serial write only sends "se"). I followed the guideline for serial communication: initialize (baud = 9600, databits = 8, stopbits = 2, parity = none), flush the buffer before writing to the serial port, send the string to the port, have a serial port break to wait for response, and count the number of bytes on the serial port before reading them. I use R-232, and I also have checked the "updat
    e value while typing" on the pop up menu of the command textbox. My program is attached. I will appreciate any help in any way. Thank you!!

    Try using VISA instead of serial VIs. VISA is lot better to use in almost everyway. There is a VI on your computer ( that has Labview on it )named, serial communication.vi That VI will help you understand the use of VISA in serial communication. But for some reason if you have to use Serial VIs then attach your VI on this developer exchange and I will try to troubleshoot the problem.

  • Using VI Example Basic Serial Write Read to send AT commands to Cell phone modem error 1073807360

    I am using the NI Example VI: Basic Serial Write and Read to send AT commands to a Cell phone acting as a Modem.  I can send AT commands to this phone using Hyperterm when I select the modem driver by name in the hypert port selection field but not as com 7 which it occupies according to device manager modem properties. The basic serial vi does not show the modem driver as a selection, only ports by comX are shown. I get error 1073807360.

    Have you tried to put the name you enter in Hyperterminal in the VISA resource control? If Com 7 doesn't show, you can simply type "COM 7" in the VISA resource control. Or use "ASRL::INSTR 7".
    Also, make sure the connection in hyperterminal is closed, before you open the port in LabVIEW.
    Hope it helps,
    Wiebe.

  • Creation of Recurring Inspection Lots with Serial numbers

    Hello,
    We have the following scenario at our client :
    <i>MIGO_GR</i> is used to create GR for materials with Serial number requirement. The serial numbers can be generated automatically or manually entered on the screen. At this point of time, the Shelf Life expiry date & Next Inspection date are calculated based upon the Production date. The Batch gets created with Next Inspection date, Inspection Lots are created and the Serial numbers are assigned by the system. The stock moves into QI.
    The stock is moved from Quality restricted to Unrestricted stock via <i>QA11</i>. The serial numbers are handled by the system or can be managed on screen.
    Transaction <i>QA07</i> (Deadline Monitoring of Batches) is used to create Recurring Inspection. QA07 gives error message IO304 that "<b>Only 0 serial numbers entered instead of 1</b>". The problem is that system doesn't pick up the corresponding serial numbers.
    OSS # <u>497845</u> mentions that Transaction QA07 can not handle serial number. The serial numbers are very critical to the business process.
    Has anyone come across this situation before ? Please suggest solution or workaround. I tried using BAdI "<b>INSPECTIONLOT_UPDATE</b>" & was able to create Inspection Lots with serial number assignment, also manipulated Batch to change the Next Inspection date. The problem is Material Movement (322) Document does NOT get created.
    Also tried implementing BAdI as per OSS # <u>608830</u> but doesn't give desired results.
    Any help is greatly appreciated.
    Best Regards,
    Homiar Kalwachwala.

    Hello all,
    Just wanted to bring this on top to be noticed.
    Would appreciate any help, suggestions...
    Regards,
    Homiar.

  • How does VISA serial write work?

    I am using LabView 6.0 and the VISA functions to run a distributed sensor network using RS-485 from a NT 4.0 machine.
    In order to work properly I have to manually control the RTS line which isn't a problem using the property node.
    Here's what I want to know.
    I'm using a sequence structure:
    I'm writing a command using VISA serial write
    Then in the next frame I unassert the RTS.
    Now in this setup does Labview pass the command to the serial port and then jump to the next frame in the sequence, or is there some kind of acknowledgment from the serial port that its done so the Write vi knows to finish, or am I running a the risk of cutting off my communication before I've finished or should I put in a short wait after the write to port
    , or could this cause me to miss the reply?

    Robert:
    With the default settings, VISA Write will not return until the data has been at least posted into the hardware FIFO. To be 100% sure that the data has been transmitted over the wire, you should do these 2 things:
    1) Call VISA Flush I/O Buffer with a mask of 32. This will ensure the data has been at least posted into the hardware FIFO, regardless of which settings are being used.
    2) Wait a tiny amount of time for the FIFO to be emptied. This is based on the number of bytes in the FIFO and the baud rate. For example, with a 64 byte UART FIFO and 9600 baud, you should wait 67 milliseconds.
    Dan Mondrik
    Senior Software Engineer, NI-VISA
    National Instruments

  • PDA (Pocke PC) - Serial Write Timeout

    Hello List,
    I am developing serial routines to communicate with external hardware. In many cases, XON/XOFF flow control is used.
    I have configured my PDA device to write out a large file. During the transmission, I use my development computer to monitor the transmission. During the transmission, I can send XON/XOFF characters to the PDA. If I send an XOFF, it will "pause" until I send an XON character. It works great unless I wait for more than about 3 seconds. If the PDA is forced to wait for more than 3 seconds, the transmission is terminated with an error. However, if I send an XON character, before the 3 seconds delay, it continues the transmission and no error occurs.
    It seems that a 3 second timeout is being enf
    orced within the routines but I have not been able to determine if I have control (within the PDA Serial Routines) over the timeout variable. Personally, I would like the timeout to be indefinite unless I want to enforce one.
    FYI: Based on industrial experience, for very large files, delays during the transmission of several minutes may be necessary.
    TIA,
    Guy

    Hello,
    I apologize for the delay in responding to your post. You are having a timeout issue when using software flow control (XON/XOFF) to transfer data between a PDA and a host computer, right? Are you getting error code 7 when the PDA times out? I was able to duplicate this issue here. This error code is a timeout error and it means that not all bytes have been sent. I spoke with members of the R&D team and they know about the problem. While they were unable to offer a formal solution at this time, they did provide a workaround which I hope works for you.
    Put a while loop around the serial write VI on the PDA.
    Continue the while loop until there is no longer an error code 7 (i.e. until all bytes have been sent).
    Essentially, this will ignore the repeated timeouts from the serial write VI. You can manually add a timeout mechanism by obtaining the time before the loop and checking it during the loop. However, you mention an infinite timeout is acceptable in which case no additional code is necessary.
    I have attached a couple of VIs that implement serial communication using XON/XOFF flow control and that use the above workaround. Please let me know if this solution works for you. If not, can you provide some additional details such as the error code and if the timeout is happening on the PC side or the PDA.
    Happy coding,
    Grant M.
    National Instruments
    Attachments:
    Serial_XonXoff_(Host).vi ‏55 KB
    Serial_XonXoff_(PDA).vi ‏68 KB

  • Visa serial write

    i need to connect my electronic hardware/instrument with labview serial visa. i need to enter multiple entries as input like frequencies, data patterns in binaries. but labview serial write accepts only single string as input. pls suggest how should i proceed?

    It really depends on the command format your instrument wants.  Some instruments will let you insert a semicolon between commands and write the one long string.  Others will require separate writes.  I would use a FOR loop in this case (iterate on an array of strings).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • LV5 serial write.vi vs hypertermi​nal difference​?

    I have a rs232c stepper motor controller connected to a PC running
    NT4. I have
    full control of the device (read and write) when using the
    hyperterminal program (comes with NT4)
    and everything work fine.
    Without changing anything except running Labview<->Serial.vi from the
    LV5 distribution
    disk, I was only able to listen (serial read.vi ) to the device but
    not controlling it. It appears
    that ascii commands sent (serial write.vi) are ignore by the device,
    while the same ascii commands sent via hyperterminal are accepted.
    What are the likely reasons for this? The port parameters appears to
    be OK because
    I was able to read from it.
    TIA.

    Thank you. That solved the problem.
    > I think hyperterminal adds the EOL(end of line) itself, and in serial
    > write vi YOU must add it, try putting a LF and/or a CR in the string
    > you write, and everything should work.
    > Hope this helps

  • Need help in query to display lot and serial numbers for a Wip Job Component

    Hi ALL,
    I have a requirement as below.
    I need to display lot and serial numbers for a Wip Job Component, i have a xml report in that for each wip job component i need to check whether it is a lot control item or serial control item based on that i need to display some data. so can you please help me to get the query to indentify the lot and serial number for a wip job component.
    Thanks

    Thank you for replying Gordon.  I did not remember I had asked this before.  I no longer have access to the other account. 
    What I need on the query is that I want  a list of items with the on order quantity and when we are expecting this order to be received.  The receiving date is based on the PO delivery date.  The trick here is that  I need to Master sku to show the delivery date of the component sku.  In my scenario all components have the same delivery date for the Master sku.  If there are mulitple delivery dates because each warehouse is getting them on a different date then I want to get the delivery date for that warehouse.
    Let me know if this is possible and if yes please guide towards a query for it.
    Thank you.

  • I'm unable connect my I pad mini to my laptop(window 7,64 bit) after formatting,my iTunes didn't find my device,before format everything working properly but this time lot of problem plz help

    I'm unable connect my I pad mini to my laptop(window 7,64 bit) after formatting,my iTunes didn't find my device,before format everything working properly but this time lot of problem plz help

    You formatted your computer's hard drive? If so, it's like starting with a new computer unless you restored all of your content from a backup but it does;t sound like that's the case.
    See wjosten's excellent how-to here: Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • Merge a intensity graph to a Serial write/read

    Hey.
    I am doing my bachelor in Labview, and are using a arduino 2560 as a microcontroller for a thermal sensor.
    After many attempts on connecting the arduino to labview using LIFA.BASE I get connection sometimes, and sometimes not.
    I tried the Serial write and read program on the forum, and got much better reliability.
    I would like to use VISA, instead of Arduino int.vi
    I was hoping I could change the Serial write and read(removing the string) with putting an intensity graph in it?
    I have added the bachelor program along with the Serial write and read, can someone please help me??
    Attachments:
    bachelor_2013.vi ‏259 KB
    Modded Advanced Serial Write and Read_test.vi ‏40 KB

    There is the Simple Serial Write Read example.  That should get you started with talking over a serial port with VISA.
    It seems like you have an array of bytes that you need to send.  You just use the Byte Array To String to convert directly into a string and send it.  For reading, there is the String To Byte Array that you can use to start parsing your data.
    Show us what you have so far.  Be sure to include any sample data you may have and expected results.  Things get really confusing when stating ASCII and Hex since people can interpret that in 10 different ways.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • They stole my macbook, this it is the serial number C2*******TY3, to return to my I need your help.

    They stole my macbook, this it is the serial number C2********TY3, to return to my mac.
    I need your help.
    <Edited by Host>

    Report it to the police and your homeowner/rental insurance.
    http://support.apple.com/kb/HT2526 How to report lost or stolen Apple product

  • My laptop has broken and i have been given a new one by apple - this has changed my serial number so my Adobe Ps,Ai etc are not working and say my licence has expired. How can i get this to work?

    My laptop has broken and i have been given a new one by apple - this has changed my serial number so my Adobe Ps,Ai etc are not working and say my licence has expired. How can i get this to work?

    uninstall anything adobe 'migrated' to your new mac, clean and then properly install, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    if you need an activation count reset, http://helpx.adobe.com/x-productkb/global/service1.html

  • I am trying to load LR on my new macbook pro. It asks for the serial number. I enter the digits, but it says, quote, " This is an upgrade serial number. The serial number from your previous version of Lightroom is also required."

    I am trying to load LR on my new macbook pro. It asks for the serial number. I enter the digits, but it says, quote, " This is an upgrade serial number. The serial number from your previous version of Lightroom is also required."

    If you still have the old computer and it is a MAC, the Lightroom 5 serial numbers are in a text file.
    users/"username"/Library/Application Support/Adobe/Lightroom/Lightroom 5.0 Registration
    More info here
    Preference and other file locations in Lightroom 5

  • I just purchased LR5 online and installed it on my PC. I entered the serial number I was given and it said "this is an upgrade serial number. The serial number from your previous version of LR is also required." Since I just bought it I don't have a previ

    I just purchased LR5 online and installed it on my PC. I entered the serial number I was given and it said "this is an upgrade serial number. The serial number from your previous version of LR is also required." Since I just bought it I don't have a previous serial number. What do I enter?

    You return the upgrade version since it was purchased in error
    Return, cancel, or exchange an Adobe order
    Purchase a full version.

Maybe you are looking for

  • CS3 - Adobe Camera Raw 4.6

    I just got a Nikon D300 camera and now need something to read RAW camera files. From what I could tell, the Adobe Camera Raw 4.6 plugin was what I needed for CS3. I did download it, but when I double-clicked on the Camera_Raw_4_6 file, it installed i

  • Displaying Multiple Sentences in Confirmation Dialog Box

    Hi Experts, Can anybody please tell me how to display three or multiple separate sentences in a Confirmation Dialog box. I am able to diaplay two sentences in a single line but the dialog box is getting stretched a lot. So i want to diaply them in se

  • Hide Password in FTP_CONNCET FM

    Hi, In FTP_CONNECT we need to pass user name and password. Here if we pass hard coded password then that thing will be open to all. So my requirement is u201CHow to hide or encrypt FTP user password from user for security reasons?u201D Here I also wa

  • UnJar Jar Files

    Hello all, Could someone point me to an unjarring tool. I need to take a jar file and unjar it. Not using WinZip though. I'm told that that doesn't always work correctly. Thanks. Lynn

  • HT1529 Is 0S X v10.7,4 on my new Mac Pro

    Is 0S X v10.7 on my new MacPro?