07-13-2010 11:20 AM
Hi Dennis -
Good catch.... but unfortunately that did not work either. If you think of anything else, please let me know.
Again, I appreciate your help (and patience!).
07-13-2010 11:37 AM
Dennis - Good catch... unfortunately when I tried that it didn't work either. Thanks for the suggestion (and your patience!).
Jshu - I have tried this but unfortunately other than the error out I have no way to confirm that it worked (unless you can think of something). See hyper6.jpg. I tried it with and without the open visa, and with the open visa on the left and the right of the ConfigureSerialPort.vi, all did not work. The command I am putting in is "CHANNEL=2\R" (I also tried just "CHANNEL=2"). It shows no errors.
Ben - I haven't tried that yet, but I will shortly. I wanted to update the others first. Thanks, I'll let you know what happens.
Thanks again everyone.
07-13-2010 11:50 AM
A few things:
In your write command string, append a CR constant rather than adding a slash code into the command on the front panel.
After a write, wait a little (maybe 500 mS just to be sure) and do a read of all bytes at that port to see if anything comes back.
Try other commands such as the ? or "*idn?" which should actually have some sort of response. The one you are trying may not actually send anything back.
07-13-2010 12:54 PM
Ben - Your OpenCloseHyperterm.vi - Does this simply open or close HyperTerminal, or do you run a list of commands in there also? (I don't know what is included in a .ht file, I haven't really ever used them before.) If it just opens and closes it, I can do that already. Either way, thanks for the tip.
Jshu - Putting in waits, and using CR didn't do anything either... I still get no errors either... and the reason I am changing channels is because that is something that I will see on the Laser Source. There is a digital screen that tells me what channel it is on. If I request information from the machine I will need to do a write and then a read. I'm just trying to keep it as basic as possible at this point.
Thanks again everyone.
07-13-2010 01:08 PM
Dan, ht files do not only open the hyperterminal but also establish the communication with the equipment (it is a connection file). It contains the informations for the port used and the port settings. When you call this file it configure and opens the port. You can then send any command you want. In my application it communicate with an Actel development board and when a communication is established the demo board fpga send a menu to the hyperterminal interface.
Ben
07-13-2010 02:16 PM - edited 07-13-2010 02:18 PM
My suggestion was more to find out if you were just failing to communicate or failing to send the correct command.
Does the front display of the device show when it is being controlled? Some of the equipment I have used shows a little "RMT" or some sort of indicator saying it was in a device controlled mode.
Did it work in HT alone before trying in LV? If so, then either LV failed to make a good conection for some reason, or the command being written isn't in the right format.
07-13-2010 02:25 PM
At this point, you might want to try portmon from Microsoft. Capture sending a command with Hyperterminal and capture sending the exact same command in MAX/LabVIEW.
07-13-2010 03:07 PM
All -
My supervisor told me that "\r" won't do anything if it's written as a string. Thus, you must use a carraige return constant concatenated at the end of your string. Making this change gets this simple VI to work. See "hyper7.jpg".
Thanks again for all of your help.
Dan
07-13-2010 03:09 PM
Dennis - If I run into any more problems I will check that out.
Jshu - You were right, we weren't coding it right.
07-13-2010 03:11 PM
Glad you figured it out. I was trying to explain to concatenate a CR constant rather than a / code but I didn't spell it out well enough. Nice work.