取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 9 条)
3,384 次查看

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 项奖励
2 条消息(共 9 条)
3,322 次查看

I've attached the version 16 vi.

Thanks

0 项奖励
3 条消息(共 9 条)
3,320 次查看

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 项奖励
4 条消息(共 9 条)
3,317 次查看

Bytes written should be a pointer to the value.

 

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

0 项奖励
5 条消息(共 9 条)
3,315 次查看

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 项奖励
6 条消息(共 9 条)
3,313 次查看

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

0 项奖励
7 条消息(共 9 条)
3,308 次查看

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

0 项奖励
8 条消息(共 9 条)
3,306 次查看

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 项奖励
9 条消息(共 9 条)
3,303 次查看