04-21-2008 08:22 AM
USB0::0x04B4::0x1002::NI-VISA-0::RAWVI_ATTR_TMO_VALUE = 2000
And these are the settings that i got from the attributes setting panel for my device:
VI_ATTR_MAX_QUEUE_LENGTH = 50
VI_ATTR_TERMCHAR = 0x0A
VI_ATTR_TERMCHAR_EN = VI_FALSE
VI_ATTR_IO_PROT = 1
VI_ATTR_SUPPRESS_END_EN = VI_FALSE
VI_ATTR_USB_MAX_INTR_SIZE = 1
VI_ATTR_USB_CTRL_PIPE = 0x0000
VI_ATTR_USB_BULK_OUT_PIPE = 0x0002
VI_ATTR_USB_BULK_IN_PIPE = 0x0086
VI_ATTR_USB_INTR_IN_PIPE = 0xFFFF
VI_ATTR_USB_ALT_SETTING = 0
VI_ATTR_USB_BULK_OUT_STATUS = 0
VI_ATTR_USB_BULK_IN_STATUS = 0
VI_ATTR_USB_INTR_IN_STATUS = -1
VI_ATTR_USB_END_IN = 5
I have tryed to send and read some data to my device but it does not work i don not why.I have read all the NI-VISA user manual to try to start to programming my device and also i did not find information related with how to program my device, there is only information available for Serial Interface but not for USB interface.
Could you help me to start with NI-VISA and continue with my project, I have lost so much time reading about NI-VISA and its manual and i have not had any results.
Thanks
Luis Alberto Navarrete
04-22-2008 11:37 AM
04-22-2008 02:13 PM
04-23-2008 08:31 AM
04-24-2008 04:48 PM
04-25-2008 10:26 AM
05-06-2008 09:52 AM
05-07-2008 10:31 AM
05-08-2008 07:24 AM
Hi Marshall i am here again :), I want to tank you for the programm that you sendt me, i think is the best way to help people, with an example. I tryed with your example on my program and it works nicely, but the problem persists when i use the command for reading from my device, i have checked carefully and i got the 512 values from FF6 and at the end is also included the '0' as you indicated in the example program. When i read from my device i can read only the first value of FF6, i mean only FF6[0], i don know why... i have the same code with the same type of data and i don not have the same results. Here is a part of my code:
int CVICALLBACK GetFF6 (int panel, int control, int event,void *callbackData, int eventData1, int eventData2)
{
ViUInt32 retcount;
int i = 0;
switch (event)
{
case EVENT_COMMIT:
ResetTextBox (panelHandle, PANEL_FF6, ""); //clear the text box before write on it
/*
//Set values
for (i=0;i<512;i++)
{
FF6[i] = 0xAA ;
}
//Ensure array is null terminated
FF6[512] = 0;
*/
viRead (instrument, FF6, 512, &retcount); //read the values of fifo6
InsertTextBoxLine (panelHandle, PANEL_FF6, -1, FF6);
//InsertTextBoxLine (panelHandle, PANEL_FF6, -1, FF6); //show the value of FF6
// SetCtrlVal (panelHandle, PANEL_FF6, FF6); //show the fifo6 values
SetCtrlAttribute (panelHandle, PANEL_SAVE, ATTR_DIMMED, 0); //enable the button SAVE
SetCtrlAttribute (panelHandle, PANEL_GETFF6, ATTR_DIMMED, 1); //disenable the button GETFF6 because it is empty,we tx always the entire FIFO6
break;
case EVENT_RIGHT_CLICK:
break;
}
return 0;
}
I hope you can find the solution, thanks for all your support.
05-08-2008 07:35 AM