I have been writing this VI for a while now, and I cannot get my
instruments connected by Serial cables to comminicate. In the string
output, I get blank data. I managed to get data once, but even that was
nonsensical and I cannot replicate the results. I have performed
loopback tests and hyperterminal tests to test the card I am
communicating with and the serial cables. They are all fine. The only
other potential problem I can see is that I wrote something horribly
wrong. Aside from commands, which you would likely be unable to
confirm, let me know if I totally screwed this up.
Thanks,
Cole.
Monitor.vi:
http://forums.ni.com/attachments/ni/170/144306/1/Monitor.vi
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/26/2005 7:10:25 PM |
|
The first thing you should do is clean up the wiring and programming in the diagram. You've got a bunch of hidden wires and that just makes things more difficult to debug. The program in general is pretty confusing and is overly complex. Even if you had serial coms up and working, I don't think it would work correctly. Second thing is to try a single VI that will read/write to a single instrument. Third thing is to actually wire up the error in/error out clusters on the VISA functions to see what, if any errors might be happening. The fourth thing is to verify that the instrument actaully expects a carriage return and not a line feed as a terminator. The fifth thing is that you do not connect the return count output of VISA Write to the byte count input of VISA Read. The return count is the number of bytes that you've actually written and VISA Read wants to know the number of bytes that you expect to read. If you don't know the number of bytes to read, you can put in a small wait and then do a VISA Bytes at Serial Port to get exactly how many bytes are in the serial buffer.
Try one of the shipping examples like Basic Serial Write and Read and see if you can get that to work.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/26/2005 7:10:26 PM
|
|
I tested some of the theories posted earlier in this thread. The VISA
Closes didn't help, but I shall leave them there anyway because they
seem important. I cleaned up the wiring so I could write easier, so
that is good. When I tried putting a single instrument on one VI, I
still got nothing. Testing the error clusters, I got a timeout error,
which could mean any number of things. I would like to find out how to
test the required time for most of the intsruments so that I can try
them at that time. In MAX I still get timeout errors as well, which
isn't surprising. Changing the closing points from \r to \n also does
nothing. The VISA Bytes at Serial Port test will not give me a number
either.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/28/2005 7:10:52 PM
|
|
WOW, :smileysurprised:
As for the closes, you need one when your done with all the communications on that port. If you try to reestablish communication on that port later it very well may be locked up unitl you not only close the VI but close LabView all together.
One big suggestion is to make sure the end of line character is correct when you send something. Carriage return or line feed, however just typing this in with slash codes is not enough if your not in "\ Codes display" mode in your string control or constant. If you type them in normal mode and then switch it will cause a "\\" and if you leave it as a normal mode then it just doesnt work. Look into this and make sure your sending the data your instruments expect.
Also are the default settings (9600baud, 8, 0, 1, no flow control) correct for your instrument? Just curious since your sticking with the default settings.
Hope this provides some insight.
-Dave
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/28/2005 7:10:54 PM
|
|
So how do I figure out what settings I need to use to communicate with
an instrument? Is it in the manual? If it is, I can't find it. And
Dave, thanks for letting me know about the VISA Closes. I don't plan on
the program ending for a long time. It is reading data about a
sputtering system, so a few hours. I also need to figure out how to
confirm whether the commands I am using are a) get me correct data and
b) work with my device. I actually called Omega about the Temperature
Controller, so I assume the command they gave me is correct for that,
but I still can't get it to give me any data. Also, how do I figure out
the bytes I need to read from the instrument?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/29/2005 6:40:52 PM
|
|
Hi,
Just want to add one thing to what Dennis said, If the data your receiving is not plain ascii disable terminate char in the VISA open function. Otherwise, the read data function stops at the first 0x0A character.
Like Dennis said first see how many bytes there are available (with a timeout) before reading the COM port.
See my example. Forget all the blue VI?s and look into the red square. This while loop waits for 1 second or if there are 6 or more bytes available at the COM port. Also look at the VISA open at the beginning. If things are OK I expect 6 bytes if it?s not OK who knows. In this way I always get the data if there is any without a hang-up situation.
Needles to say that the 1 second is time-out is valid for my application.
KC
com.vi:
http://forums.ni.com/attachments/ni/170/145077/1/com.vi
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/30/2005 11:10:30 AM
|
|
Wow
Looking at your code you have not established communication with your instruments before you attempt to read a waveform :smileymad:
Sorry for saying it but you appear to be trying to run a marathon before crawling:smileysurprised:
A suggestion :::smileyhappy:
Start a fresh -- estabalish communications with your instruments first
HAve you found any drivers for them ?
( What are they actually)
Have you read the actually Labview manual with regard to wiring ? In a
nutshell you shouldn't cover more than one screen ( monitor ) with
wiring - sub vi's help.
If you post the instrument names or manuals , possible to go forward
lets go for it
xseadog
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/30/2005 1:10:35 PM
|
|
OK. I am going to reply person by person, so bear with me. Dennis, hot
do I tell if it is DTE or whatever the other is? I was given the cables
and the very beginnings of a VI and told to run with it, so I don't
know a lot about this. (BTW, the Tektronix part was not written by me,
but it is the only part that runs on my computer)
KC- I do not get any data. I don't think that has to do with whether
it's ascii or not. I will look into your VI, however, once i get it
transferred to a comuter that actaully has Labview so I can look at it.
Unclebump- I am actually tring to read from several devices they are as
follows. An Omega MDSi8 Temperature Controller, an MKS 600 Series
Pressure Controller, an MKS 247 Four Channel Readout, an MKS 937A Gauge
Controller, and a Dressler Cesar RF Power Generator. I know
that at least the Omega Command is correct. On that I have also
confirmed that the settings are correct (it has been my test device)
and it still doesn't work. I have called them three times and they told
me that is it. Some of the manuals actually do not have commands in
them, despite having RS-232 outlets on them. I have called the company,
butthey have been... less than cooperative. I shall look here for some
of them, but where on the forums would it be?
xseadog- Yeah, I agree with the Marathon comment. Teaching yourself
Labview and having your advisor expect you to write something like this
is a tad...... insane? I honestly do not know how to make or run a
SubVI and do not have the Labview manual. It is a departmental
liscense, and I only had access to it in the early stages of my
learning. I have tried communicating with the devices on smaller,
seperate VI's and it still doesn't work. I have drivers for the DAQ
card, and it seems to work fine, butfrom what I understand, the other
devices do not need drivers, they should just be able to be written to
and read. Is this reasonable? What do you mean about "not establishing
a connection between devices before trying to start the waveform? Where
is that? That could be the problem I am looking for.
Thanks to you all for your patience and aid.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/30/2005 6:10:10 PM
|
|
OK, I am at home now (it's 09:00pm) so I used the VI from my message and modified it. I tried to save it as 7.0 but not all VISA could be saved so i am not sure if it wil work for you. I included a screenshot.
Hope this will help you together with all the other good suggestions.
Set com port.zip:
http://forums.ni.com/attachments/ni/170/145175/1/Set com port.zip
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/30/2005 7:41:10 PM
|
|
Hi JohnGalt
noticed that your serial ports are designated as com 13 and com14 !!
Is this because you have so many ports? Or what ?
Has your PC machine any serial ports ? ( not added cards) If so I would suggest you utilise that first as
it would mean you are not using any 'extra'drivers to communicate with
instruments. Once proven then of course one could then estabish coms
via the extra ports.
I have downloaded the comms + mdsi8 manual from omega- just
quickly skimmed it , noticed that you can set up direct from front
panel of instrument.You can also adjust comms speed- default is 9600
baud.
For first assignment - connect Mdsi 8 to PC via serial
cable. Switch on adjust comm parameters manually so that speed is
not 9600 ie 19600 baud.
Enable your serial coms via labview - initialise to your set baud rate. Now send the following command
are you ready ?? ( no not this line :smileytongue:)
(this one -after brackets) Z02
which is actally a hard reset. So now if you check your baud speed
manually if it is 9600 then you have suceed in establishing coms
between PC and instrument.
go for it
xseadog
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
9/30/2005 7:41:11 PM
|
|
Hi again
With reference to your serial ports
JoeLabView posted a very good thread that is very enlighting
http://forums.ni.com/ni/board/message?board.id=170&message.id=111793&query.id=0#M111793
xseadog
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/2/2005 6:10:42 AM
|
|
So, I have tried testing the cables as Dennis suggested, and I don't
think they are straight through. To make sure, though, I will try
to diagram it. They are labeled Male and female.
Male
Female
*1*2*3*4*5
*5*4*3*2*1
*6*7*8*9
*9*8*7*6
Thus I shall try to find a straight through cable. I tried the hard
reset, but it was through the old cable, so that same thing might be
the problem. I will be SO annoyed if the cable is the issue, working
this hard because someone bought the wrong cord.....:smileymad:. I will look at the KC's Vi and the other posts when I have time later in the day, or week, orwhatever.
Thank you all, you may have saved me.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/3/2005 7:40:44 PM
|
|
To determine if your cable is a straight or null modem cable, use an ohmeter. A straight cable has pin 1 on one end connected to pin 1 on the other end. Both pin 1s are on opposite sides as you show in your diagram because of the gender change, but they are still pin 1. As the name implies, straight cables tie pin 1 to pin 1, pin 2 to pin 2, and so on. A null modem cable has a different configuration:
Side 1 Side 2
1 4 (or sometimes not connected)
2 3
3 2
4 1 or 6 or both
5 5
6 4
7 8
8 7
9 is not used.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/3/2005 8:40:48 PM
|
|
Okay, so my cables are straight through. I am sad, I thought maybe that
was the problem and that replacing that would fix this whole
ordeal..... meh. Oh well, I will try other ideas. Keep them coming if
you have any.
Thanks again
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/5/2005 5:40:45 PM
|
|
Hi J
please advise your current status with your problem ?
If you still have problem -have you attempted to just communicate with one RS232 device? Also is that via installed serial card or
serial port pre installed on PC?
Have faith
xseadog
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/6/2005 8:40:40 AM
|
|
Current status, still unfixed. But I am now going
to have to add A/D communication for other devices and the Tektronix
has changed so it is serial now as well, but that is beside the point.
I have tried doing one at a time, and through the serial port that came
with the computer even. Nothing. The pre-placed port doesn't appear to
work in Labview.
Thanks anyway.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/6/2005 7:10:46 PM
|
|
Hi John
seems like you inthe doledrums:smileysad:
Have you tried to use NI's MAX ?
At the same time NI spy?
MAX when initinalised will search for all connected insruments to serial ports and all other appropiate connections.
NI spy acts as a passive monitor but does reveal which commands have been sent and recieved plus the timing.
Don't hesitate to ask
Xseadog
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/7/2005 6:40:31 AM
|
|
Do your instruments send data unsolicited, or do you need to send a query first?
If they require a query, can you give us an example for one instrument
which isn't running at the moment? An example as to what kind of
answer should come back would be useful too.
I might whip up a program to test different serial port settings if I have time.
Shane
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/7/2005 8:40:40 AM
|
|
xseadog: I have tried MAX, nothing happened. Still get the timeout
error that always accompanies the Labview reading. No matter how high I
set the timeout, I still get it. I have not tried NI Spy yet, though.
It sounds useful. I shall look for it on my program list. I am sure I
have it. Doldrums? Yeah, maybe a bit. Just bored trying to get this
bloody program working. I actually get bored at work, something I have
never done before. Thanks for the concern though.
Shoneill: My instruments do not send data unsolicited. I have to send a
command. (There are instruments that do send data unsolicited?!?) I
know I have the right command, at least for the Omega MDSi8 Temperature
Controller. I have called Omega twice to confirm it. It is indeed X01.
I have tried adjusting port settings, but the program would be really
helpful. That way I can make sure I am doing it right. Thanks again.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/7/2005 6:10:46 PM
|
|
What is the exact part number of the MDSi8?? Some of them don't have communication builtin. The datasheet says it can do modbus protocol. Normally that uses 9600 baud, 8 databits, even parity, one stop bit. The communication manual states that the meter does not use the parity bit. There are several vi's that implement Modbus serial communication. I have some at work that I can send.
Here is a link to the MDSi8 manual. <a href="http://www.omega.com/manuals/manualpdf/M3944.pdf" target="_blank">http://www.omega.com/manuals/manualpdf/M3944.pdf</a> This shows you only need three wires in the serial cable. Wire pins 2-2, 3-3 and 5,5.
Here is a link to the I Series communication manual. <a href="http://www.omega.com/manuals/manualpdf/M3397.pdf" target="_blank">http://www.omega.com/manuals/manualpdf/M3397.pdf</a>
When talking modbus with the device you can use function codes 3(read holding register), 4(read input register), 6(write holding register), 8(diagnostic). The meter has up to 43 registers, but not all of them are used.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/7/2005 9:10:54 PM
|
|
Hi John
You said that now the scope is also serial comms well start there! Disconect all other serial connections. Connect Scope to PC serial port. Initialise MAX, also NI spy (set to capture), with MAX
do a instrument search on your serial ports. Remember that scope you should be switched on !! MAX should be able to see scope, as Dennis mentioned if necessary alter the port settings. Check with the scope manual to see what the default setting are. In MAX you can test basic functions ie send IDN command to check scope ID.
Hopefully this should set you on ya way- also verifies that you serial ports are functioning ( swop connections to test all ports)
xseadog
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/10/2005 6:40:40 AM
|
|
Hi John,
Is your problem solved ?
If not let me know, we can go through the whole process (begin to end) to get things working.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/12/2005 10:40:40 AM
|
|
My problem is not near solved, but I am going to try to do the whole
thing over to see what we can do. I will leave the old program intact,
but start doing the Oscilloscpe on another program and work from there.
Hopefully something will happen.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/19/2005 5:10:51 PM
|
|
Hi John,
There are a lot things said in this thread and I think your right. Better start again at the beginning
Suggestion to get things solved:
First you have to get a basic LV VI running on your COM port with a loopback connector. A loopback connector just connect pin 2 and 3. The only thing you need is a working COM port, loopback connector and VI
Next you have to make a cable with or without cross. You can measure this.
Last (but not least) setup the communication with your instrument.
Is this workable for you ? What can you do yourself and where do you need help?Message Edited by K C on 10-19-2005 08:59 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/19/2005 7:10:56 PM
|
|
OK. I think I can get a loopback connector worked out. I will
trysending and reciving data in Labview through this. I think I tried
it before, but I am not sure I understood it then. I will also try this
on the pre-installed COM port on my computer. I can't get that to
communicate either.What do you mean by make a cable with or without
cross? The cables I am using have been tested, so that is not the issue
I don't think. What did you want me to measure aboutthe cables, though?
Thanks for the advice,
Cole
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/20/2005 6:40:47 PM
|
|
Not everything at once. First get things working with a loopback connector and a basic VI for communication with LV on the COM ports. If you get this working and know what happens in the VI we will do the other things I mentioned.
Do you know how to make this VI ? What version LV are you using ?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/20/2005 7:40:49 PM
|
|
I am using Labview 7.0. I should know how to make it, but I have been
unsuccessful in it before, so I think with a bit of work I can do it.
Pins 2 & 3 are second and third from the top left, I assume? I will
look on the labels. I will let you know when I finish it.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/21/2005 5:40:41 PM
|
|
OK> I set up the loopback as you said. (I did find pins 2 and 3,
they were labeled). I Wrote a program to write an input string to the
port and read from the port in an out put string. No matter what I do,
I keep getting timeout errors. I even used the example VI's that come
with the program. So not even a loopback will get me what I need... :smileysad:
I begin to wonder if there is something wrong with the PCI slot that
the serial ports are connected to. But that shouldn't affect COM one,
since it's not in a PCI slot..... and it doesn't work either. Is my
computer just screwed up? It can't be the programming. I used the
official stuff even. What can I try to do to fix this?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/21/2005 6:10:48 PM
|
|
Hi Cole (is it Cole and not John?),
First you need to check in your windows control panel-system hardware-device manager (depends on windows version) what windows says about your com port(s)
I also made a small VI for a COM port. It is only for a test and not uaseable in a program. I hope you can read it.
Tell me what windows thinks of your COM ports. Are you using WXP?
com port.vi:
http://forums.ni.com/attachments/ni/170/148250/1/com port.vi
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/21/2005 8:40:54 PM
|
|
So the Device Manager sees all of the ports, but the first four
(ME-9100 1-4) give me an error code 10 cannot start. The rest seem fine
fro the manager. I tried your VI. For Com 1 it worked beautifully. For
the rest, nothing. I think that indicates I need to try something very
different with the ME ports. I should try using COM 1 to communicate
with the instruments. I will let you know how that goes.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/24/2005 5:40:43 PM
|
|
OK, now we're getting somewhere.:smileyvery-happy: If your instrument works it's OK. But if it not works you have to look if the cable is right.
If it is not working you must measure the voltage at pin 2 and 3 (pin 5 is ground) of the com port from the PC and of the cable from the instrument.
Your PC would normally show at pin2 + or - 8-12V and at pin3 about 0V. Most often the voltage at pin2 will be + if the PC is just switched on and be - if you use or configure the com port.
Do the same with the cable from your instrument. On this connector pin2 and 3 should be the other way (pin2 = 0V and pin3 = +/- 10V)
If this is OK you can plug it in and things could work if not we have to look at the others side.
Message Edited by K C on 10-24-2005 07:59 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/24/2005 6:10:44 PM
|
|
Sorry, double-posted and removed.
Message Edited by JohnGalt on 10-24-2005 01:31 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/24/2005 6:40:39 PM
|
|
Ok. Here's going to be interesting for you. I just tested the cords.
From COM1, I get somewhere around 10-11v. From the Omega Temperature
Controller I get about 7.18v. From the ME card, I get 0.0 v. Never
anything but 0.0. I think we may have found the problem, Watson. Thank
you. Now, what does this mean. Is it broken, or just different from the
normal COM port? Perhaps I should e-mail Meilhaus about this? Progress!
Yay! :smileyvery-happy: However, when I tried to communicate
through your VI with the Temperature Controller on COM 1, it didn't
work. Hmmmmm..... interesting.
Thanks very much,
Cole
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/24/2005 6:40:40 PM
|
|
You are correct, sir. Testing the cable connected to the computer, I
get voltages on pins 2 and 3. It is not a special instrument cable.
Just your basic serial cable. The manual can be hard to find, since the
instrument has a communications manualand a user's manual. You probably
wan tcommunications, the harder one to find. I think this is it at
http://www.newportus.com/Pdf/M3397CN.pdf check it out.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/26/2005 6:40:47 PM
|
|
Hi Cole,
I have the manual. On page 7 (11 in PDF) Figure 3.3 there is a drawing of the connection between more instruments. Is this your situation one or more instruments with RS485 interface on one bus connected to a converter RS485 <--> RS232 ??
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/26/2005 7:10:48 PM
|
|
No, it is the only device connected to this port. What I have is a PCI
card that puts out 8 different ports in a card. It is connected to one
of those ports, with several other devices connected to the rest of the
ports, some left empty, of course. So the problem may be the card,
although it's manufacturer guarantees me there is nothing wrong with
it. I have the drivers for it as well. I have no idea why it wouldn't
work.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/27/2005 6:10:51 PM
|
|
You said the COM port is working with a loopback connector. But the Newport Iserie controller is not working on your COM port.
The Meilhaus ports is another, second, problem.
I'm right so far ?
Do you also have a link for the manual of the Meilhaus ports ?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/27/2005 7:10:50 PM
|
|
I only have one COM port on my PC, the rest I suppose are also
technically on my PC, but they run through a DAQ card on a PCI board in
my computer. I am talking about the Meilhaus ports, which are the ones that are on the PCI card.
Message Edited by JohnGalt on 10-27-2005 01:57 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/27/2005 7:10:50 PM
|
|
Yes, correct, but it is an Omega controller, not Newport. That is why I
was confused. I can looki up the manual, I will link it below.
http://www.icsdatacom.com/pdfs/ME9100_ds.pdf
This should get you what you need. I will make sure to look it over too, make sure there is nothing I missed.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/28/2005 5:40:47 PM
|
|
Hi Cole,
Your PCI controller ( the first problem). To be sure:
It is a RS232 and not a RS485 controller ?
You also measured the voltage at pin 2 and 3. No voltage ?
Is this controller visible in your windows system hardware list ?
Is the flow control for these com ports set to 'none' ?
Your temperature controller (second problem):
The COM port on your PC works with the loopback connector. But you got no data from your temperature controller. Correct ? Do you have a manual for this controller?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/31/2005 8:40:35 AM
|
|
The PCI Controller
It is an RS232
Yes, pins 2 and 3 show no voltage.
I can see it on my hardware list.
The flow control is set to zero on all of the Meilhaus ports.
The Temperature Controller
You are correct. I have the manual.It is also available at http://www.omega.com/manuals/manualpdf/M3944.pdf
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
10/31/2005 6:40:44 PM
|
|
Hi Cole,
I hope you don?t mind that I check every word you write ?
You wrote ?Flow control set to zero? you mean ?none? I think
I am running out off ideas over here for your Meilhaus ports.
That you don?t measure any voltage is strange. The only thing that I can think off now is that the hardware drivers for the RS232 ports are enabled when you configure a port. But this is rarely used.
Can you tell me which IC?s on the board are connected to the RS232 port (pin 2 and 3)
OR
Can you make a VI (see attachment) with: an initialize COM port with VISA, While loop with stop button and a close VISA outside the loop.
Run this VI and while it?s running measure all voltage between pin 5 (Gnd) and the other pins of that port.
Meanwhile I will have a look at the temperature controller manual.
COM open.vi:
http://forums.ni.com/attachments/ni/170/149585/1/COM open.vi
COM open.jpg:
http://forums.ni.com/attachments/ni/170/149585/2/COM open.jpg
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/1/2005 8:40:38 AM
|
|
Yes, i did mean none, but thank you for confirming that anyway. What do
you mean by IC's? (sorry, kind of a noob) Idid run the program
you had me write and tested all the pins against pin 5, I still got no
voltage. That makes me wonder about the Meilhaus board even more. Is it
broken? I think I am going to test some of the other devices on the COM
1 port. I hope it's not broken as well.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/2/2005 6:41:14 PM
|
|
If you don't measure anything on the Meilhaus ports there must be something seriously wrong. Most pins should have 8-10V (+ or -)
Are you absolutely sure it's a RS232 board and not a RS485/422. This would explain the absence of voltage.
Forget the IC's part. It would go to far.
No time found yet to have a good look at the manual for the temperature device. What I saw after a quick scan was a communication menu setup. Nothing changed in this menu ? All parameters are Factory default ? If that is OK I will read the manual and make a VI to communicate with this device.
We have to get some results after all this work. Get back to you
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/2/2005 8:11:07 PM
|
|
It can be used for both RS232 and RS485/422. What effect would that
have on it? I don't know about RS485/422. Do they have 9 pins as well?
I assume they do, since this is supposed to work wth both. If so,
should I try using them instead? The temperature controller
should still be set to factory default. If it isn't, I will run a hard
reset.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/3/2005 7:43:31 PM
|
|
RS232 and RS485/422 are different they use different voltages. You temperature controller is RS232 (as far i can see)
What type is your Meilhaus board exactly ? What kind of connectivity box or cable are you using ?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/3/2005 8:13:06 PM
|
|
The board is ME-9100. I am using the breakout box that is listed on the
website somewhere. The cable connecting this ti the computer is some
big thick thing It says something about style 2990 or something like
that. It came with the card and box.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/4/2005 7:12:37 PM
|
|
There must be more then just the 9100. Please look in the manual at table-1 there all different boards are listed.
The style 2990 means data cable> It's written on all cables. Can you point out what box your are using in the manual.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/4/2005 7:42:48 PM
|
|
It's on the table as ME-9100i/ 8 RS232 PCi/cPCi. It has opto isolation,
and eight ports up to 921.6 kBd (although the manual has it typed in
European style with a "," instead of a ".")
That seems to be the one I have, although I can't tell you much about what those things mean.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/7/2005 6:42:42 PM
|
|
Your answer is clear to me. I am stuck, so back to the beginning........:smileysad:...but i won't give up (yet) :smileytongue:
In reply 46 you say there is an error in your device manager when you look at the Meilhaus ports. Can you tell me if this is still the case.?
At a point you told that the board or PC was returned for test. Was this the PC where you are working on now ?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/7/2005 7:11:20 PM
|
|
Yeah, the error is still there. It seems to appear when loading a
certain Labview function. It might have been the VISA name constant or
some other thing, but It seems to not appear any more, or at least far
less often. The PC was used in Kansas for doing some data capture, so
it wasn't anything that happened then. I willdo a lillte more research
on the errors and get back to you.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/10/2005 8:12:53 PM
|
|
Yes, the error appears when I load a VI containing a VISA name
function. I don't know why this is, but it seems worrisome. I tried
writing your test Open Coms vi thing, and I get an error saying the the
number of bytes at the port is equal to the desired amount and there
may be more data, I have tried going up to 800 on the expected, and
nothing happens. But if I try to modify the actual number of bytes
going into the VISA read it gives me a timeout error. I knew how
to use MAX to look at my ports, but thanks anyway. Did you want me to
do something with MAX specifically?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/14/2005 7:13:18 PM
|
|
The only problem with that is that when it says that, I don't get a
reading. So I need to be able to make it continue running despite that
error. If that would work, maybe we can actually get this program to
work! :smileyvery-happy:
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/16/2005 8:14:12 PM
|
|
Ok, I just realized that only half of the Meilhaus ports show up in
MAX. The ones that do work the same as described in the previous
message, but the others give me an error that says, "This port cannot
be accessed or does not exist on the system." Why does it do this? I
don't think I disabled anything, I don't even know how to. And I never
did anything unusual to them. They just suddenly began not showing up.
Odd.....
Message Edited by JohnGalt on 11-16-2005 02:32 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/16/2005 8:44:20 PM
|
|
It's is indeed strange that you only see half the Meilhaus ports.
I made a little program for you to communicate with your temperature controller. It send a reset, reads a setpoint, change that setpoint and read the setpoint again.
First try it with a loopback connector. Just run the VI, select the right com port and press OK. In the right hand array are the command and in the other two the received data is written (if any) One in HEX and the other in ASCII.
With a loopback connector the 'data rec in hex' must be the same as the 'data send' array.
Then try it on your instrument and post a screenshot if anything happens.
Good luck
comm tryout.vi:
http://forums.ni.com/attachments/ni/170/152156/1/comm tryout.vi
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/16/2005 9:14:32 PM
|
|
Thanks, I hope I can run it on my version though. I have Labview 7.0. i
think you have 7.1. I shall try it though. By the way, how do I get a
screenshot?
As I expected, it didn't work. Can I get you to put it in a picture
file? I can try to do most of it based on your description, but not all
of it, I think.
Message Edited by JohnGalt on 11-18-2005 12:20 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/18/2005 6:40:09 PM
|
|
Sorry, saved it as 7.0 VI now. I think you have to replace the serial VISA function. In the zip I also placed the screenshots.
Making a screenshot: Select the window (click on it) and press Alt-PrintScrn. The window picture is now on your clipboard. If you open a picture editor ( or word ) you can paste the picture there :smileyvery-happy:Message Edited by K C on 11-18-2005 07:57 PM
comm tryout.zip:
http://forums.ni.com/attachments/ni/170/152580/1/comm tryout.zip
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/18/2005 7:10:46 PM
|
|
Yeah, for some reason half of the Meilhaus ports no longer
show up in
MAX, as mentioned before, but they still show up in Labview. Do you
have any idea why this could be? It doesn't seem to affect anything,
yet, but I want to make sure nothig may come of it later. I
have tested your program with a loopback test, and it works beautifully:smileyhappy:,
but I cannot test it with the instrument as it is being used for a
sputter at the moment. I will test it when they are finished with it.
Should be later today.
Thanks.
Message Edited by JohnGalt on 11-21-2005 12:24 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
11/21/2005 6:40:34 PM
|
|
Ok, so I still have not been able to play with the Omega, but I ran
your program, and instead used it for the Dressler RF Power Supply
(with the appropriate commands, of course) and nothing happened. I seem
to get a VISA read error. I will try it with the Omega as soon as
possible to see if there s a difference.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/1/2005 7:40:50 PM
|
|
Ok. I just realized something that may be useful. The error seems to be
from the read, rather than the write. This is odd because even the
basic write commands don't perform as intended because, on the Dressler
at least, I cannot even turn it off remotely. I think perhaps the error
does not come on the write because it just needs to send the data and
not recieve. I don't know where this is going, but I'm just specuating
as I have no idea of what to do. I am also getting the aforementioned
error again. I begin to wonder if it has anything to do with the
problems. It does appear when the VISA names are loading. Perhaps the
computer is not being told where to send the data due to this? If this
is helpful, use it. If not, ignore it.
Thanks again,
JohnGalt
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/1/2005 7:40:55 PM
|
|
Hi,
The Dressler 'thing' is new for me :smileysurprised: so I leave that to you.
The VISA read error you get; can you tell me the number of it.
When you say: ' It does appear when the VISA names are loading' what do you mean ?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/1/2005 8:10:53 PM
|
|
Ok. The VISA read error is: 1073676294 in decimal and 3FFF0006 in Hex.
About the other error message. It's the one from earlier in the forum.
When I load a VI with any VISA name functions it it, this error window
pops up that says [ The instruction at "0x1ca12b95" referenced memory
at "0x00000000". The memory could not be "read". Click on OK to
terminate the program.] I have no idea what it means, but it is
definitely related to the VISA name functions, whether constant or
control.It is odd, however, that it continues to let me run the program
and even loads the Visa functions properly. Perhaps this is behind the
issues with communication? I have posted this in this forum before, but
people seem to ignore that part. It might be unimportant becaus of
that, but asking you about it can't hurt.
Thanks,
JohnGalt
OK. New question. I was talking to someone about this the other day,
and they recomended trying A/D communication with the devices that are
having issues. I have some things on this program running through
A/D and it works well. But none of these others have analog outputs.
Can you perform A/D communication without analog outputs, like through
the serial port pins or something? If so, that would be amazingly
useful, then I could make the whole thing really simply.
Thanks again,
JohnGalt
Message Edited by JohnGalt on 12-02-2005 12:38 PMMessage Edited by JohnGalt on 12-02-2005 12:38 PM
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/2/2005 6:40:49 PM
|
|
Hi,
The error you get is not an error but a warning. It is telling you that it is possible that there are more bytes available than you red. See attachment.
I really don't know what you mean with A/D communication. Can you explain this further?
error 1073676294.jpg:
http://forums.ni.com/attachments/ni/170/155001/1/error 1073676294.jpg
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/5/2005 9:10:56 AM
|
|
How do I get it to stop showing the warnign and actually read the data?
I was just wondering if there was a way to do A/D communication without an Analog output. I can get the A/D working.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/5/2005 8:10:59 PM
|
|
To get rid of the warning just delete it from the error cluster or ignore it. LV will not come up with a error popup because it's just a warning.
When you say A/D comm. I read Analog / Digital comm. Still don't know what you mean.
We are talking different languages and I am not talking about English and Dutch.
Give it another try to explain the A/D comm. thing.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/5/2005 8:11:00 PM
|
|
The problem with the warning is that Labview does make an error pop up
for it and ceases execution once this happens, so I don't get any data
out of it. I don't think that is normal.
By A/D I mean to say that I am trying to do analog communication with
some instruments. It has the little analog out port on the back which I
conncet to a digital port card with a simple piece of wire. The wire
doesn't have any ends on it. It's just a piece of wire. What it does is
that the temperature controllers put out a certain voltage per degree
celsius, and the computer reads that voltage and tells me what the
temperature is from that. This works quite well within a tolerance and
therefore would be quite excellent for this program, but most of the
instruments do not have analog ports, so I wondered if it was possible
to communicate with them like this, but without the analog port.
Might there be something wrong with the way Labview is communicating
this data to the devices which makes them unable to read it? Because
the loopback tests work, but the communication with the instruments
does not. I wonder if maybe it is trying it in some sort of code or
language the devices don't recognize? Just thinking, if it has any
possible validity, let me know.
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/7/2005 6:40:45 PM
|
|
First the error/warning. If i run my try out VI i get a results as shown in the picture. In the error cluster there is a error number and a message but the Boolean indicator is green. This means No Error.
Do you have the same result ?
I get back to you on the other thing when I understand it. :smileysurprised:
warning.jpg:
http://forums.ni.com/attachments/ni/170/155580/1/warning.jpg
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/7/2005 8:41:04 PM
|
|
It took me a while but I understand what you are saying 'The wire doesn't have any ends on it. It's just a piece of wire.' I think you mean the temperature sensor (thermocouple wire) indeed this wire produce a voltage depending on the temperature. Your controller transforms this voltage change into a communication with rs232 port.
So to answer your question: No you cannot connect this wire to your computer port.
Do you have your equipment back ? Does the VI with commands I send you gives any results ?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
12/12/2005 8:41:00 PM
|
|
Hi,
It's a while ago we had contact. How are things?
|
|
0
|
|
|
|
Reply
|
x9561 (148650)
|
1/17/2006 3:10:57 PM
|
|
|
68 Replies
110 Views
(page loaded in 0.649 seconds)
Similiar Articles: serial port communication problem with null modem - comp.sys.hp ...Accessing the UART for serial communication in linux - comp.unix ... serial port communication problem with null modem - comp.sys.hp ... Accessing the UART for serial ... Accessing the UART for serial communication in linux - comp.unix ...hi all, I have to write a UART driver for serial communication in linux for my acadamic project, can anybody tell me how can i access the uart re... serial communication problem with fread function - comp.soft-sys ...simulink and arduino - comp.soft-sys.matlab I'm having problems with serial communication between ... one byte over your serial connection fread ... Real-Time Windows Target and RS232 communication? - comp.soft-sys ...Reading Serial data through Simulink Input Packet - comp.soft-sys ... Real-Time Windows Target and RS232 communication? - comp.soft-sys ... Reading Serial data through ... simulink and arduino - comp.soft-sys.matlabI'm having problems with serial communication between simulink and arduino. I am trying to read joystick input and send it to arduino. I chose simulin... How to communicate with COM/serial port in DOS? - comp.lang.asm ...Accessing the UART for serial communication in linux - comp.unix ... How to communicate with COM/serial port in DOS? - comp.lang.asm ... Accessing the UART for serial ... Help with Java serial comms - comp.lang.java.helpYou can help Wikibooks by expanding it. ... Sun Java Communications API; Java Comm Serial API How-To for Linux; jSSC - java serial port library. using rs232 - comp.soft-sys.matlabSerial communication problem on Target PC - comp.soft-sys.matlab ... I'm using RS232 Mainbord, RS-232 mainboard send, and RS-232 Mainboard receive. VISA Write Timeout - comp.lang.labviewMy problem is when this timeout occurs, in order to restart serial communication I have to completely close LabVIEW. If I do not close labview and just restart my ... clock microseconds with resolution in milliseconds - comp.lang.tcl ...On May 7, 8:39=A0am, Jens Haines <bubblegumtr...@arcor.de> wrote: > > I need some small delay, because I have some > problems with serial communication. DS25 and the serial consol. COM1 or COM2 ? - comp.os.vms ...How do I configure another serial port, /dev/ttyb-ttyd (COM2-4)? How do I disable Solaris/x86 ... Serial Communication to On with Console Redirection via COM2 Set Serial ... communication between 2 computers using a socket - comp.lang.idl ...serial port communication problem with null modem - comp.sys.hp ... Communication between two computers using Null Modem Serial Port ..... two computers using a serial ... anyone using multiport USB -> serial devices - comp.os.linux ...CAN-USB Communication - comp.soft-sys.matlab anyone using multiport USB -> serial devices - comp.os.linux ... Accessing the UART for serial communication in linux - comp ... I need some help with matlab serial send - comp.soft-sys.matlab ...Serial Port Communication in Matlab... gauge which I need to operate from Matlab. Both devices are connected to the computer via a serial port. ... Serial Ports - comp.protocols.time.ntpSerial port - Wikipedia, the free encyclopedia In computing, a serial port is a serial communication physical interface through which information transfers in or out one ... 4. SERIAL COMMUNICATION483 4. SERIAL COMMUNICATION 4.1 INTRODUCTION Multiple control systems will be used for complex processes. These control systems may be PLCs, but other controllers ... Arduino Tutorial #4 (Serial Communication) - YouTubeIn today's Arduino tutorial, we go over the Uno's built in serial communication. We look at talking to the Arduino from the computer and vice versa, the ... 7/20/2012 3:46:14 PM
|