12-27-2017 07:29 AM
Hello everybody my problem is as follows: I am using a pic18f4550 in HID communication with the labview interface. everything works very well at the beginning but after a while the PIC reboot and the interface detects it as a new device. when i use the pic with another software like HID Terminal mikrochip its work very well. so i think that the problem is with the interface. please find attached the labview program
best regard
thanks
12-27-2017 08:30 AM
12-28-2017 05:25 AM
Hi GerdW
thanks for your answer
I tried to close each iteration to see if it changes anything but nothing. I send you the new schema knowing that it always gives the same problem.
12-28-2017 08:29 AM
Closing the port on each iteration and opening only once will almost certainly give you trouble, try moving that outside the while loop and let us know what happens.
Are you getting any error codes when you run the program itself, or does the device just spontaneously reboot?
12-28-2017 09:10 AM
I have already done this and the problem that i had is that the event dont close so in the visa source name i had somethink like that :
USB0::0*1234::0*0001 :: NI-VISA-0:: RAW.
USB0::0*1234::0*0001 :: NI-VISA-0:: RAWEvent(9344).
USB0::0*1234::0*0001 :: NI-VISA-0:: RAWEvent(9345).
USB0::0*1234::0*0001 :: NI-VISA-0:: RAWEvent(9346).
USB0::0*1234::0*0001 :: NI-VISA-0:: RAWEvent(9347).
.
.
.
about the code error yes i had a code error but i dont remember it, i'll I send it to you as soon as I get it.
thank you very much for your help
12-29-2017 04:37 AM
after leaving the system running all night I had a crash again but no error message. But in the visa source name level I had the same usb device name with a subscript as a result :
USB0::0*1234::0*0001 :: NI-VISA-0:: RAW.
USB0::0*1234::0*0001 :: NI-VISA-1:: RAW.
USB0::0*1234::0*0001 :: NI-VISA-2:: RAW.
i didn't have any error message
please help i dont know where is the PROBLEMMMMMMMMMMM 😞
12-29-2017 08:50 AM
Hmm, okay. Let's take a step back to see if we can get a better picture of what's going on.
You mentioned that everything works well at the beginning of the code--what data are you expecting to see? Are you getting that data? Does it stop at any point?
Are you using USB Raw commands to communicate with your instrument? If so, can you use one of the USB Raw LabVIEW examples to see if communication still fails?
Last thing--can you describe the crash behavior a little more in depth? Does the device just disconnect, does LabVIEW itself go into a hang, what's happening there?
Lots of questions, I know, but hopefully it'll get us somewhere!
12-30-2017 08:20 AM
Hi Claire
01-02-2018 09:04 AM
Ilias,
Thanks for the info! I'm not sure why you'd be getting an index on the end of your VISA resource name if everything else is running fine--is there any sign of a disconnect of the device?
In the meantime, a workaround might be to retrieve the name of the resource programmatically, there's a good article on it located here. How did the USB Raw example go?