VISA problem when setting serial read buffer on MAC?

Hello,
I have the following rather strange problem with serial communication on a Macintosh:
1. I wrote a program using the simple serial VIs provided in LabVIEW and write and receive amounts of data up to about 25000 bytes. The serial buffers are both set to 32000 bytes. If I wait long enough everything works perfect (this was just a test VI for reference)
2. I wrote the same program using VISA calls, I initialize the port exactly the same (or so I think), set and flush both read and write buffers. Then I send the data, which seems to work, except that I have to increase the general time out of the VISA session (which is already odd as it should just be sent to the buffer). However the read oper
ation allways fails. It seems that no matter how long I wait after the write operation the buffer only contains 63 bytes, where is the rest going (from the program described above and the reaction of the instrument I know that everything is sent!)? What I read is the echo of what is sent plus one extra byte, it seems that those 63 bytes are the first 63 that are sent, the buffer is thus not overwritten as I would expect if the buffersize was to small.
If anyone could shed some light on this problem I would be very greatfull.
Best regards
Koen

I haven't tried this yet but I had the same problem as you. This was
pasted from an earlier response from a post I made a month ago.
>There are 2 things to try here:
>1) Set the serial input end mode attribute to 0. The
>attribute/property name is either "ASRL End In" or "Serial End Mode
>for Reads".
>2) Use the "VISA Set I/O Buffer Size" function in the VISA Interface
>Specific subpalette. This will let you set the receive and/or
>transmit buffer size.
>LabVIEW VISA Software Dude...
Koen wrote:
> Hello,
>
> I have the following rather strange problem with serial communication
> on a Macintosh:
>
> 1. I wrote a program using the simple serial VIs provided in LabVIEW
> and write and receive amounts of data up to about 25000 bytes. The
> serial buffers are bo
th set to 32000 bytes. If I wait long enough
> everything works perfect (this was just a test VI for reference)
> 2. I wrote the same program using VISA calls, I initialize the port
> exactly the same (or so I think), set and flush both read and write
> buffers. Then I send the data, which seems to work, except that I have
> to increase the general time out of the VISA session (which is already
> odd as it should just be sent to the buffer). However the read
> operation allways fails. It seems that no matter how long I wait after
> the write operation the buffer only contains 63 bytes, where is the
> rest going (from the program described above and the reaction of the
> instrument I know that everything is sent!)? What I read is the echo
> of what is sent plus one extra byte, it seems that those 63 bytes are
> the first 63 that are sent, the buffer is thus not overwritten as I
> would expect if the buffersize was to small.
>
> If anyone could shed some light on this problem I would be
very
> greatfull.
>
> Best regards
> Koen

Similar Messages

  • When installing adobe reader on my mac it states that the installation is complete, but on same screen it states the there is an internal server error and reader will not work

    when installing adobe reader on my mac it states that the install is complete, but on same screen its sets thaw an internal server error has occurred and reader will not work

    Hi,
    I have exactly the same problem on one of my Macs (MBP 15 Mid-2010 / OS X Yosemite): Both reader and Acrobat Pro download without a hitch. Both also install with no problem.
    But once you click the program to open, they both return "an internal error occurred".  
    I tried downloading three separate copies, and still get the same error message when I install and launch.  I've also uninstalled the previous installations via CleanMyMac2 to make sure it's no longer in the SSD.  Same results.
    Am using a new SSD as internal boot drive, with fresh / clean installation of OS X and Apps (previous internal HDD crashed) -- And am seeing errors not only with Acrobat, but also with LR5 which always comes up with a "An error occurred when attempting to change modules" -- inspite or uninstall, download and reinstall.  Not sure if it's a registry issue? (Not even sure if that's the case with OS X).
    Do I need to reformat the whole SSD? I hope not!
    Thanks
    Edwin

  • UI problem when run java swing application on MAC OSX

    Hello,
    I have problem when i run my java swing application on MAC OSX.
    Dialog box is not properly visible in MAC means ita size increses.
    its size incresed and and some content or buttons on that dialog are not fully visible.
    I can only see partial message or button.
    If any one have idea about this problem then give the solution.
    Thanks :)
    Shweta

    I am using following way to create dialog
    JOptionPane optionpane = new JOptionPane(new Object[]{lblMsgUp}, JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, choices, "Save");
    JDialog dialog = optionpane.createDialog(parent, "Save");
    dialog.setSize(450, 125);
    dialog.setVisible(true);

  • VISA error when trying to read hex data over serial port

    Hi - Sorry about this. I am posting this question as a new thread as I am still having serious problems and may be able to shed more light now.
    Basically I am trying to read data formatted as a string of comma separated hexadecimal words over the serial link.
    The data is formatted thus:  <first word>,  <second word>, <third word> etc.... <last word, <CR>  where <CR> is a carriage return.
    Where each word represents a number, e.g.  AB01 is 43777 in decimal.
    Now the VI is stalling at VISA close (I attach VI again to this message), the string data is read across by the VI but it will not then close the link unless I remove to USB cable from the comms port.  When I run the device in hyperterminal I do not have this problem.  The data sting comes back fine (when I send out the command message), the carriage return is recognized as the end of the data message and the comma channel is cleared and ready to accept the next command message.
    LabVIEW is then not happy.  I don't know why but it could be that the amount of data the demo device I have is sending back is more than the NI-VISA can cope with.  Am I correct in thinking 13kbytes is the maximum.  If this were the case This would account for my problem.  It seems that the number of bytes read by the VI is consistently 12999.
    Hope someone can help or this information will at least be useful to somebody so they don't have this problem.
    Many Thanks
    Ashley.

    Yes there is. If your data contains data from 0x00 to 0xFF then you have to disable the 'termination char' in the VISA configure function. The boolean input at the top. Set it to false. Otherwise your transmission will stop at 0x0A by default. You can also tell what the termination character should be, if you want.
    btw. Still no VI attached. 
    Sorry replied to the wrong message. No I did not where are both replying at the same time
    Message Edited by K C on 12-08-2005 12:44 PM
    Message Edited by K C on 12-08-2005 12:46 PM

  • Problem when Add Serial Number for Goods Receipt PO Document

    Dear All,
    In my App I have function to Add goods receipt PO and Serial for these items of this document as code bellows:
    oGrp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
                'Add Header Goods Receipt
                oGrp.CardCode = "CC1"
                oGrp.CardName = "Card Code 1."
                oGrp.DocDate = now
                oGrp.DocDueDate = now
                oGrp.TaxDate = now
                Dim Qty As Int32 = 2
                For i As Integer = 0 To Qty - 1
                    oGrp.Lines.SerialNumbers.SystemSerialNumber = 1
                    oGrp.Lines.SerialNumbers.ManufacturerSerialNumber = "MSR01" & "-" & i
                    oGrp.Lines.SerialNumbers.InternalSerialNumber = "ISR01" & "-" & i
                    oGrp.Lines.SerialNumbers.SetCurrentLine(i)
                    oGrp.Lines.SerialNumbers.Add()
                Next
                oGrp.Lines.ItemCode = "YMY2H-BLACK"
                oGrp.Lines.ItemDescription = "My Item"
                oGrp.Lines.Currency = "USD"
                oGrp.Lines.Quantity = Qty
                oGrp.Lines.Price = 10000
                oGrp.Lines.DiscountPercent = 0
                RetVal = oGrp.Add()
                If RetVal <> 0 Then
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    Return -1
                Else
                  End If
    When Add this document I have Error : "You should use existing serial/batch numbers for this document type ". Please help me fix this problem. In my SAP doesn't have Serial for these item. Please let me know How to add serial master data?
    Thanks & Regards

    Dear,
    Thanks for your support but when I chaged code as bellows:
    oGrp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
                'Add Header Goods Receipt
                oGrp.CardCode = "CC1"
                oGrp.CardName = "Card Name."
                oGrp.DocDate = MyArrContainDocInfo(2)
                oGrp.DocDueDate = MyArrContainDocInfo(3)
                oGrp.TaxDate = MyArrContainDocInfo(4)
                Dim Qty As Int32 = 2
                oGrp.Lines.ItemCode = "YMY2H-BLACK"
                oGrp.Lines.ItemDescription = "My Item"
                oGrp.Lines.Currency = "USD"
                oGrp.Lines.Quantity = Qty
                oGrp.Lines.Price = 10000
                oGrp.Lines.DiscountPercent = 0
                For i As Integer = 0 To Qty - 1
                    oGrp.Lines.SerialNumbers.SetCurrentLine(i)
                    oGrp.Lines.SerialNumbers.SystemSerialNumber = i
                    oGrp.Lines.SerialNumbers.ManufacturerSerialNumber = "MSR01" & "-" & i
                    oGrp.Lines.SerialNumbers.InternalSerialNumber = "ISR01" & "-" & i
                    oGrp.Lines.SerialNumbers.Add()
                Next
                RetVal = oGrp.Add()
                If RetVal <> 0 Then
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    Return -1
                Else
                              End If
    I have the same Error: "You should use existing serial/batch numbers for this document type". I try config in Gerneral Setting Form as image bellow: [http://www.hoanghaicap.com/GS.png|http://www.hoanghaicap.com/GS.png]. Please help me fix this problem. I try Add Goods receipt PO with items manage by Serial it's OK but by SDK it's not OK.
    Thanks & Regards,
    Edited by: Tao lao on Mar 10, 2010 2:44 AM

  • Problem when setting encoding to ISO-8859-1

    Hi. Is there something I'm missing when it comes to setting
    encoding? Here are the code in the mxml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    </Application>
    In the html-template I'm setting:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=ISO-8859-1" />
    The code for sending data from the app:
    <mx:HTTPService
    id="service"
    url="encoding.jsp"
    method="post"
    showBusyCursor="true"
    result="onResult(event)"
    resultFormat="xml"
    contentType="application/xml"
    fault="onFault(event)"
    useProxy="false" />
    public function send():void {
    var xml:XML = <Data>{data.text}</Data>;
    service.send(xml);
    But still the respons jsp I have made says it receives the
    data in UTF-8 format? What am I doing wrong?
    Servercode:
    don't work: BufferedReader reader = new BufferedReader( new
    InputStreamReader( is ) );
    work: BufferedReader reader = new BufferedReader( new
    InputStreamReader( is, "UTF-8") );

    Are there no-one who have the same problem? I've tried
    everything imaginable, and still the serverside receives the data
    as UTF-8.
    Is it supported at all to set the encoding of the
    request?

  • Problem when setting cursor position property

    I'm trying to use property nodes to set the cursor position programmatically, following an arrow keypress.  When my actual data file plotted, the position assignment doesn't work properly.  If I clear the data from the graph (right click, clear graph), then the cursor responds properly.  I've attached a zipped file with VI that demonstrates the problem.  Sorry the file is large--I had to include my data file to properly demonstrate the problem.
    Thanks for any advice that help me clear this up,
    Allan
    Solved!
    Go to Solution.
    Attachments:
    My Source Distribution.zip ‏541 KB

    bracker wrote:
    I'm trying to use property nodes to set the cursor position programmatically, following an arrow keypress.  When my actual data file plotted, the position assignment doesn't work properly.  If I clear the data from the graph (right click, clear graph), then the cursor responds properly.  I've attached a zipped file with VI that demonstrates the problem.  Sorry the file is large--I had to include my data file to properly demonstrate the problem.
    Thanks for any advice that help me clear this up,
    Allan
    Include this code in 'Initialize' state.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Problem when I make Read Only Property True

    Dear Members,
    I have an OAF Page on which I have the below two items:
    1/ item1
    2/ item2
    These two items are message input text items and these two items will always have some value.
    To meet one of my requirement, I am making the READ ONLY property of these two items to TRUE in processRequest method of page CO using PPR Concept. After this when I am trying to access the values of these two parameters in processFormRequest method using pageContext.getParameter method I am getting the Null Pointer Exception error.
    Kindly please help me in resolving the above error.
    Note: I have created a transient variable hdr1Trans and attached this variable to the both the items i.e., item1 & item2
    Code in my processRequest method is as follows:_
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject pvo = (OAViewObject)am.findViewObject("pprPVO1");
    pvo.setMaxFetchSize(0);
    Row newRow = pvo.createRow();
    pvo.insertRow(newRow);
    OAViewObject vo = (OAViewObject)am.findViewObject("Headers_VO1");
    String status="";
    status=vo.getCurrentRow().getAttribute("Status").toString();
    if(status!=null && !("".equalsIgnoreCase(status)))
    if(status.equalsIgnoreCase("IN PROCESS"))
    pvo.getCurrentRow().setAttribute("hdr1Trans",Boolean.TRUE);
    else if(status.equalsIgnoreCase("NEW"))
    pvo.getCurrentRow().setAttribute("hdr1Trans",Boolean.FALSE);
    Code in my processFormRequest method is as follows:_
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String headerId ="";
    System.out.println("test-1");
    String item1=pageContext.getParameter("item1").toString();
    String item2=pageContext.getParameter("item2").toString();
    I am getting the NPE error when I am trying to access a record with status value IN PROCESS.
    Once I make the read only property to TRUE for both the above 2 items and after that if iam trying to access their value using pageContext.getParameter Iam getting this error.
    Kindly please help me in resolving this error.
    Many thanks in advance.
    Best Regards,
    Arun Reddy D.

    Arun,
    When you set item as readonly field, it will always show null when you will use pageContext.getParameter("<itemID>").
    If there is a VO attached with these items eg- item1, item2 then you can get the value using below code
    OAViewObject vo = (OAViewObject)am.findViewObject("<Some Vo>");
    String item1=(String) vo.getCurrentRow().getAttribute("<Attribute Name>");Regards,
    Gyan

  • Problem when signing with Reader 11.0.08

    I tried to sign using stylus for Reader 11.0.08. However, it requires double-tap to activate when signing the PDF doc.
    It is difficult for people to sign with multiple strokes (lift up the stylus for space or separating names).
    In Reader 10.1.4, user can sign much easier (not have to active with double-tap).
    Is there any setting in Adobe Reader or editing in Adobe Pro version to fix this issue?

    I use Lenovo IdeaPad, Yoga 11S, with non-digitized stylus(similar to this).
    http://shop.lenovo.com/us/en/itemdetails/AMM01TBUS/460/ECBF758B22E043D7AA80E287D05CEE39
    Do you know if any setting is set for this since version 10 works better than version 11?

  • Problems when setting SSL for a MQSeries Adapter

    I'm trying to enable SSL and so far these are the steps I've done:
    - I've been using the DemoIdentity.jks and DemoTrust.jks files located under <MIDDLEWARE_HOME>\wlserver_10.3\server\lib for all my certificate operations.
    - I created a PrivateKey and imported it to my DemoIdentity store, created a certificate request and when I got the response imported it back using the same alias. Something I want to highlight here is that when I created the PrivateKey I left the password field empty so it supposed inherit the keystore's.
    - I also imported the CA cert into the DemoTrust.jks
    My MQAdapter is all set and when I used it with no SSL it was working just fine so I think I have the problem isolated.
    Anyway, now when I try to connect this is what I'm getting in the logs:
    at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAConnectionMa
    nager$JCAConnectionPool.createJCAConnection(JCAConnectionManager.java:1335)
    ... 59 more
    Caused by: java.security.UnrecoverableKeyException: Cannot recover key at sun.security.provider.KeyProtector.recover(KeyProtector.java:311)
    at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:121
    at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java
    :38)
    at java.security.KeyStore.getKey(KeyStore.java:763)
    at com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyM
    anagerImpl.java:113)
    at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit
    (KeyManagerFactoryImpl.java:48)
    at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:239)
    at oracle.tip.adapter.mq.ManagedConnectionImpl.setupSSLSocketFactory(Man
    agedConnectionImpl.java:670)
    Googling this it seems like it's a problem with the keystore and private key passwords being different but I changed the private key's to match the keystore (something that I shouldn't be necessary because of the keytool's default behavior when generating the key) with no positive results.
    Anyway, any ideas would be really appreciated. I've been spinning my wheels on this issue for 3 days now.
    BTW, here's I'm using Oracle SOA11g.

    Hello MV,
    I don't need to access my console through SSL as this is not part of what I'm trying to do.This will confirm whether SSL has been enabled on your weblogic. In your case it seems that SSL has not been enabled.
    the demo keystore and truststore are regular stores and I was able to successfully import certificates into them using keytool.Demo keystores are not recommended to be used in production. Moreover DemoIdentity.jks already has a private (secret) key so importing another key may cause an issue. I don't think any application server supports multiple private keys for SSL.
    I'll go ahead anyway and create a brand new set of keystores just to rule out that's not the problem here.Please test with new custom keystores and let us know the results.
    Regards,
    Anuj

  • Problem when setting JTable cell color.

    hello,
    when I setting color for particular table cell, it sets.
    but, when I click another row (another cell) , the color of the previous cell disabled and it visible only when I click that cells row.
    how can I permanatly set the color for the rows depends on input data.
    for example,
    if a device is connected, I want to give the cell color GREEN.
    if device is not connected , i want to give the color as RED.
    thank you.

    but, when I click another row (another cell) , the color of the previous cell disabled and it visible only when I click that cells row.It appears you applied color to cell editor.
    tableObj.getComponentAt(x,y).setForeground(Color.red);
    tableObj.getComponentAt(x,y).setBackground(Color.red); or could be solved properl if you post the code

  • Audio Problems when setting default device

    Everytime I try to set my headphones as the default sound device, my computer won't allow me to. I even tried to troubleshoot it, and it came up with the resolution of setting my headphones as the default device, but it failed to due to an error.
    It only occurs whenever I use the program Mumble, as I am a gamer and I use it to communicate with my fellow gamers. So whenever I fire up the program, all other sound except what comes from it, goes to my speakers. I don't know if this has to do with the program Mumble itself, or the fact that I LITERALLY cannot change my default device. Please help?

    What version of Windows are you using? 
    Also, could you please give me the exact model number of your notebook?
    You can use the following document if you need assistance in finding it.
    http://h10025.www1.hp.com/ewfrf/wc/document?tmp_renderType=findModel&cc=us&dlc=en&docname=c00033108&...
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Problem when closing Adobe Reader on firefox

    Hi, normal windows in firefox can be closed using "Ctrl + W"
    But when i open a PDF on firefox (with adobe reader plugin) if i press "Ctrl + W" it ask me to close all windows...
    Why?
    Is there any way to resolve this?
    BYe
    [sig deleted by host]

    Are you using the Adobe Reader plugin, or Firefox' own PDF viewer?
    Are you using the Adobe Reader plugin, or Chrome's own PDF viewer?
    Also, what is your installed Reader version?
    See http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • SSL-Problems when setting up a test environment with Exchange

    Hello everyone,
    I am trying to set up a test environment with Exchange 2013 to learn how the stuff works. However, I am facing some problems due to the fact that Exchange is designed for use with SSL certificates. The main thing that makes problems is the connection with
    RPC over HTTP. I've used the MS remote connectivity analyzer to find out why it is not working and as I thought it is because of a missing SSL certificate (it seems the self signed doesn't work here). Now in order to get this working I just bought a certificate
    for "mydomain.com". Now here is the first problem: This certificate is NOT a wildcard certificate. So if I understood correctly it works for mydomain.com but it won't work for subdomain.mydomain.com. Is this correct? (First question)
    If this is correct I will probably another problem: As I said this is a learning-environment so the server is at home behind a router. This means: Only one WAN-IP. I think could get this working by forwarding everything to the Exchange Server (like mydomain.com
    goes to the WAN-IP where the router is forwarding everything like port 25 or 443 directly to the exchange Server). This way I wouldn't have any problems I think: mydomain.com has a valid SSL cert, it resolves to my WAN-IP which forwards everything to the internal
    Exchange Server. Now here is the problem: I plan to setup a SharePoint Server as well. I thought about using ARR (IIS) to make both available behind the same WAN-IP without using ports inside the url. Ideally the Exchange Server should then be available via
    "mail.mydomain.com". This will work fine with ARR but then I probably have SSL problems again? (second question)
    Do you have any ideas what I can do to solve such problems? Should I buy another certificate for mail.mydomain.com? But then I would need to buy several certificates (e.g. for autodiscover.mydomain.com to get this working as well). This can become very expensive...
    Thanks!
    Regards
    Christian

    Hi,
    For your first question, if there is a single certificate just for “mydomain.com”, it cannot work for subdomain.mydomain.com.
    Generally, antodiscover.domain.com is used to access the autodiscover service for external users. If you just need test users to access Exchange server from internal environment, it is not necessary to get a certificate for autodiscover.domain.com.
    Therefore, for your second question what I can ensure is that if all URLs that used to connect Exchange from internal and external are configured to mail.mydomain.com with all services(IIS,SMTP,POP,IMAP), there will be no certificate problems in Exchange
    side.
    Best Regards,
    Winnie Liang
    TechNet Community Support

  • Encounter problem when opening adobe reader

    Whenever I tried to open the adobe reader, it immediately indicates there is an error and Windows have to close it.
    I tried to uninstalled and re-installed the adobe reader but the problem is still remaining. Please help

    Disable Protected Mode via the registry: download, unzip, then run the registry script from https://files.acrobat.com/a/preview/9b111651-9168-4fdc-aed3-a463a60cf91c

Maybe you are looking for

  • Credit Limit - How to Use the Foward button in VKM4

    Hi all, I have an enquiry here. In VKM4, we can see that there is a 'Foward' icon where we will be able to foward the respective sales order to an authorize person for approval. After I Foward and Save it, system only prompts me saying the SO has bee

  • FX 5600 VTDR128 and WinCinema Manager

    Hi, I try to explain my problem; when I install the "InterVideo WinProducer/Wincoder" CD on WinXp Home Sp1 the screen show mw the following error: WinCinema Manager.exe, 1.0.0.1, nvgpio.dll, 1.0.1.6, 000017ea. The VGA driver are the last version. My

  • Error in Installing Netweaver--domain controllers are not supported

    When i make the pre-requisite check for installing Netweawer 2004s I am getting the follwoing error <b>installation to domain controllers are not supported</b> Pls help me how to resolve this Thanks in Advance

  • Connect to Windows Server shares

    We have recently purchased two MacBook carts. I'm trying to connect to home directories on a Windows Server from Go/Connect to Server. When I enter the SMB path, I get "Failed to Mount Volume". I can see the root level share but not drill down any fu

  • Using AppleScript to return name in Automator

    Trying to create an AppleScript action to return the name of the item handed to it by the Automator. As it the script fails to complete with and error "Check the actionʼs properties.." If I remove "name of" in the return command, i get the path of ta