LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial port issue

I need to re-program a serial data receive software by LV, but met the following issues.

 

1. The original software can initial the serial port successfully, but the LV program some time work, sometime not work. Please see the error message below

 

2. When using the serial port reading loop, if put no time interval, it seems cannnot receive data.

 

3. The original program can receive the whole package each time, but the LV program can only receive part of the package each time.

 

Any suggestion, thanks. 

 

Error -1073807360 occurred at Property Node (arg 😎 in VISA Configure Serial Port (Instr).vi->Untitled 1.vi

VISA:  (Hex 0xBFFF0000) Unknown system error (miscellaneous error).

 

 

0 Kudos
Message 1 of 13
(3,898 Views)

Alex, can you post your code in here?

 

It seems like you have an issue with configuring your serial port.  Are you sure the COM port is correct?  The rest of the parameters should be correct as well.

You can't use your port in LabVIEW when you're using HyperTerminal as well.  It doesn't allow sharing of resources

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 2 of 13
(3,895 Views)

With the same configuration, sometime serial  can be initialized, sometime cannot.

 

How to share the serial port?

0 Kudos
Message 3 of 13
(3,892 Views)

And do you close you serial port everytime?

Can you post your VI so we can have a look at it?

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 4 of 13
(3,888 Views)

You will need to provide more information. What is the instrument you are communicating with? Are you using a driver that you downloaded from NI? Did you download it from somewhere else?

 

That error code is sometimes returned by the Init functions that exists in instrument drivers that you get from NI. It basically indicates that it could not see the device or could not verify the instrument model. This may be due to lost bytes.

 

As noted, it would help to see your code.

 

 


@alex. wrote:
How to share the serial port?

You can't. The operating system only allows one application access to the serial port at any one time.

 

Message 5 of 13
(3,886 Views)

Yes I close it everytime, and I am using the samle code of 'Basic serial read and write'

0 Kudos
Message 6 of 13
(3,863 Views)

Can I initial a serial handle and read and write in different thread loop individually.

0 Kudos
Message 7 of 13
(3,862 Views)

Alex,

 

That should not be a problem at all.  As long as you know for sure that the port is initialised before you start reading/writing to it.

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 8 of 13
(3,857 Views)

I'm still not seeing any code.

Message 9 of 13
(3,833 Views)

 



@alex. wrote:
How to share the serial port?

You can't. The operating system only allows one application access to the serial port at any one time.

 


 

As smercurio mentionned, you can't.  However, a nice little trick when dealing with the serial port is to query the OS to find out if any other application is using the serial port and if so, to close those applications.

 

As for your error message, as everyone else has mentionned, we'd need to see your code.

 

Curiosity question:  What type of serial interface do you have setup on your PC? 

Message 10 of 13
(3,818 Views)