Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI VISA USB RAW Communication in C#

Highlighted

Hello

        I am Nectar,

        I am using NI Visa to communicate with my Evaluation Board.

        The sequence that I follow to communicate is given below:

        1. Create a Usb raw session

            mySession = (UsbRaw)ResourceManager.GetLocalManager().Open(resources[1]);

        2. I set the ControlOut method with the below parameters:

            mySession.ControlOut(
                    Convert.ToInt16(0x80),
                    Convert.ToInt16(0x00),
                    Convert.ToInt16(0x00),
                    Convert.ToInt16(0x00),
                    buffer);

            When I use this I get the exception with the message below:

            "The value of some parameter (which parameter is not known) is invalid. VISA error  code -1073807240 (0xBFFF0078), ErrorInvalidParameter"

Is there any other settings or attributes has to be done?

Is there any documentation for the C# UsbRaw class?

I searched many NI forums but not able to sort out the issue.

 

Please help me in this issue.

 

Regards

Nectar Jinil

 

 

0 Kudos
Message 1 of 2
(2,854 Views)

Hi Nectar

 

Yes, there is some available documentation on C# USB RAW. I am sharing the same.

USB Instrument Control Tutorial

USB RAW Control Communication in Visual C#.NET

 

Feel free to revert if you have any further queries.

 

Regards

Krishna Prasad

0 Kudos
Message 2 of 2
(2,844 Views)