Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Viewing Serial Port Status Whilst LabView Is Running

Hi all New to the site so please forgive me if the question I am asking is child’s play but I have had little experience with LabView Basically what I have is LabView 5.1 talking to a FieldPoint Explorer via Serial comms to obtain friction and temperature measurements. Now when you first switch the PC on and get the server/client running, all is well and it communicates fine with FieldPoint, but then after a un-determined amount of time the measurements all drop to zero like the data from the serial port is no longer being read (or displayed possibly) by LabView. The Network and Access light on the FieldPoint are still flashing and there is no error code coming from the FieldPoint Status LED. The DAQ says it is still receiving messages as the counter continues to go up even though the values are all at zero  I have tried using 'Hyperterminal' as stated in the NI help section of the site and when I short Tx and Rx I get the double letters back so according to NI my comms port is ok. I have also checked all Baud rates and loose connections, joints, cards etc but to no avail What I really want to know is, is there a way to look at the serial port via LabView to see if it is still seeing data received into the port or a way to determine whether LabView is for some reason just not bothering to process that data anymore? I personally believe LabView is the problem as the port seems to test out OK and the hardware seems to be still communicating once the values all drop. I have only had it once where I have left the system in the error state and the values came back again briefly then went again Thanks for reading and thanks in advance for any help or tips, anything is welcome and appreciated Mitch

 

0 Kudos
Message 1 of 11
(4,260 Views)
HOw many bits have you allocated for read buffer? Can you post the code that you have tried?
0 Kudos
Message 2 of 11
(4,259 Views)

Ive not actually written the code. It came with the machine many many years ago and has been completely fine up till now

 

Sorry I cant be more useful

 

is there no simple graphical way to look at what signals are being sent and received when the error occurs?

 

regards

 

Mitch

0 Kudos
Message 3 of 11
(4,256 Views)
Is this an exe or are you running in the development mode? If i'ts not an exe, then you can set breakpoints, use a probe, etc. If it's an exe, you might want to try a serial port sniffer program such as portmon.
0 Kudos
Message 4 of 11
(4,246 Views)

How can i tell the difference between an exe and development?

 

What are breakpoints and how would they help the situation? are they used for identification of problem or resolving issues such as this?

 

How does Portmon work and can it be used if the serial port is allready in use by LabView?

 

Cheers

 

Mitch

 

 

0 Kudos
Message 5 of 11
(4,242 Views)

An exe means an executable and will have an exe as a file externsion. If you start your program by first starting LabVIEW and then loading a file with a .vi extension, you are possibly running in the development environment.

 

A breakpoint is a location in the program where you tell execution to pause. This allows you to check the status of variables and to single step through the rest of the code. If you have an executable, you cannot set breakpoints. Before you do any debug of this type, you'll have to learn how to program in LabVIEW.

 

Yes, portmon can be used while LabVIEW is running.

 

I doubt that you will find anything wrong with the LabVIEW program, though. If it's been working since version 5.1 was available, it's been working a very long time and code does not just change itself. If you have the development system, then I suppose it's possible someone did an edit of the program and changed something. That should be an easy fix since you would presumably have at least one backup in the many years you've had the program. What I think is more likely is that your pc has developed some kind of hardware fault or that an update has been made to the OS or one of the low level drivers.

 

0 Kudos
Message 6 of 11
(4,238 Views)

You are right, it does sound more like a hardware fault than software and I know for a fact the software has not been touched or updated

 

So what exactly will Portmon do and tell me and can it specify errors if that makes sense?

 

My thought is that the Field Point controller has gone down as ive had exactly the same problem in that it lost comms with the host PC and all the figures were zero but with that unit the error light was on and no network activity was shown. That said however, that unit was an Ethernet device, this is RS232 so I don’t know if the lights would work differently in a comms error situation.

 

If I could find out what the Field Point unit should do when in a comms error state, it would be a good starting point

 

Cheers

 

Mitch

0 Kudos
Message 7 of 11
(4,234 Views)
Portmon will tell you at a very low level, if a port is sending data. I'm not sure it will specify any errors. I'm not familiar with fieldpoint. There is a dedicated fieldpoint board that you might want to post to and see what diagnostics are available. Do you have MAX (Measurement & Automation Explorer) installed? That's where the test and diagnositic programs are for other NI hardware.
0 Kudos
Message 8 of 11
(4,232 Views)

I dont have MAX, just Field Point Explorer but I will do what you have suggested and put a post up in the FieldPoint Forum

 

Any ideas where to download Portmon from and is it free?

 

Cheers

 

Mitch

0 Kudos
Message 9 of 11
(4,218 Views)
Portmon is free. I don't have a current link. It's now owned by Microsoft. A search of www.microsoft.com should work.
0 Kudos
Message 10 of 11
(4,212 Views)