LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't access my Omega Temp controller via the serial port in the LabView VI.

I can access the Controller via a terminal Program so I know it's not my COM port. I set all the varialbles such as baud rate and parity and bits and such and they are all the same as the ones that I have programed into the controller. But still no luck. I am fairly new to the LabView scene so I'm sure it's just something small that I am missing so any help would be appreciated very much.
0 Kudos
Message 1 of 10
(3,849 Views)
TAAS,

You give very little detail, so there's not much to work from. What
version of LV are you using? Are you establishing a VISA session to the
device? Are you getting anything from the port through labview at all?
The more detail you can give, the easier it will be to find a solution.
Best of luck!

~Petr~


"TAAS" wrote in message
news:506500000008000000123B0000-1012609683000@exchange.ni.com...
> I can access the Controller via a terminal Program so I know it's not
> my COM port. I set all the varialbles such as baud rate and parity and
> bits and such and they are all the same as the ones that I have
> programed into the controller. But still no luck. I am fairly new to
> the LabView scene so I'm sure it's just something small that
I am
> missing so any help would be appreciated very much.
0 Kudos
Message 2 of 10
(3,849 Views)
I am using LabView 5.1 a little old but it's what I got. Second I am using the default VI for communicating with a serial devise. Just basic input and basic output with an error message box. If there is another way I would love to know. I just want to initially know how to write to my devise that's all after that I think I can figure out the rest. Thank you very much for your help.
0 Kudos
Message 3 of 10
(3,849 Views)
It's been about a year since I've touched 5.1, but I still have the CD at
work. I'll look at it for you tomorrow. If memory serves, 5.1 doesn't by
default use VISA to talk to serial ports. I remember having a problem with
serial coms when I was first starting with LV over 2 years ago, and I
believe it was because the serial VI is 0 indexed. I can look at it
tomorrow, but am I correct in remembering that the vi uses the port number
as an input? Try using 0 for com1 and 1 for com2. Just a stab in the dark at
this point...

"TAAS" wrote in message
news:506500000005000000A25D0000-1012609683000@exchange.ni.com...
> I am using LabView 5.1 a little old but it's what I got. Second I am
> using the default VI for communicating with a serial
devise. Just
> basic input and basic output with an error message box. If there is
> another way I would love to know. I just want to initially know how to
> write to my devise that's all after that I think I can figure out the
> rest. Thank you very much for your help.
0 Kudos
Message 4 of 10
(3,849 Views)
Have you tried the serial examples in the Help=>Examples section?
Search on "serial" and you'll find some VIs that show you how to do basic serial I/O.


"TAAS" wrote in message
news:506500000008000000123B0000-1012609683000@exchange.ni.com...
> I can access the Controller via a terminal Program so I know it's not
> my COM port. I set all the varialbles such as baud rate and parity and
> bits and such and they are all the same as the ones that I have
> programed into the controller. But still no luck. I am fairly new to
> the LabView scene so I'm sure it's just something small that I am
> missing so any help would be appreciated very much.
Message 5 of 10
(3,849 Views)
That's the VI that I'm having trouble with. I put in the String and the termination charater and nada. I thought that was sort of wierd but the deeper I dug into the sub VI's It still remained the same. If you can think of anything that I might be missing that would be great thanks.
0 Kudos
Message 8 of 10
(3,849 Views)
Your instrument is probably reading the termination character improperly as you are sending it as an
ASCII string. Create another string control, right click on it and change it from the default
"Normal" display to "HEX" display. Now enter the HEX value of your termination character in to the
box. (You'll need to find a ASCII to HEX conversion table somewhere) Concatenate (with
Functions=>String=>Concatenate String) this string to your message string and send it.
You can also use "\ Codes" (slash codes) to send termination characters like "\r\n" for a carriage
return or "\n" for enter. Again right clicking on a text box will let you choose this option.

I believe HyperTerminal and other applications automatically know how to convert your end-of-me
ssage
and send it properly. LabVIEW doesn't.





> That's the VI that I'm having trouble with. I put in the String and
> the termination charater and nada. I thought that was sort of wierd
> but the deeper I dug into the sub VI's It still remained the same. If
> you can think of anything that I might be missing that would be great
> thanks.
0 Kudos
Message 9 of 10
(3,849 Views)
Hi TAAS,

Are you inserting the correct terminator at the end of your string (i.e. CR)?

If this does not fix the problem try posting the string taht works from the terminal emulator and the code that does not work. We may be able to spot something for you.

Will to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 10
(3,849 Views)
To ensure that the signal your are sending with LabVIEW reaches the instrument, first perform a loop-back test. The attached file has a simple example on how to perform the loop-back test. You will need to connect pins 2 and 3 on you serial cable.
Once you make sure you are able to send a string through the serial cable and receive it back, then try the serial communication with your instrument by using one of the serial examples.
If your instrument is less than 10 years old, it will probably recognize the query command *IDN?. Try inputting this into the write string in the Serial Communication Example. You should get the name and some info about the instrument back in the read string. You may need to add a termination character \n or \t at the end of the
string to write, depending on what your instrument expects.
This example will return an error that will tell you where the communication stopped and what caused it.

Zvezdana S,
National Instruments
0 Kudos
Message 7 of 10
(3,849 Views)
If you're still having problems, just ask - I had similar problems myself and have sorted them.
0 Kudos
Message 10 of 10
(3,849 Views)