03-03-2006 10:22 AM
03-03-2006 10:42 AM
Easiest way is to buy a GPIB-USB converter $500.00 from NI.
Unless you don't have a GPIB control card.
03-03-2006 10:50 AM
03-04-2006 09:25 AM
03-04-2006 10:21 AM
03-04-2006 04:42 PM
03-05-2006 03:48 AM
Not sure about Hyperterminal but in most other environments I know character escaping is done with \ and not /. And LabVIEW has a special display style for this " '\' Codes Display ". Basically it shows all normal ASCI characters as is but displays non printable characters with their ASCI code or an abbreviation of it and a preceding \ character. Also it allows to enter a two digit hex code after the \ code for the ASCI code. Normal code only shows the printable characters and empty space for anything else. Hex Display converts every character into a two digit hex code.
@GeeWhiz wrote:
So far, writting \r\n at the end of the string hasn't worked for me. However, I am learning some things. I copied the Serial Write.vi from the NI website and opened it. Using this vi, If I type the commands in Hex and run the vi, the stepper motor responds properly. However, before I did this, I had changed the "display style" to "Hexadecimal". Is it the "Normal Style" that allows one to type the commands in with characters like /1A1000R? I have tried running the Basic Write and Read VI by typing in Hex characters and it didn't work for me.
03-05-2006 02:59 PM - edited 03-05-2006 02:59 PM
Message Edited by Warren Massey on 03-05-2006 01:01 PM
03-05-2006 03:48 PM
03-05-2006 06:01 PM
@GeeWhiz wrote:
One more question that i wish you will answer for me is; Does LabView have to send out all the lines of open, set and get stuff before it sends the commands the device needs? The stepper controller apparently ignores all of tis until it gets to the commands it wants.
I don't follow what you mean by "open, set and get stuff". Might you be talking about VISA Open, VISA Write & VISA Read?
If so, then the VISA Open does come first to configure the serial communications parameters like baud rate and so forth.
After the serial channel is properly configured, you should be able to make a call to the VISA Write function and have a command sent to the device immediately. If the command was properly formatted for the device, then the device should act on it immediately.
In situations like this it's not unusual to follow a VISA Write of a command with a VISA Read of a response to see what the motion controller thought of the command. The format of the response depends on whose controller you are using but typically you get one message if it liked the command and another if it didn't.
Assuming the motion controller liked the command, there's no reason you couldn't immediately loop back to the VISA Write function and send out another command. Usually the controller recognizes some commands as ones it should act on immediately (like STOP!!!) and others it may just buffer until it finishes whatever it is currently doing.
Tell us the make and model number of the controller you are using and we may be able to provide more specific help. A pointer to a PDF manual would be nice.
If you mean something else by the "open, set and get stuff" reference, try again with the explanation. It would also be useful if you could post a VI (or a picture of your block diagram) along with a description of what you intended it to be doing.