11-30-2009 05:37 PM
Hi all,
I am trying to write an application in Visual Basic 6 to get data from my external GPIB device. I happen to have a copy of Component Works that has an ActiveX which can make my coding work much easier. My data has a 20 bytes header and at most 40K actual data following that. The exact number of data is specified in the 20 bytes header.
I tried to follow the tutorials/examples, but still had one question to solve:
Q: How to load binary data into a double array
The GPIB1.Read functions only returns a String variable. How can I convert this string into numbers? I need to read the first 20 bytes and then read the number of bytes from specified. There seems to be a data parsing method within the GPIB ActiveX, but I do not know how to use. I can not find same example from website either.
Please educate me how to achieve so.
Thanks!
12-01-2009 10:59 AM
Hey, You can use atoi() function or type cast it.
-lab