From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Power sensor reading through RS-232/USB

Solved!
Go to solution

Hi all,

 

I am reading power values through a USB configured power sensor in Labview.

I tried the manufacture software (EXE stand alone), and it is working; which may indicate my connection is correct.

 

1) Please see my labview codes as attached file "codes.PNG".

2) However my labview codes has following error: error -1073807339 VISA Read.

3) The screen shot of device manual was also attached here "manual"

 

May I ask if someone can give me some tips to solve this issue?

 

Download All
0 Kudos
Message 1 of 12
(3,575 Views)

Any RS-232 configuration is not required?

For example baud rate, data bit, etc....

serial.PNG

 

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 2 of 12
(3,541 Views)

Hi Emboar,

 

Thanks for your reply. I added the port configuration, but it was still not working. Please see the codes as attached file.

 

Thanks,

Elliot

0 Kudos
Message 3 of 12
(3,505 Views)

Does the instrument have a command which doesn't return any data?

For example, "reset device".

 

We should separate the trouble into two components,

one is writing problem, another is reading problem.

To make it clear, send "write only" command and observe the behavior.

If it work correctly, there is a reading problem.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 4 of 12
(3,498 Views)

What is the make and model of the instrument?  Could you attach the entire manual or at least supply a link?  I'm fairly certain you have a configuration wrong, but we have no clue what it should be due to a lack of information.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 12
(3,467 Views)

Hi Emboar,

 

Yes, there was "RESET" command. But there was also error message: 1073807246 "Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->Untitled 4"

 

I tried separated writing and reading.  There was no error displayed at writing but error showed at reading section. Also, I tried the NI MAX VISA test panel, the error also pops up at reading section (self-test.PNG):

 

Thanks,

Ellot

 

 

0 Kudos
Message 6 of 12
(3,455 Views)

Hi crossrulz,

 

The device is OZ LSDH-VIS-C. 

https://www.ozoptics.com/products/operating_instructions_manuals.html

 

Thanks for your help!

Elliot

 

 

0 Kudos
Message 7 of 12
(3,450 Views)

@ElliotYY wrote:

Yes, there was "RESET" command. But there was also error message: 1073807246 "Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->Untitled 4"


Help->Explain Error.  Then you will see that error code -1073807246 means "VISA: (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it."  In other words, another application is still using that port.  That could be MAX, Putty, any other terminal software you are using, the supplier's software, or you failed to close the port on a previous run.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(3,445 Views)

Hi crossrulz,

 

Thank you for pointing out this. I closed the test panel from NI MAX. The reading error was still here (-1073807339). Still no idea how to fix the issue.

0 Kudos
Message 9 of 12
(3,439 Views)

Try restarting the PC in case the port got hung.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 10 of 12
(3,428 Views)