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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To read the pressure transducer value using USB 232 serial port.

Objective is to display the Pressure Dynamic curve (P vs t) with respect time using USB 232

I have pressure transmitter which show the pressure(Backside Transmitter Connection)

20190821_144515.jpg

USB-232 is connected to the PC port

20190821_145824.jpg

 

 

Questions:

A. I was reading Chapter on Control of Stand alone Instrument from Lab-view book. The chapter require to have GPIB interface bus.This required NI-GPIB device connected to the computer. In my case, I am just using USB-232 to the computer port? Is it correct way or do I need aforementioned device or DAC to read my transmitter data? 

 

B. I use MAX to check if my USB-232 deice is connected  properly to my computer. I have no issue in that but The Measurement and Automation Explorer gets different Visa resource names every time I unplugged the USB-232 port and reconnect back to PC port  it show with ASRL21:INSTR, if I reconnect then again it shows  ASRL24:INSTR  the numbers keep getting bigger.? Why this happen Is there any issue with my Window or Is it normal? 

2.png

C. I tried to create the block diagram it shows the following error? I didnt understand it clearly. 

3.png

 

D. I  tried to create the block diagram without the loops it shows the following error? I didnt understand it clearly. 

4.png

They both show the Same ERROR. 

4 - Copy.png

Any  advice How can I run my block diagram?

I have enclosed the VI file with this 

0 Kudos
Message 1 of 7
(2,824 Views)

Hi skdubey,

 

It's a little odd that the com port is being renamed each time, that might be an issue with the converter you're using, in any event, in my humble opinion, you're on exactly the right path at steps C and D.  The next thing I would recommend is wiring constants or controls to the settings for Baud Rate, Parity Bits, ect. on the block diagram of your "Pressure trans" vi.  The settings for these should be provided in the device documentation and might be different than the defaults.  Some devices stream serial data constantly while others need a command written to them before they'll respond with anything, I would also look into that if you haven't already.  Best of Luck!

Message 2 of 7
(2,812 Views)

Hi skdubey,

 

A. Is there a reference to this chapter available somewhere in the net?

B. Windows issue…

C. Your device does not send any (or: enough) data…

D. "Without loops" is ok when you wan to read just one message from your device. Any other use case requires loops…

 

Any advice How can I run my block diagram?

Read the manual of your device!

It should contain a chapter on "Remote control" or "communication" and also explain how to achieve communication between PC and device…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 7
(2,804 Views)

Windows will assign a new port number when disconnect reconnect if it can see the serial number of the device is the same as previously noted.

 

I would check I have the most up to date driver for the USB-Serial widget.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 7
(2,788 Views)

I try really hard to avoid USB-Serial converters with Prolific chipsets, I have had much better luck with FTDI-based devices.  Usually I get the same Com Port# as long as I plug into the same USB port, and if that is a problem, it is easy to setup the FTDI driver to map the com port based on the serial #, regardless of location.

 

I would be surprised if your device simply wrote data blindly over the serial port, you almost certainly need to send a command and then read the reply to that command.

 

I usually test this kind of device in the following order:

  1. Use software from the manufacturer to communicate with the device if available, otherwise TeraTerm or similar
  2. Use NI-Max to send commands and read the reply
  3. Use LV

 

 

0 Kudos
Message 5 of 7
(2,782 Views)

In your first window above, it has Port Settings for this device listed TWICE. What does the other Port Setting show?  Not sure about the current MAX software, but previously, it would ask whether it is to be controlled by VISA or Windows with a radial button in the Port settings.  I always needed to select VISA in order to control it through LabVIEW.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 6 of 7
(2,759 Views)

Hey,

Some more information on the transmitter device:
1. The transmitter is (16 character alphanumeric LCD display)user-defined alphanumeric information
2. Bidirectional 
3. P/N 1291-002 (110VAC) or 1291-002 (220VAC): • Power adapter module, P/N 6671-0031 • 110 or 220 VAC wall power supply, P/N6024-001 or 6024-002
4. RS 9-pin D-Sub connector for RS-232
5. Continuous pressure measurement data
6. Digiquartz Intelligent devices are initially configured for RS-232/RS-485 communications at 9,600 baud. The serial protocol is fixed at 8 data bits, no parity, and 1 stop bit
 
One more question: When we give the write command. What kind of command we should follow to read and write. Is the one IEEE 48.2 Common Command (Hands on Instruction Labview, John Essick page number: 430). or the Device documentation also show some commands but I didnt understand how can it be used for VI program. I tried to understand the communication part in the documentation, Its too electronic I had attached file with this. Pg-23-25. It also talk about ID number which I dont understand well!
 

I made following correction: But I am getting the error: 

Error1 Possible reason(s):LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
 

1.png

0 Kudos
Message 7 of 7
(2,689 Views)