03-27-2011 08:52 AM - edited 03-27-2011 08:54 AM
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).
03-27-2011 08:58 AM
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
03-27-2011 09:15 AM
With the same configuration, sometime serial can be initialized, sometime cannot.
How to share the serial port?
03-27-2011 09:20 AM
And do you close you serial port everytime?
Can you post your VI so we can have a look at it?
03-27-2011 09:22 AM
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.
03-28-2011 12:07 AM
Yes I close it everytime, and I am using the samle code of 'Basic serial read and write'
03-28-2011 12:09 AM
Can I initial a serial handle and read and write in different thread loop individually.
03-28-2011 01:40 AM
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.
03-28-2011 08:35 AM
I'm still not seeing any code.
03-28-2011 11:23 AM
@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?