11-07-2019 10:50 AM
I have managed to communicate with the FTDI RS232 to USB adapter successfully for connecting, reading, closing but when I try to write I get the error 1097.
I have seen lots of posts on this forum but have had no luck so far. I am using the code supplied by FTDI which is at LabVIEW version 7.0.
Could anybody suggest where I am going wrong?
Thanks
11-08-2019 03:22 AM
Probably your function call is wrong.
Perhaps you need stdcall in stead of c calling convention?
Can't open your VI, still at LV18...
11-08-2019 03:25 AM
I've attached the version 16 vi.
Thanks
11-08-2019 03:31 AM
All other functions are on stdcall, the write is on c..
Or did you just change that on my advice? If all other functions work, the write should be stdcall too.
11-08-2019 03:32 AM
Bytes written should be a pointer to the value.
An input can never return a value unless it's a pointer!
11-08-2019 03:35 AM
You're passing an array of I32s to the dll, which accepts an array of I16s.
I don't know what it should be, but it's suspicious.
11-08-2019 04:18 AM
they are all on stdcall so that didn't make any difference.
11-08-2019 04:25 AM
Within the call library function the buffer is defined as an array pointer, so I'm not sure what you mean.
11-08-2019 04:42 AM
wiebe@CARYA wrote:
Bytes written should be a pointer to the value.
An input can never return a value unless it's a pointer!
The last parameter is called "Bytes written". You should pass a pointer to the value, not the value.