LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FTDI write function caused 1097 error

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

0 Kudos
Message 1 of 9
(2,368 Views)

Probably your function call is wrong.

 

Perhaps you need stdcall in stead of c calling convention?

 

Can't open your VI, still at LV18...

0 Kudos
Message 2 of 9
(2,306 Views)

I've attached the version 16 vi.

Thanks

0 Kudos
Message 3 of 9
(2,304 Views)

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.

0 Kudos
Message 4 of 9
(2,301 Views)

Bytes written should be a pointer to the value.

 

An input can never return a value unless it's a pointer!

0 Kudos
Message 5 of 9
(2,299 Views)

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.

0 Kudos
Message 6 of 9
(2,297 Views)

they are all on stdcall so that didn't make any difference.

0 Kudos
Message 7 of 9
(2,292 Views)

Within the call library function the buffer is defined as an array pointer, so I'm not sure what you mean.

0 Kudos
Message 8 of 9
(2,290 Views)

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.

0 Kudos
Message 9 of 9
(2,287 Views)