Hello,
I'm writing an IVI driver in order to communicate with my device. I communicate with my device with TCP/IP protocole. Because I'm writing an IVI driver, I want to use VISA functions and not TCP functions. My device starts only if it can connect to a server TCP/IP but if I just make a viopen of a port on my computer, my device doesn't start. It starts only if I create a server TCP with RegisterTCPServer function. But then when my device replies I don't read anything with VISA function although I read something with the ServerTCPRead function. I can summarize all of this with this little script :
ServerTCPRead (Port, serverFunc, 0) -> my device starts
viopen (rmSession, "TCPIP0::127.0.0.1::Port::SOCKET", 0, 0, &io);
Ivi_SetAttributeViSession (IviSession, VI_NULL, IVI_ATTR_IO_SESSION, 0, io);
// My device reply after about 15 seconds so I'm sure my visa session is open
in serverFunc, on DATAREADY event
Ivi_ReadInstrData(IviSession, 255, receiveBuf, &NbReadCharUL); -> doesn't work
ServerTCPRead (g_hconversation, receiveBuf, 255, 1000); -> work
At this time, I use only the TCP functions and it works. But I want to know how to do the same with VISA functions which are theorically associated with IVI driver.
If someone is able to understand what I'm trying to do, thanks to helping me.