VISA USB RAW buffer

Greetings,

I have a USB device, I need to communicate with the help of Labview. There is no drivers for this device so I put in place as a device USB of VISA GROSS. I am able to communicate with him, fine, for the most part, but I have problems with data loss.

This device to stream to the host at a rate relatively high (~1MByte/sec) and I have 3 of them I need to get data of continuously. Data is sent in packets of 512 bytes. When calling VISA Read I Specifies the amount of data I want to read from the device (for example 512 000 bytes approximately 0.5 seconds of data) and the data is received without problem since all 3 devices.

My problem is that it takes a little short of time nothing to do with the data I just read and read the next time I do a different reading VISA, I lost the data that should have been included while I was managing the data from the old. I simplified my Labview code so that it doesn't the data analyze a few bytes and paste the rest in a queue to be processed in another while loop, but even this bit of transformation takes a few milliseconds. Milliseconds that few data are lost when I next read VISA.

I think the problem is that USB transfer must be initiated by the host, which means that any buffering must be done in the camera itself, and that this device is not all the buffering. Is this correct? Y at - he tips that I can use to make "continuous play" from a VISA's USB device?

I might be able to shorten the processing time a little more by not doing ANY analysis on the data, just read and paste it into the queue, but even that will probably take long enough I'll miss a few packets of data (each packet is less than 500 of data).

Thanks for your suggestions.

Dave

You can have several USB readings operate in parallel feeding a notifier data.  Can manage data notifier later in your code.

I did it with HID before calls to no HID updates were missed.

Shane.

Tags: NI Software

Similar Questions

  • Interrupt the usb write buffer: how 8 bytes to write string

    Hello! I use USB RAW: interrupt method to read and write data of 8 bytes each time. However, I have a problem writing 8 bytes in the buffer... I want to write in such a way that I have control of all 64 bits (8 bytes) of façade... I tried the method illustrated in the figure below... but my 8 bytes became 8-bit effectively... How can I make 8 group of 8 bits transferred 8 bytes effectively?

    "1100100011000011001111010," Hi

    which is the 3rd step, that you can't do?

    In any case, see weed...

  • visa usb communication in bulk - several end points

    Hi all

    I'll put up a spectrometer optics USB2000 + ocean and want to use visa instead of the dll that I had with the spectrometer (I had a lot of stability problems, moreover, this is not supported by the ocean optics and I won't have to pay for the new version).  I have documentation for the spectrometer and were able to set the integration time and receive ghosts as quickly that the dll has been able to.  But I was not able to read the information of calibration of the spectrometer.  All controls use the transfer block, so I use visa read and write to send/receive.  I think it's the difference between the spectral data and calibration data, that the data comes from different points of termination.   The spectrometer has 4 endpoint addresses (3-PC = IN, 1 PC = OUTSIDE).  The spectral data returns to the first endpoint and the calibration data is on 3rd in.

    Is there a setting I need to change to read from a different end point?  They are all in bulk type according to the documentation.  Any suggestion would be appreciated.

    Thank you!

    Hey gharris,.

    It seems that there is a parameter, you can change by a property node that will change reading from what endpoint. If you use a text-based program, the property, you need to change is VI_ATTR_USB_BULK_IN_PIPE. If you are using LabVIEW, follow these steps:

    First of all, to ask a VISA property on your block diagram node (really any node property works). Then, right-click on the property node and select Select class-> VISA-> / o Session-> USB Raw. This step can be found in attached below EndpointSS1.png and change the property node to a node property USB Raw. Thirdly, left-click on the property and select settings USB-> pipe in bulk. This step can be found in EndpointSS2.png, attached below. It is the property that defines at what endpoint to read from. To change the value of the present, right-click on the property node and select change all to write, which will allow you to connect to an endpoint value.

  • Interruption USB Raw: flow of data between USB Raw Device and Labview!

    I do the USB communication between device (Microcontroller) Labview and USB RAW. I did all the things like the raw driver OR USB and I am able to get the 8 bytes using getusbinterrupt.vi, but my application requires continuous data transfer between pc and microcontroller, inorder to achieve that I put continuous loop in the microcontroller, so it transfers the data of continuos on pc, (in this case e.g.0 to 255 and again from 0 to 255 and so on.) , but I'm not able to get increment of 1 as written in my program, instead of that I'm getting increment of 5 to 10... is it because Microcintroller is very fast as my pc? If so how can I get continuous data without breaks...

    I enclose... graphic instant with output vi this jump of the variable data... I run my vi continuously on mode...

    Like, I would also like to write to the device with labview, can you also suggest for this also? I read messages like:

    http://forums.ni.com/ni/Board/Message?Board.ID=170&message.ID=382144&Query.ID=445342#M382144, but I am facing the same problem as this user...

    Thanks in advance.

    MRS.

    26314362 wrote:

    I enclose... graphic instant with output vi this jump of the variable data... I run my vi continuously on mode...

    MRS.

    Run a quick code continuous mode is completely unnecessary.

    In your code you continiousely who and unregster events, it takes a while, maybe the following will help to improve the code:

    I don't know, but you might be able to reuse the event.

    Tone

  • I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages for only one comand I need all four messages to display at the same time in VISA SERIES READ BUFFER

    I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages of single command given to this instrument... and I read messages through VISA series READ... during the race, the VI buffer displays the messages individually...  I need all four messages to display at the same time in VISA SERIES READ BUFFER, in order to find more than this block, I should add from the palette of function.

    Disable character of endpoint detection or make four readings where you concantanate simply the strings together.

  • Sensor USB - RAW VISA MAX Sylvac

    Dear community

    I am a new user of LabView and I would like to read the data from a distance sensor Sylvac USB (see here for the link to http://www.sylvac.ch/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=201&category... sensor).

    When I use the software provided by Sylvac, no problem everything works fine.

    Note that it is not possible to create a secure Channel as Sylvac does not provide drivers for this particular sensor unlike this post http://forums.ni.com/t5/LabVIEW/How-to-read-out-data-via-usb/td-p/2042980 .

    I created the driver NI-VISA following this procedure (Assistant of the Driver NI-VISA)

    http://www.NI.com/white-paper/4478/en/

    In the MAX, the sensor is correctly detected.

    With the help of a Cokehead USB (USBlyzer) and using Sylvac software and drivers, I found that the software sends a command for the sensor to apply for the position (? \r or 3F 0d in HEXADECIMAL) and the sensor to respond by sending the position (see attachment for USBlyzer report).

    When I do the same thing with MAX test panel and drivers of NI-VISA, I am able to see the 0d 3F, then the 2-byte buffer, but no return of the sensors (see attachment).

    Anyone know what I am doing wrong, or what direction I should look for?

    Thanks in advance

    Best regards

    Florian

    I finally "solved" the problem by changing the sensor with the USB to one with RS232. Thanks for your replies.

    Florian

  • VISA USB

    While NI-VISA supports three types of USB pipes: Does control, in bulk and interrupt, this means that we can develop any device driver USB on this three types and we must not any other low level layer of knowledge? For example, if write us raw data, we simply use the essential mode of writing, and then outgoing data usb would be out of our written data.

    I do not understand your question.

    VISA takes in charge three of maximum 4 eligible different available for USB transfer mechanism.  Isochronous is not supported and a transfer with loss that is not interesting to test and measure in any case.  It is intended only for audio and video where a few lost packets are not so bad.

    All USB devices may support ONLY these four types of transfer.  Note that this does not describe WHAT needs to be transferred by using these methods, only HOW the data is transferred.

    Each device implements its own mix of commands that can be received by transfer of control (all devices are supported on a certain set of commands on the control endpoint zero for the configuration of the device), in bulk or interruption or a mixture of the three.

    If a device does something different than is described in the specification of USB protocol document is not USB conform.

    Shane.

  • LabVIEW Visa Usb VI

    I send you a picture of samples using usb visa communication. The sample size is 12 bits, due to the resolution of the ADC and the size of the buffer

    of USB is 8-bit. The program must divide each sample to two bytes (each sample must

    be divided to the valuable part less and more) in order to use the USB buffer. There for each

    sample occupies two buffers of the USB and it can send in 32 samples of the signal for each

    transaction, because the USB port can just transact 64 bytes set to maximum speed. I have developed a program to rebuild analog signals of these samples.

    If I send the table consist of four different signals separated by a few special characters and I have to show four different signlas, separated by special characters. Please suggest me any changes in VI attached to four signals to separate and display. The attached vi is to display a single signal

    Hi, you can parse the string and cut with the chain of research/Split. The wire of the output to an indicator of the string string. You can follow these steps to use this feature:

    1. Add Research/Split String function in the block diagram.
    2. Thread the string to split at the entrance to a string of the search/Split String function.
    3. Enter the text that shows where the string should be split at the entrance of the research/Split String function string/char to search .
    4. Offset, enter the number of characters in the string to pass before the function of research/Split String begins to search text in the Search/char string.
    5. Connect the substring before game and out of game + rest of string of the function of research/Split String String of indicators or the screws or the functions that accept a string as input.
    6. Run the VI.

    Kind regards

    Miguel Fonseca

    Technical sales engineer

    National Instruments

  • Help with interruption USB RAW

    Hello everyone.

    Sorry more English translation was made by Google.

    I need help to get the buffer in the attached code USB interrupt.

    int CVICALLBACK executarPrograma (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
    {
        ViUInt32 contBufferLido;
        ViUInt32 tamanhoBufferLeitura = 50;
        ViUInt32 contLeitura;
        unsigned char bufferLido[50];
        ViStatus STATUS;
        ViSession USB_FIND;
        ViEvent evento;
        ViEventType tipoEvento;
        ViSession USB_INICIO;
        ViUInt32 numInstrs;
        ViString identificador_usb = "?*USB?*{VI_ATTR_MANF_ID==0x04D8}";
        char instrDescriptor[256];
        ViFindList findList;
    
        switch (event)
        {
            case EVENT_COMMIT:
                SetCtrlVal(panelHandle,PANEL_NUMERIC, 11111);
                // abre a conexão padrão para poder encontrar o dispositivo usb
                STATUS = viOpenDefaultRM (&USB_INICIO);
                if(STATUS != VI_SUCCESS)
                {
                    MessagePopup("ATENÇÃO","Não foi possivel abrir a  viOpenDefaultRM");
                    break;
                }
                // procura por um dispositivo USB
                STATUS = viFindRsrc (USB_INICIO, identificador_usb, &findList, &numInstrs, instrDescriptor);
                if(STATUS != VI_SUCCESS)
                {
                    MessagePopup("ATENÇÃO","Não foi possivel abrir a  viFindRsrc");
                    QuitUserInterface (0); // força o fechamento do programa
                }
                SetCtrlVal(panelHandle,PANEL_TEXTBOX, instrDescriptor);
                SetCtrlVal(panelHandle,PANEL_TEXTBOX, "\n\r");
                // abra a conexão com o dispositivo usb encontrado
                STATUS = viOpen (USB_INICIO, &instrDescriptor[0], VI_NULL, VI_NULL, &USB_FIND);
                viSetAttribute(USB_FIND,VI_ATTR_MAX_QUEUE_LENGTH,100);
                viSetAttribute(USB_FIND,VI_ATTR_USB_MAX_INTR_SIZE,61);
    
                STATUS = viEnableEvent (USB_FIND, VI_EVENT_USB_INTR, VI_QUEUE, VI_NULL);
                STATUS = viWaitOnEvent (USB_FIND, VI_EVENT_USB_INTR, 50, &tipoEvento, &evento);
    
                SetCtrlVal(panelHandle,PANEL_NUMERIC, VI_ATTR_USB_RECV_INTR_SIZE);
                STATUS = viRead (USB_FIND, bufferLido, tamanhoBufferLeitura, &contLeitura);<-line 68
    
                STATUS = viClose (USB_FIND);
                STATUS = viClose (USB_INICIO);            
    
                break;
        }
        return 0;
    }
    

    I have connected to my PC a PIC18F4550 which sends a buffer of 40 bytes each 1ms.

    In labview using the 'VISA on event function Wait', then 'Get USB Interrupt Data"here in LabWindows, I'm not able to solve this problem.
    One other strange thing is when I use the variable tamanhoBufferLeitura = 50 I get this error
    , and when you put the tamanhoBufferLeitura = 0 variable does not get the error while using the "SetCtrlVal (panelHandle, PANEL_NUMERIC, VI_ATTR_USB_RECV_INTR_SIZE);" to know the size of the reading of receive buffer, a very high value (1073.693.104).

    If anyone can help me or you can post a code example in LabWindows done using USB interrupt, very grateful.

    Ivan

    Song of the

    Thank you very much.

    The biggest problem is to understand another language, but with your help, I finally get the size of the buffer.

    Their support was excellent on this issue.

    Ivan

  • Can you change the type of device to 'USB Raw resource' to GPIB controller?

    I'm trying to configure a GPIB FL Contec GP - IB (USB) controller in MAX.  I could so he can register through the creation of a pilot of the Assistant driver VISA, but it fits as a "gross resource USB" rather than as a GPIB controller.  I can send and receive information from the controller, but it does give me an option to search for connected devices of GPIB communicate with them.  Is it possible to change the type of the device, maybe by manually changing the driver created by the wizard of the NI-VISA driver?  Thank you for your time.

    N ° do not use MAX at all. You can just create a GPIB-USB controller on your own. You should contact the seller.

  • How to write the raw buffer grabber (table 2D) image to PC memory?

    Hello

    I use a library C++ and NIImaq to save table raw image 2D on PC.

    I have a PCI-1428 acquisition card.

    Now, I'm writing a 2D framebuffer grab table memory PC I assigned using virtualalloc.

    Any way to do it?

    Thank you

    Travis

    Hi Travis,

    After further research, I found that you can use the imgSessionCopyBuffer function (see the reference help function OR-IMAQ for more information) to transfer your data from the memory embedded in your designated PC buffer.

    Also, you can find more information on how to set up in the developer zone article below Acquisition ring (Versus the system of onboard memory section memory speak your specific question).

    DevZone: Ring Acquisition

    Hope that helps!

    See you soon,.

  • USB Raw error:-1073807298 - I don't think that there is an easy solution...

    Hello people,

    I am currently working on the implementation of a temperature regulator using a distributed seller USB driver.  I spent the last three weeks, this troubleshooting error:

    I suffered from seemingly random and intermittent communication problems in communications instrument USB as well. In a particular case, it is with a USB device of NOR. The problem actually proved to be the USB cable to the device. Someone had replaced the original OR with a less robust cable cable. Cable OR original had a Pearl of ferrite at one end to help the noise to remove. The replacement cable is not. Once I changed to cable OR origin, intermittent problems went away. I don't know if this is your problem, but a good cable USB makes all the difference in this application.

    Good luck.

  • Which driver I'm missing for NV40-3CLE with the 1073807202 error has occurred at the VISA Flush IO buffer

    I already downloaded the drivers and programs I thought I should use LabVIEW to control the NV40 - 3CLE Piezosytems Jena but when entiring any command and run the vi, this error message appears in the source.  I have no idea where to go from here.

    I'm pretty new to LabVIEW, so any ideas or recommendations would be appreciated.

    Thank you

    Dkeefe and confused

    First of all, make sure that the com port is listed in MAX and it really belongs to your instrument (unplug the USB cable and see if the port goes away). Then run the connectioninit function.

  • acquisition through VISA &amp; USB scale

    Hello

    I try to acquisitionning the value of my scale of KERN, via a USB port (the output of the device is RS 232) with the attached vi. My problem is I want to make an acquisition about every hour. If I put a waiting time in my moment of loop than even 1 second, it seems that the device remains set until we ask for it. So more time is running, more the offset is. Any idea on what I am doing wrong?

    Thanks in advance for your help :-)

    Sylvian

    Thank you all for your suggestions. I finally found a way (see VI) attached.

    Sylvian

  • Executable form LabVIEW

    Hello

     

    I am new to Labview.So, I have some doubts about labview.

    The major role of Labview in my current project is for GUI development.

     

    1. How can I record the Labview graphical end-user interface?, I mean I'll save as exe file and run in a system in which Labview is not installed?

    2. How can I connect a device to I/O via USB?, - is this possible with VISA USB Control?

    3. If I have a USB converter to CAN, I will forward to the Governing Council target using the driver DLL file?

    I would be grateful if someone comments on it as soon as possible.

    Kind regards

    Muhammed Favas P.

    (1) you can run the VI in the development system or create an executable using the application Builder (addon separate basic and full development system, included in the professional development system).

    (2) what USB device is it? If it is a device of class TMC, VISA takes care of it automatically, if it's a virtual device COM it appears simply as a serial port to VISA. Otherwise, you can use VISA USB Raw if and only if you have full documentation on USB data protocol that uses the device.

    (3) If you got this converter some manufacturer, you should always use the supplied (DLL) drivers. The changes are also the manufacturer already has the LabVIEW library to use its DLL. Any respectable measurement equipment manufacturer should do that today (preference for a pro to LabVIEW to do instead of one trainee, because in the latter case, the VI libraries are generally too bad that have nothing at all) or he loses out on a limited number of potential cases.

Maybe you are looking for