07-13-2010 08:31 AM
Hi all -
I can communicate with my device through HyperTerminal just fine. I would like to do this through LabVIEW. I have looked at several examples around the forum. One said to wire "C:\Program Files\Windows NT\hypertrm.exe /t COM6" to System Exec.vi. This successfully opens HyperTerminal, but then I get an error in HyperTerminal "Unable to connect to COM6 port 23."
Any ideas what is going on here? I attached an image of what I described.
Thanks in advance!
Solved! Go to Solution.
07-13-2010 09:14 AM
Do you have a VISA session that is open to the com port?
p.s. Why don't you use LabVIEW to connect to the port? Even when you get rid of the error, you cannot pass data from LabVIEW to Hyperterminal or from Hyperterminal to LabVIEW.
07-13-2010 09:15 AM
I'm a little confused as to what you're trying to accomplish. Are you trying to communicate with your device using LabVIEW, or are you trying to launch HyperTerminal? If it's the former, you do not need to launch HyperTerminal to communicate to a device using LabVIEW. Please see the serial port examples that ship with LabVIEW as well as the Serial Instrument Control Tutorial. You should also check IDNET to see if a driver already exists for your device.
07-13-2010 09:18 AM
There was a similar discussion a while ago - http://forums.ni.com/t5/LabVIEW/Serial-Terminal-Emulation-in-LabVIEW/m-p/1009963#M450777
07-13-2010 10:15 AM
Dennis - Good questions... no, I confirmed that the session wasn't open by toggling the power, removing USB, closing VISA in LabVIEW, closing hyperterminal, and closing LabVIEW examples. I don't know if that actually closed it but I don't know what else to do... and I am not using LabVIEW to connect to the port mostly because everything I tried in that department hasn't worked thus far. I have seen that HyperTerminal isn't really good with LabVIEW, but at least at this point I can communicate with the device using HyperTerminal.
smercurio - Ideally, I would like to only use LabVIEW, but right now only HyperTerminal is working. The device came with a driver which I installed. I'm pretty sure I couldn't even talk thru HyperTerminal if I didn't install that, right? Hyper2.jpg shows what happens when I try to talk through MAX. Hyper1.jpg shows that I can communicate with the device through HyperTerminal. (Note - I disconnected before I took the picture)
Ian - Yes, I checked out that page, and played around with LVTerm.vi. A lot of what is in LVTerm.vi I have tried. I think you should look at Hyper2.jpg also.
All -
The device is here: http://www.thorlabs.com/thorProduct.cfm?partNumber=MCLS1
The manual is here: http://www.thorlabs.com/Thorcat/18600/18659-D02.pdf (see page 14 for the commands)
I have a decent amount of LabVIEW experience, so I was surprised that most of the VISA things I tried haven't worked so far. There is very little software support from ThorLabs (or at least for this product). I was able to set up a different device (rotating stage made by Zaber) without any difficulty just last week.
Does anyone think it is possible that I can only communicate with the device through HyperTerminal?
Thanks guys, I really do appreciate the help!
07-13-2010 10:25 AM
First, the /t parameter tells Hyperterminal to try to establish a telnet session. That is obviously incorrect so remove it.
The error message in MAX indicates something else is using the com port. On your task bar, it shows that you have Hyperterminal open. Close that and try MAX again. Windows does not allow more than one process at a time to connect to a port.
07-13-2010 10:54 AM
Hi Dennis -
Yes, I removed that parameter, and tried it without any options, and also with a "/r", a "/n", and with both. No luck there.
The HyperTerminal session was "hung up", but I left the window open. That was my fault, I didn't know that would still leave the session open. My apologies. Howver, I did as you suggested, and now it does say that it is working properly but it still doesn't communicate. I tried changing the channel (which is a different laser) from 3 to 2 using the command channel=2 as it says in the manual (this works fine in HyperTerminal) to no avail.
See hyper3.jpg (hyper4.jpg and hyper5.jpg are other versions of hyper3.jpg without the "/n" and with "Async" turned on and off.)
(The right baud rate etc were validated through MAX, I made sure of this first.)
Thanks again.
07-13-2010 11:00 AM
Try sending the correct termination character. The manual says to use a CR (\r). You are using a LF (\n).
07-13-2010 11:14 AM
If you use the "VISA Configure Serial Port" and use the same settings as you do in your HyperTerminal setup, can you create a connection in LV? If the resource isn't busy you should at least be able to make the connection. If it doesn't then you have an error with which to start troubleshooting.
07-13-2010 11:20 AM
I have an application wich sometime needs to communicate through hyperterminal. I have configure the comm link in hyperterminal and i'm calling the .ht file to open the communication with the equipment in hyperterminal. See the attached vi. You will need to modify the path to your .ht file to have it work.
Ben