Single Serial Packet vs Multiple Packets

Hello,
I am trying to program a stepper controller (Anahiem Automation DPE25601) via a usb to serial connector.  Their manual doesn't say how to load a program onto it, so I got a serial port listener used their sample program and found out how to do it myself.  However, it doesn't seem to like sending the entire program in one serial packet, only working when each line is send as seperate packet.  However the data I send is the exact same as their provided sample program.  One thing is that each line is seperated by a carrige return.  Do know why this might be?
Thanks,
Eric

Because that is the way they chose to terminate their commands. If it works when each line has a carriage return then use a carriage return.
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

Similar Messages

  • NIO + multiple packets

    How does a web server take multiple packets from a client and make one large request out of it?
    I have a NIO server which until now has always assumed "requests" were being sent with one packet. Thus, I built my code to always assume each request = one read from the selection key = one action I take.
    For example, if I sent "hello there server" as a command, the server would parse "hello there server" and I would execute some return logic based on that request.
    Now I have very long requests that are being received as multiple packets. For example "hello there server blah blah blah" is being recieved as "hello there server" (packet 1) and then "blah blah blah" (packet 2). (just humor me, it happens with longer requests than that ;-)
    I assume this happens a lot with http servers - So how do I put multiple packets "together" in NIO? Would I store the contents of each packet into memory until the last packet of a request arrives, then parse the request? Thanks!

    If your packets are character strings you can use the fact that CharBuffer implements CharSequence and can be used much like a StringBuffer. See the code example below. Otherwise you could just keep a ByteBuffer and copy the data from using put.
    Here's the example for strings, the rest of this application is in my post Taming the NIO Circus
         // reception support
         // receive a string
         private void doRead()
              String dat;
              while(null != (dat = readLine()))client.fromRemote(dat); // send it back to the client
              if(atEof)close();
         private String readLine()
              String s = null;
              fill();
              int len = recvString.length();
              int n = firstNL();
              if(n == -1)
                   if(atEof && 0 < len)
                        s = recvString.substring(0);
                        n = len;
              else
                   s = recvString.substring(0,n);
                   if(len > n+1 && recvString.charAt(n)=='\r' && recvString.charAt(n+1)=='\n')n+=2;
                   else n++;
              if(n > 0)
                   recvString.delete(0,n);
                   recvScanned = 0;
              return s;
         public boolean fill()
              CharBuffer buf;
              int len=0;
              recvBuffer.clear();
              try{len = sch.read(recvBuffer);}
              catch(Exception e){e.printStackTrace();atEof=true;}
              recvBuffer.flip();
              if(len > 0)
                   dout(1,"read "+len+" bytes");
                   try
                        buf = decoder.decode(recvBuffer);
                        dout(0,"received="+buf);
                        recvString.append(buf);
                   catch(Exception e){e.printStackTrace();atEof = true;}
              else if(len < 0)atEof = true;
              return atEof;
         // scan recvString for first new line
         private int firstNL()
              while(recvScanned < recvString.length())
                   char ch = recvString.charAt(recvScanned);
                   if(ch == '\r' || ch == '\n')return recvScanned;
                   recvScanned++;
              return -1;     // no cr or lf
         }

  • Single source can transmit multiple group in multicast

    single source can transmit multiple group in a multicast domain

    I am not sure how to start explaining this, but I will give it a try to my understanding.
    1)
    Look up the MAC Learning section in this link.
    http://www.ciscopress.com/articles/article.asp?p=101367&rl=1
    2)
    Once you have read through then your question would be if switches deliver traffic based on mac address of the end hosts, how is this mapping achieved for multicast addresses, as they are not assigned to any host.
    in this case the switch will consider the multicast packet as unknown as will broadcast it. To avoid that a simple mechanism of multicast
    IP to mac conversion was introduced which would create these temporary mac's based on the membership report of end hosts
    for a certain group. So when this conversion is done apart from the real host mac address pointing to the port where it is connected,
    multicast mac also points to the same port. Based on which the switch is able to forward the traffic intelligently to a set of hosts
    who want that group received.
    3)
    Now see this link which explains how Mcast IP to MAC convesion is done.
    IP to MAC Conversion
    http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/ipmulti.htm#wp1020628
    To summarize this, since only 23 bits are available for converting the IP to MAC, the 24th bit is lost .
    which in terms of binary to decimal means you have lost 128 from the decimal. so it loops from the start of the multicast range of 224-239 at every 128 bits.
    if the starting decimal was 224.1.1.1(if the received membership report was for 224.1.1.1) then next would be 224.129.1.1, 225.1.1.1 , 225.129.1.1 and so on till 239.......
    hence when it loops through all the 224 - 239 addres range and it catches up 32 mapped addresses.
    Now to conclude,
    "32 IP multicast addresses corresponding to each MAC " In here the MAC referenced is not the host mac but the converted MAC.
    Even though the conversion is done, because of the available bits the MAC address hence created overlaps 32 multicast IP
    addresses. (closest resemblence would be the ACL example with the mask assigned. based on this mask and the starting value
    it will keep catching values based on the mask. )
    You can try this practically. Assume you have a host and it sends a membership report for 225.10.10.10. Now the switch has to convert this to Mcast MAC.
    To do this yourself, write down the binary of this address, and look at the rightmost 23 bits (that is from the left ignore the first 9 binary values.) now if you look at the remaining binary values, these will map and look alike for 226.10.10.10 226.139.10.10 and so on. And hence if you run through from 224-239 you will get 32 adresses.
    HTH-Cheers,
    Swaroop

  • Single idoc generation for multiple sales orders

    Hi,
    Pls let me know how do we generate single idoc for multiple sales orders.
    Its not collecting idoc. As we know we can generate an idoc for one sales order correspondingly
    my requirement is to generate single idoc number for multiple sales orders.
    Do we need to write a program.

    Amar,
    To understand take HRMD_A04 as example. Root segment has Maximum 9999999999 defined.
    Segm.type       E1PLOGI
    Minimum number  1
    Maximum number  9999999999
    Parent segment
    Hier.level      2
    This means that this IDOC types has capability to hold multiple HR Master data objects. PFAL program creates this IDOC and it has facility to mention the Objects per process, check selection screen.
    I checked for INVOICE01/02 its not possible there. Hope this clarifies.

  • Single Transfer Order for Multiple Handling Units

    I have been researchig the ability to create a single transfer order for multiple handling units.  My assumptions are if it can be done that:
    1) A transfer order can have a single source, so if the source document for the handling unit (delivery) is different, that means different transfer order
    2) A TO can have multiple materials (line items) with different destination bins and quantities per bin
    I looked at the configuration for TO Split, but it's not clear that this will handle my requirement.
    I also saw this http://aq33.com/material-management/Articles-005798.html and it also says that my requirement can't be meant.  I'm just checking before I tell my customer this cannot be done.

    Yes you are right, if Source document is different, you need to go with different TO.
    But you can choose the Handling unit split, while creating a TO itself. i.e., You can quantify the goods for each handling unit.
    Edited by: Ganesh M on Feb 29, 2012 6:20 AM

  • Single proforma invoice with multiple deliveries

    Hi
    I would like to know how to create a single proforma invoice with multiple delivery numbers. Please let me know how?
    Thanks

    Apart from the above option, you can also use T-code VF04 i.e. Billing due list
    Regards,
    Sagar

  • Single billing document for multiple delivery documents

    Hi,
    Can someone tell me how to configure or proceed to make single billing document for multiple delivery documents.
    Document flow: Contract--> Order---> Delivery----> Billing
    -Thanks

    Being an old member of the forum, there is no need to stress the importance of adhering to forum rules where it has been clearly spelled out to avoid posting repeated queries.
    If you search the forum or Google it, you will find lot of documentations available on the same topic.  Take the inputs and try on your own.  Still if you face any issue, update here.
    G. Lakshmipathi

  • Single performa invoice from multiple delivery

    Dear sir,
    my client requirement is they are doing one delivery and creating one performa invoice in export scnario while selling from plant and while doing export issue they have to take refrence performaa invoive .
    so they want to create as ingle performa invoice from multiple delivery for which already respective performa invoices have been created.so i want a single performa invoice from multiple delivery so tell me how to do it?
    thanks
    Debesh

    Go to VTFL and maintain as follows:-
    At Header
    Copying requirements:::::::::009
    At Item
    Copying requirements:::::::010
    Data VBRK/VBRP::::::::::::003
    thanks
    G. Lakshmipathi

  • Single ERS Invoice for multiple POs with different GS and same IP

    Dear All,
    I have a Requirement as per the below scenario:
    We need to have single invoice created using ERS (MRRL) functionality in the below scenario:
    Two POs created with different Partner function GS (goods supplier) and same IP (Invoice party partner function).
    Ex:
    GS IP PO GR ERS
    vendor1 10001 4500001 500001 Yes ( GR-IV-Yes, GR done- Yes, same payment terms - 001)
    vendor2 10001 4500002 500002 Yes ( GR-IV-Yes, GR done- Yes, same payment terms - 001)
    When I run ERS for last 1 week (GR) and select the option (Doc selection – per IP or other criteria like GRs posted in last one week) , system should create 1 invoice document. Standard SAP posts 2 documents for each GS.
    I have tried using 2 user exits for MRRL, but none of them work for this functionality.
    Thanks,

    Hi,
    Go for  MIRO without MRRL.
    Instead ERS, you can post single  Invoice(MIRO) for multiple POs  for one vendor.
    OR
    Check with Technical consultant and go for development to have single ERS output for multiple ERS invoice documents for single vendor.
    Regards,
    Biju K

  • Single Supplimentary Invoice for Multiple Invoices

    Hi
    We are having Standardmanufacturing sales Process
    Ex: We did the sales of 1000 quantity of  goods over the period of time for Price  100 Rs/ and we had created invoices also in the system .After 3 months with the customer on mutual undersating we have decided to hike the price  110 Rs on excisting sales, Now i want to create Single Supplimentary invoice for multiple Invoices for the hiked amount 10,000 Rs( 1000 *10=10,000) along with Excise duties.
    Please help me out to map this senario in sap
    Thanks
    Mujubur
    09967919351
    Edited by: mujubur shaik on Nov 9, 2009 8:06 AM

    Dear Mujubur,
    It is generic feature of a business that price is changed for various reasons. So excise accounting is adjusted corresponding it.
    What you do, please create a debit memo request which is a sale order type document by VA01 with reference of all commercial inovices against which you want to create the single supplementory invoice. Then create a debit memo which is a bimming document by VF01 with reference of that debit memo reuest and do the release to accounting.
        Then part A/C will be debited and all other corresponding accounts with Excise provision A/C will be creadited. Now create a billing type as proforma invoice (Bill category U) in configuration and mainatin the copy control from debit memo document type.
    It is better to do the configuration first. Then create the proforma invoice with reference of that debit memo. It will be like a image document of the debit memo. Then create excise invoice by J1IIN with refernce of that proforma invoice with different number series if you want tom maintain. Then excise account will take place -  Ex provision Dr ,  ED payable Cr. That Excise document is  your desired supplementory excise invoice. It will also come in the scope of excise utilisation in J2IUN. The proforma invoice is to be created other wise excise document with transaction type DLFC will not vecreated as it creates only from proforma inovice , not from any other type of billing document.
        Don't go for Excise JV. Apparemntly it is seemed that will be easier but your accounting will be wrong and there will be no track of data which will lead a problem for long run.
    Please do it.  If more help required then inform. I have implemedted the same process.
    Hope this will serve your purpose.
    Regards
    Indranil

  • I run a mac air on a single user account but multiple people using it, which is ok for the situation. All have their accounts in the apple mail app. what is missing for me is a separate password to access the mail account. otherwise anyone can see anyones

    I run a mac air on a single user account but multiple people using it, which is ok for the situation. All have their accounts in the apple mail app. what is missing for me is a separate password to access the mail account. otherwise anyone can see anyones
    Any clue, how i can add a mail account to apple mail app, but with separate password / pin to open it.
    Years ago there was a program called mail switcher which added this functionality, but thats gone.
    cheers
    Tom

    They would have to be logged in as separate users in order not to see your account in Mail. Whatever accounts put in Mail under your account will show up. All mail accounts usually have there own user and password. The only thing you can do is to remove the password from Keychain and take the account offline so you don't keep getting prompts for passwords each time it checks for mail.
    Not a great solution.
    Best way is to give the other user their own user account with their own mail and enable fast user swithcing to log between the different users if all access the computer frequently.

  • Using single SMB share with multiple Hyper-V clusters

    Hello,
    I'm trying to find out if I can use a single SMB share with multiple Hyper-V Clusters. Looking at:
    How to Assign SMB 3.0 File Shares to Hyper-V Hosts and Clusters in VMM
    I think it's possible. Since the File Server is going to handle the file locking it shouldn't be a problem.
    Has anyone tried that?
    Thank you in advance!

    Hello,
    I'm not sure that's possible, I get this from this statement:"Assign the share—Assign
    the share to a virtual machine host or cluster."
    Even if it worked I wouldn't do that. Why don't  you just create multiple shares?

  • Single step workflow with multiple approvers (without using a group)

    Hi,
    is it possible to have a single step workflow with multiple approvers without using a group? This is for a contract document.
    i want to add a number of users based on particular logic. The approvers are random and do not belong to any particular group.
    DO let me know if it is possible or if any of you have done that.
    thanks in advance.
    regards,
    rubio

    Hi Rubio,
    I believe the behavior would be, if individual users are added as approvers then the system would require each approver to approve the document. However, if you use the user group, you could set the role so that it would be either ALL or ANY.
    Regards,
    Vikram

  • Does lion server support a single email address across multiple devices??

    I am looking to move from an outdated Microsoft Exchange Server 2003 to OS X Lion Server but I am unsure as to how Lion will handle email. I do not want to spend money on a new windows server if I can get a Mac Mini Server to do the job. I am a very small business with a number of email accounts for a couple employees and need access to email and calendar from both the office iMac's and my Macbook Pro when on the road. My IT guy says I need Exchange but he's been off base on a few other items recently and I wanted to check with other sources.
    I have 2 new iMac's, a MacBook Pro, an iPad1 and and iPhone4 on the mac side of things and 2 windows computers running XP. I would get rid of the windows computers completely if not for my CAD program which runs best not in a virtual machine mode.
    How well will email and calendar entries sync across devices?

    I have a very similar setup at my office. Lion Server will push email, calandar, contacts to all of your apple product with out a hitch.
    As far the Windows XP machines, you can access email over IMAP with Thunderbird, and calandars via sunbird or the built in web app.
    I would ditch the exchange server move to Mac OS X Server, and never look back.
    God Luck!
    PS. All of your devices will be in sync all the time.
    Shore answer:
    Does lion server support a single email address across multiple devices??
    Yes.

  • How do I create a single PDF file with multiple pages?

    Hi, I occasionally need merge several jpg images into a single pdf file with multiple pages (one Jpg per page). I have tried doing this on Preview, and by selecting all the pages I want to include in my document and trying to save to Pdf through the "Print" function, but every time it only saves the first page.
    Can anyone tell me if there is a way to save multple-page pdf files without having to purchase a specific program (i to this too infrequently to justify the cost)?
    Thanks very much,

    This works for me...
    Open first image in Preview View > Sidebar. Drag the other images into Sidebar, then select all.
    From File menu > print selected images. Choose PDF > Save as PDF
    -mj

Maybe you are looking for