I want to drive a 450 gaussmeter from Lakeshore. The used language is Visual Basic by the way of excel.
A part of my program is:
Dev1=ibdev32(0,12,0,T10s,1,0) 'this line is OK'
call ibclr32(dev1) 'This line is OK'
call ibwrt32(dev1,"ZCAL",4) 'my problem is there'
"ZCAL" is a typical gaussmeter function which makes zero and coded on 4 bytes. If I write this line the zero is not made. However, if I used the NI program "Measurement and Automation" to communicate with my instrument, when I write ZCAL the command is executed and the buffer indicated in "NI Spy" software is 5A 43 41 4C corresponding to z c a and l hexadecimal codes.
Now if I return in my program and write the following command:
call ibwrt32(
dev1, &H4C41435A ,4) the ZCAL command is executed on the gaussmeter. The command is also executed if I write the decimal code of "ZCAL"
So, my first question is :
Why my program doesn't understand the command in the string form "ZCAL"
My second problem is to execute commands coded with more than 4 bytes. For example, I use a comand named "MAX 1" coded on 5 bytes. On Visual Basic, I don't have a data type coded on 8 bytes which could permit to resolve the problem. So, I can just execute command with less than 4 bytes.