burak Posted July 7, 2004 Report Share Posted July 7, 2004 I have to write some program in Labview i know code how i should activate it, but i didnt use 488.2 earlier. Piece of that program is: // Setup Scanner SCAN = ibdev (0, 24, NO_SAD, T100ms, 1, 0); // T100mS works for my machine, errors when less than 100 uS. ibconfig (SCAN, IbcEOT, 0); // Sets EOS bit to 0 // Set Line A open ibstop(0); // Stops the GPIB0 board ibwrt (SCAN, "A00\n", 4); but i cant find any example where i should write this commands, i looked for examples on www.ni.com pages but i dont found. Does anybody knows how do that??? Quote Link to comment
Michael Aivaliotis Posted July 10, 2004 Report Share Posted July 10, 2004 i know code how i should activate it,You do? Where did you get this code? Is it an example for another language? If so, what language? Do you have a programming manual for this instrument? This would list all the commands required to perform interaction with the instrument. Once you know this then it is a breeze to do the rest. GPIB is easier to use than say Serial.First of all, if you want to execute the commands as they are listed in your example you can launch a command prompt interactive terminal and just type in the statements as you list them in your post: SCAN = ibdev (0, 24, NO_SAD, T100ms, 1, 0) This just sets up the GPIB device. T100mS works for my machine, errors when less than 100 uS Yes, this is the timeout value. ibconfig (SCAN, IbcEOT, 0); // Sets EOS bit to 0 Yes the EOS... ibwrt (SCAN, "A00\n", 4); Well the last line is really the command. This tell the scanner to do something "A00\n". Without the manual I don't know really what this does. The 4 means write 4 bytes. but i cant find any example where i should write this commands, Well, you can use the interactive control I mentioned above to test the commands and see if you have device communication. Of course this is not LabVIEW programming but it can give you a comfort feeling to know that your computer can communicate with your device\scanner. What you really want is to get into some LabVIEW code right? Here is all you need to get started. You'll say: "really"? Yes... really. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.