11-22-2017 12:14 PM
Hi,
I am using FT2232HL to communicate with an I2C device.
I am using the MPSSE I2C API calls.
I am able to successfully Write to the device. Both my GPIO Read and Device Read does not work.
I am able to observe the scope timing, and the Read Data is correct. it is just that when I call the function in LabView, it always shows up as FF. Same for GPIO Read as well.
I am using LabView 2013.
Thanks for the helps.
Solved! Go to Solution.
11-27-2017 06:18 PM
Can you provide more information about the issue you are having, like the configurarion on VISA.
There ir a forum that explains a simular issue and it can be related with the VIS configuration:
11-28-2017 01:37 PM
Thank you for the response.
I was able to investigate a bit further.
Now, I do not see the "FF" read error. But something more strange.
I have a successful Write to slave and a Read from Slave if the register does not contain "0x00__".
Included the screenshots of 2 different scenarios:
1. Register read when the data is not 0x00_ _ .
2. Register read when the data is 0x00_ _.
The third screen shot is the Read_Device driver API VI. everything seems to be working except reading the default data of "0x000098"
Thanks for the help.
12-05-2017 12:29 PM
can someone please comment on the above issue reported?
Thanks
12-06-2017 06:06 AM
Your Call Library Node needs to pass the data as Pointer to an Array of U8. When you configure it as a C String Pointer, LabVIEW will on return terminate the string on the first 0 byte it encounters in the string. This is because C strings are by definition terminated by a 0 byte. If you want to pass a binary buffer to a DLL that can return NULL bytes in it, you need to pass that buffer as Byte Array!
12-07-2017 01:41 PM
Hi Rolf,
Thanks for the response.
Is this a change required in the DLL file itself.
Because I am not able to connect anything other than String to that node.
It shows a source and sink mismatch error. The input to the Buffer node is String.
Is there anything I can do to alleviate this problem?
Thanks
Ashwin
12-07-2017 06:24 PM
You need to change the data type inside the Call Library Node configuration for the uint8 *buffer parameter. It is now configured as C String Pointer but you need to configure it as Array of Unsigned 8 Bit Integer, passed as Array Data Pointer.
Then you can also throw away the Byte Array to String and String to Byte Array nodes.
12-08-2017 06:41 PM
Hi Rolf,
Thank you for your inputs. I was not aware that I could configure the datatype on the call library node.
I works great now. I appreciate your help on this.
Regards
Ashwin
05-03-2020 01:11 PM