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

Tags: NI Hardware

Similar Questions

  • 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.

  • 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.

  • Comm port not detected by VISA / MAX after the device power cycle connected

    I have a device communicating via USB virtual comm port. The device and labview program both work very well, most of the time. The program is designed for the automatic connection for the connected equipment. It works perfectly when I unplug and reconnect the USB cable.

    However, if the unit power cycled as the USB cable is connected and the program/vi is running of things go wrong. The device enters a phase of boot loader for a few seconds to the power upward, if labview tries to query the port comm during this phase the comm port is corrupted in some way and is no longer recognized by VISA / NI MAX. However, other programs, hyperterminal, etc device manager can see and communicate with the port when the boot loader is complete. For Labview / NI MAX to see the port I have to physically disconnect the USB cable. The program does not need to be restarted in order to detect the port comm again and, infact, labview is restarted or my compiled program does not solve the problem. Physically disconnect the USB port allows visa / MAX OR see the port is connected.

    It seems to me that there is a problem with VISA where somehow if a device is not correctly identified by VISA during the first attempt it just does not take into account the port until a physical intervention. Is there a way to force VISA to reassess completely all connected comm ports?

    Hello MJanus,

    As far as I know, most of the virtual com ports are not fully supported by VISA so some quirks in its operation are to be expected: http://digital.ni.com/public.nsf/allkb/6E1922B526572CB8862571AA00544057?OpenDocument

    Officially, we do not support the use of com virtual ports, if unfortunately, the feature you have now is probably as good you'll be able to get with this configuration. I know it's not the answer you were hoping to hear and I apologize for the inconvenience, but it is not really possible visa work well with all software virtual com port due to the wide variety of products available.

    Kind regards

  • 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

  • USB missing in MAX voice

    Hello world

    I am trying to interface a M833 Monochromator with my pc using labview. My system is actually running

    LabView 2010 sp1

    MAX 5.0

    3.8.1 OR serial

    NI-VISA 5.1

    on Windows XP.

    Open my present instrument Device Manager (this is a plug-and-play device and works well with the softaware factory, so I think the drivers are ok).

    Max in devices and Interfaces are listed only:

    -Network devices

    PXI-

    -Series and parallel

    What can I do to grab votes usb peripherals and interfaces in Max?

    Thank you, uge

    Hi uge026,

    Since your M833 monochromator is not a material OR and DAQ compatible, it can be registered OR max.

    Kind regards

    uge026

  • USB-6501 on MAX

    Hello

    I have USB-6501. I would like to have simulated the device on MAX. However, MAX does not seem to offer a device that simulated for USB-6501. I guess that a device simulated for another device would be sufficient to simulate USB-6501. If this is the case, that would do the job?

    Thank you

    Daisuke Takeshita

    The PCI-6503 map will work for your needs as a simulated device? See:

    http://forums.NI.com/T5/LabVIEW/NI-DAQmx-simulated-devices-exception-USB-6501/m-p/554855#M260787

    -AK2DM

  • 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

  • USB (series VISA) during reset problem

    Hello

    Immediately to the problem that I'm using communications series in labview with microcntroller. Anyway, whenever I connect the USB cable then Labview detects the port and make the communication. But in the average process if I press delivery to ZERO (lost USB) button on the microcontroller then block visa series get the error and program continues to generate the final error with the code. By the way, this happens when ever I want to confirm the user that USB is disconnected or RESET is pressed. Also if you reconnect the USB at the back, then the program should work as usual. Even I tried with error display VI in the programming menu, but I hope it's wrong way. Finally, I would like to correct two things 1) if RESET is pressed to halfway, then it must show a perceptible message from the user. (2) the USb disconnected by person unknown so what can I do in this situation.

    I'm using LABVIEW 2009. Please help me.

    You can try something similar to the following. However, I would recommend against it because I found that LabVIEW generated errors are very useful for troubleshooting. Message/code often your own mistakes to mask the problems that will be easy to understand if you have the LabVIEW error.

  • 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.

  • Sensor reading USB in the RT PC target.

    Hello

    I have a sensor of incilinometer with USB port. After I installed the driver in windows, LabVIEW, he acknowledges with COM port and I can communicate with him through LaVIEW VISA.

    Now, I want to use this sensor on a target RT PC, but I encountered a problem. After connecting the sensor into the USB port of the RT PC, the software MAX target in home shows the sensor as a USB RAW device. How to read the sensor data? Is it possible to change the RAW USB on the COM port in windows?

    The inclinometer sensor model is RION DMI420.

    Thank you very much

    When you say that the PC desktop as target RT I assume you mean the Pharlap ETS software? In this case, there is practically no chance of getting any USB device operates independently from the operation to the USB Raw level.

  • Need help to test the VISA interactive Control: Sorensen XBT32 - 3FTP USB connection problem

    Hello

    I use Windows 7. I installed the USB driver provided in this link:http://www.sorensen.com/products/XBT/XBT_Downloads.htm.

    Max is on the ASRL5: COM5 series & parallel in the Device Manager it is listed in the port: COM5

    I don't know how to test using VISA interactive control to ensure that the connection is established.

    Here are the parameters:

    Serial settings:

    Baud rate: 38400,

    Data bits: 8

    Stop bits: 1

    Parity: None

    I use the default settings for the other options such as flow control: none, Timeout = 2000ms etc.

    In the attributes view tab:

    Attribute: is the connected port

    Current value: error VISA: (Hex 0xBFFF001D) the specified attribute is not defined or supported by the referenced resource.

    I don't know if it's important.

    When I write * IDN? \n (bytes to read: 6), I return the Count: 6 bytes

    When I click on "Read Status Byte":, I get the following error:

    Error reading STB operation VISA: (Hex 0xBFFF003A) cannot start the operation because the installer is not valid (because of attributes defined in an inconsistent state).

    If I click on "Query", I get the following error: reading operation error VISA: (Hex 0xBFFF0015) timeout expired before the operation is complete.

    I also tried to create USB raw driver help driver of VISA Assistant. In this case I kept getting timeout errors: read operation error VISA: (Hex 0xBFFF0015) timeout expired before the operation is complete.

    Can you please tell me what I'm doing wrong?

    Thank you.

    Who cares about the number of bytes written? And configure the windows com port is not relevant. What is important is how you set the com port in the VI or max.

  • With NI-VISA to detect USB insertion/withdrawal

    Is it possible to use NI-VISA to detect when a USB device is inserted or removed?

    I am currently using Windows API in my application of LabWindows to capture the WM_DEVICECHANGE event.  When this event is called, I check to see if USB devices are always connected to my PC using the viFindRsrc function.  On Windows XP 32-bit, this approach has worked successfully.  This no longer works on my Windows 7 64-bit system.  After I remove the USB, the viFindRsrc function device is still indicating that the device is connected, even if it is not.

    In addition, when a USB device is controlled by a driver of NI-VISA, I can't capture Windows DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE event.  I am able to see these events for other USB devices which are not controlled by a driver NI-VISA.

    I solved the problem.

    The behavior of the NI-VISA driver requires that you register to receive notifications from Windows. Other USB devices that are not controlled by a NI-VISA driver didn't need to register to receive DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE event.  I got the default...

    Here is the code to save USB events

    Here is the code where to record the events of USB:

    .
    .
    .
    DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;

    intptr_t postHandle = 0;

    / * Windows HWND * /.
    HWND hWnd = 0;
    long long unsigned int hWndVal = 0;

    / * Get HWND of LabWindows\CVI Panel * /.
    GetPanelAttribute (panelHandle, ATTR_SYSTEM_WINDOW_HANDLE, & hWndVal);

    hWnd = hWndVal (HWND);

    /*
    * Gross peripheral USB
    *
    * Device Interface Class GUID = {a5dcbf10-6530-11d2-901f-00c04fb951ed}
    *
    */
    GUID_CLASS_USB_DEVICE. Data1 = 0xA5DCBF10L;
    GUID_CLASS_USB_DEVICE. Data2 = 0 x 6530;
    GUID_CLASS_USB_DEVICE. Donnees3 = 0x11D2;
    GUID_CLASS_USB_DEVICE. Data4 [0] = 0 x 90;
    GUID_CLASS_USB_DEVICE. Data4 [1] = 0x1F;
    GUID_CLASS_USB_DEVICE. Data4 [2] = 0x00;
    GUID_CLASS_USB_DEVICE. Data4 [3] = 0xC0;
    GUID_CLASS_USB_DEVICE. Data4 [4] = 0x4F;
    GUID_CLASS_USB_DEVICE. Data4 [5] = 0xB9;
    GUID_CLASS_USB_DEVICE. Data4 [6] = 0 x 51;
    GUID_CLASS_USB_DEVICE. Data4 [7] = 0xED;

    NotificationFilter.dbcc_size = sizeof (DEV_BROADCAST_DEVICEINTERFACE);
    NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
    NotificationFilter.dbcc_classguid = GUID_CLASS_USB_DEVICE;

    /*
    * Set up a callback function to WM_DEVICECHANGE Windows post
    * or sent to a panel of LabWindows/CVI.
    */
    InstallWinMsgCallback (panelHandle, WM_DEVICECHANGE,
    WindowsDeviceDetection, VAL_MODE_INTERCEPT, NULL, & postHandle);

    /*
    * Register the notification of device for the USB Raw Device GUID interface class
    */
    RegisterDeviceNotification (hWnd, & NotificationFilter,
    DEVICE_NOTIFY_WINDOW_HANDLE);

    Here's the code that responds:

    public static int CVICALLBACK (int panelHandle, int message WindowsDeviceDetection,
    unsigned int * wParam, lParam unsigned int *, void * callbackData)
    {

    PDEV_BROADCAST_HDR PTDB = (PDEV_BROADCAST_HDR) lParam;

    switch (message)
    {
    / * Windows WM_DEVICECHANGE message * /.
    case WM_DEVICECHANGE:
    {
    switch (* wParam)
    {
    /*
    * Windows device change event received 'DBT_DEVNODES_CHANGED '.
    *
    * Device has been added or removed from the system.
    */
    case DBT_DEVNODES_CHANGED:

    printf ("[%s] DBT_DEVNODES_CHANGED\n", TimeStr ());

    break;

    /*
    * Windows device change event received "DBT_DEVICEARRIVAL.
    *
    *
    */
    DBT_DEVICEARRIVAL case:

    printf ("[%s] DBT_DEVICEARRIVAL\n", TimeStr ());

    break;

    /*
    * Windows device change event received "DBT_DEVICEREMOVECOMPLETE.
    *
    *
    */
    DBT_DEVICEREMOVECOMPLETE case:

    printf ("[%s] DBT_DEVICEREMOVECOMPLETE\n", TimeStr ());

    break;

    by default:
    break;
    }

    }
    }

    return 0;
    }

  • driver usb visa problem

    I have a usb controller, I want to connect with labview... I did successfully usb raw driver using driver development Assistant... and it works well in my pc in which NEITHER labview is installed... now I want to run a labview application in a pc in which no labview (nothing not related to NOR) is installed... then I copied the visa to this pc... usb driver after plugging the device and install the driver it says unable to install driver completely... I tried with 2 PC... so I wondered outside the visa usb driver... y at - it something to install on a pc that does not have labview so it can communicate with the pc?

    I don't know the length of LabVIEW. I want to talk about the VISA duration.

  • 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.

Maybe you are looking for