Jump to content

488.2 Problem with sending commands


Recommended Posts

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???

Link to comment
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? :book: 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:

post-2-1089441388.png?width=400

post-2-1089441803.png?width=400

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. :blink:

post-2-1089442716.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.