11-22-2013 03:43 AM
Hello,
I am currently writing a controlling and data aquisition software for an Instron testing machine with a GPIB Bus with Labview. The machine isn't the youngest, so I can only use the 488 commands, not the VISA commands. My controlling software works this far, but with the data aquisition I encountered some problems for which I couldn't find a solution this far. I just taught Labview to myself two months ago, so sorry if my questions seem silly to you. I searched the forum and the internet and couldn't find an answer to them.
So here's my problem:
I am Reading out data from my Machine with the command "GPIB-Read", it gives out a string, so I gues it automatically assumes that the data is encoded in ASCII. The machine though uses its own coding, described in its manual! I can read the header of the measurement (it is "#I" in ASCII), after that there is a 32-Bit signed Integer representing the length of my data block. Then there is a 16-Bit Byte and after that many 32-bit signed Bytes that represent my measuring data. There are no seperation marks.
When I read it out, I just get a string of crazy ASCII code (besides the "#I" at the beginning)
My approach to decoding the message this far is this:
I convert the ASCII code to binary code (not with Labview yet, I couldn't find out how it works either. is there an easy way to do this?) , then I ignore the first 64 Bits (2x8Bits of the header+ 32 Bit Integer+16 Bit Integer) and then I try to split up the string in an array of 32 Byte long strings and see if the data is right. In my measurement, i had three values which where constant, so it should just be three alternating values. I always get wrong data and I am mostly not working with Labview, but I have to later on, because I want to display the data in real time.
It's a lot of work and I just wanted to know, if I'm on the right track or if there is an easier solution. Later on, it shouldn't be a problem to display an integer array as a wave, right? Are there any hints or advice you can give to me?
Sincerely,
Simon
Solved! Go to Solution.
11-22-2013 06:30 AM - edited 11-22-2013 06:30 AM
11-22-2013 11:45 AM
Thanks a lot for your quick answer! I'll try it out as soon as I get back to the university. Your right, I accidently wrote 32-bit Byte instead of 32-bit Integer on accident a couple of times.
11-25-2013 04:24 AM
I just tried it out and everything worked out perfect 🙂 I've been sitting on this for a while now, but with your help I could programm the whole data aquisition in a couple hours this morning. Thanks again!!
Simon