From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone have experience with XTC/C OR XTC/2 controller?

I am trying to use a serial connection to program an XTC/C controller.. if anyone can give me some help that would be great. I am running off of labview v6 and the examples given for serial I/O aren't responding to the machine.
0 Kudos
Message 1 of 15
(3,458 Views)
Hi,

I haven't worked with this particular device, but using the serial port is a matter of getting some configuration parameters corect.

First of all you should have the documentation for the device. This documentation should include the interface configuration parameters and the command set for the instrument.

First thing is the cabling. The documentation should specified the type of connector used. If the serial connector is just like the PC's, you'll probably need a null modem. If not you'll need a straight-thru cable.

To use the serial port you'll need to configure the PC serial port settings to the same values as the device. These parameters are: baud rate, data bits, parity, stop bits and handshaking (flow control).

Check out these tuto
rials for more info:

Serial Communication General Concepts

Serial Communication Starting Point

Let me know if you have any questions.

DiegoF
National Instruments.
0 Kudos
Message 2 of 15
(3,458 Views)
Hi,
I have used the Loopback.vi to test the device but unfortunately I get no response. There is also no error code that appears so I do not know what the problem is. The device is set to 9600 baud but there is not response. Any suggestions?
0 Kudos
Message 3 of 15
(3,458 Views)
Are you sending the correct ermination character? Can you get communication to work in Hyperterminal?
0 Kudos
Message 4 of 15
(3,458 Views)
I am not sure what Hyperterminal is? Can you elaborate?
0 Kudos
Message 5 of 15
(3,458 Views)
Hyperterminal is a terminal emulation program that has shipped with every version of windows since at least win95. Go to Start>Programs>Accessories>Communications. You should see the Hyperterminal app. Start it and configure it for the correct comm port and settings. If you can't communicate in hyperterminal, then you've got a problem with the cable or settings. When doing serial communication for the first time or with a new instrument, it's always a good idea to check things out first with a working communications program. Once that's done, then you can try writing your own program in LabVIEW. Any problems you have then, are with your software and not any of the numerous other things that can be wrong.
0 Kudos
Message 6 of 15
(3,458 Views)
I wrote a simple visa read and visa write program to the device. However I have been recieving an error message that says: -1073807339 VISA Read in xtc.vi Which I am unable to figure out. Any suggestions?
0 Kudos
Message 7 of 15
(3,458 Views)
You don't mention whether you were able to communicate with the instrument in Hyperterminal. I really wouldn't start writing any code until you've done that basic step. The only thing you mention that you've done is the loopback test and that does nothing to communicate with the device. At the most, it verifies your cable and comm ports on the computer. If you have used Hyperterminal to talk, then go ahead and attach the VI that you've written and someone can take a look at it.
0 Kudos
Message 8 of 15
(3,458 Views)
Hi. I was able to communicate with my device through Hyperterminal. So now the program I wrote which is just a simple testing write then read is not working. Through Hyperterminal, the settings I have are: Baud 9600, Data Bits 8, Parity None, Stop Bits 1, and Flow Control None. I am wondering if it is necessary to initialize my serial port but as of now, I am recieving a -1073807246 error code when writing to the device. Any advice??
0 Kudos
Message 9 of 15
(3,458 Views)
It is always best to include serial port initialization in your VI. The error code means " The resource is valid, but VISA cannot currently access it." This can happen when you have Hyperterminal open and try to use VISA to communicate with the same port. The other thing that I suspect you'll need to do is add termination character to each string that you send. It might be a Carriage Return or a Line Feed. The user manual should say what is required. These constants can be found on the String pallette. Use Concatenate To String to append the constant to the string you want to write.
0 Kudos
Message 10 of 15
(3,458 Views)