Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I am using a instrument that has 9600 8 1 nop


it also has no flow control. I have tried all of the V.I. s in LABVIEW 6 and cannot get a response back . Instrument reads back correctly
using windows hyper terminal configured as typical entry in hyperterminal
CH0,8 carrige return
instrument should respond with
!CH0,8
0 Kudos
Message 1 of 9
(4,456 Views)
Joe,

you dont give us much information. Like what instrument, maybe someone has had experience with it. Anyway, here is a real simple serial port control vi. Error code reporting too so you know where it errors. Set all the controls before running the vi. Give us some feedback and let us know what happens.

Jared
Message 2 of 9
(4,456 Views)
Thank you for your response. I am Using a IBR
particle counter model C10 .I can get all functions to perform using hyperterminal set as 9600 8 1 nop no flow control FIFO buffers
disabled,TTY selected with terminal keys,ASCII setup echo typed charaters,append all line feeds all else disabled . WHEN using labview I write to device but cannot see any response back. Can VISA be used fo basic serial comm's.Devive has no IDN .
0 Kudos
Message 4 of 9
(4,456 Views)
Yes, visa can be used for basic serial comm. Visa is another layer on top of the serial drivers (and GPIB, etc) that all ready exist. The biggest benifits I see in Visa are :

1) you create a reference to a device and use that same reference all through out your program to talk to the device. Even if you use multiple protocols (like some commands over serial then some over GPIB) on the same piece of equipment.

2) The methods used are a lot like opening a file, reading / writing and then closing the reference to the file so it becomes a very familiar method of input / output no matter what the device. This method is also being used in GOOP (labview's method of object oriented programming) again making things similar.

On the first point, i rar
ely use two methods to talk to one piece of equipment. I will always prefer GPIB using serial if GPIB does not exist. I'm sure others can give more reasons to use VISA, this is probably the one area i have resisted change. I will use it if the drivers come that way, but so much of our years of development has already been done with either GPIB or serial vi's, i'm not going to change it all now.

Anyway, that's why i sent the straight serial. It's very familiar to me and it only took me a minute to create a vi to expose all the setup options available. If they dont work, you won't be wondering which Visa class is selected, or is visa doing something different than the old serial (see a differnt post this same week here) drivers.

Good luck and let us know what happens.
Jared
0 Kudos
Message 7 of 9
(4,456 Views)
Looks like something is missing in your VI. I note that in Hyperterminal you set up 'append all line feeds': check in your instrument's documentation if a termination character is needed, maybe a linefeed: serial VIs DON'T append any by themselves (while other languages such as Basic do), you have to explicitly add it to your string.
Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 8 of 9
(4,456 Views)
Joe,

One thing that I always find helpful in troubleshooting LabVIEW/serial problems is to connect a hyperterminal session to LabVIEW. That is, write from one port using hyperterminal and read it from a different com port (using a null modem cable) using LabVIEW. If you set the indicator in LabVIEW to display "/" strings, then you can get a more accurate picture of what the working procedure is sending from hyperterminal. You can then try to use the same strings to write. One thing to note when using hyperterminal, when you use the carriage return, hyperterminal sometimes outputs a "/r/n" string. If you hold shift when you hit enter, it will send only "/n". Sometimes this distinction will clarify some differences between the two environments.
Message 3 of 9
(4,456 Views)
This is a good Idea. Its been along time since ive done any serial work but this instrment is a key player.It is a IBR particle counter model C10. Using hypertermial set as 9600,8,1,nop TTY with terminal keys,FIFO disabled,ASCII ,echo typed characters,append line feeds .Instrument works correct.Null modem means pin 2,3 switched right?
0 Kudos
Message 5 of 9
(4,456 Views)
>>Null modem means pin 2,3 switched right?

Yes.
0 Kudos
Message 6 of 9
(4,456 Views)
Jared,

Your example works fine for my application but only in debug mode (lamp is on). When I run VI regularly, it writes to the port, I see its effect, but it doesn't read it back.
Any idea how to fix it?

ZR
0 Kudos
Message 9 of 9
(4,456 Views)