LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CANNOT INTERFACE PROTEUS WITH LABVIEW USING RS232

Hii,

I am trying to interface Proteus with Labview to get value of voltage(analog) by using Potentiometer.

I have been using 89C51 as a controller and I am able to get the data serially through RS232 in PROTEUS (as shown in the image attached "L3"), But I am not getting output in Labview.

I want to display the value of voltage in Labview.

 

Have used Virtual Serial Port driver for communication between Labview and proteus.

And the output in Virtual terminal is continuous.

 

Also attached the Block diagram of Labview (image "L2"), please refer it and provide any solution.

Please help as soon as possible.

 

Download All
0 Kudos
Message 1 of 11
(4,981 Views)

Hi pd,

 

- Did you get any errors in your VI?

- Did you use the same COM port? (Hopefully not at the same time in parallel…)

- Did you set correct COM port settings? (You are using VISASerialPortInit with default values…)

- Don't use BytesAtPort, read the number of bytes you are expecting instead!

- Did you debug your VI using probes and breakpoints?

 

Btw. don't you agree your message title is easier to read when you don't cry out loud?

Best regards,
GerdW


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

Thanks for your valuable reply,

According to your questions,

There are no errors, and the com port settings are well defined.

Can you please guide us for reading value in Labview displayed in Virtual terminal.

0 Kudos
Message 3 of 11
(4,932 Views)

Hi pd,

 

I don't know that "Virtual terminal", so I can't suggest how to read its display.

 

I can only recommend to use VISARead to read data from a serial COM port. You did not answer all of my questions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(4,927 Views)

Sorry for the haphazard reply but we are actually running short of time for our project.

As per your questions:(Answers are)

- No errors in VI.

- No, have used different COM ports using Visa serial software.

- Yes, COM settings are well defined.

- Visa serial port is with 9600 baud rate and all is as per default.

- No, haven't debug.

 

Sir, actually using VISA read we are able to read only string(text) but we want to read Integers, that's our main issue.

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

Hi pd,

 

using VISA read we are able to read only string(text) but we want to read Integers, that's our main issue.

There is a full palette of string functions to convert strings into numbers…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(4,914 Views)

Sir, we tried that but its not working.

 

Let me define the detailed problem,

- we have interfaced a pot resistor to 8051 microcontroller.

- by using ADC we got data on respective port of 8051.

- now by serial communication we have serially communicated the port data.

- we have got success in transmitting data serially via RS232(which is shown by virtual terminal).

- virtual terminal is nothing but it shows what PC will receive.

- so at the proteus side we are clear.

- but now at the LABVIEW side we are unable to get the pot reading(voltage).

 

So can u please help about building block diagram/send block diagram to read integer values??

 

0 Kudos
Message 7 of 11
(4,907 Views)

So what are you receiving with visa write? 

What is this Virtual Terminal showing you? 

 

Any pictures would help here. You are the only one with the hardware and have done the test. 

We can't see what you are seeing.

0 Kudos
Message 8 of 11
(4,902 Views)

kindly check attached image

Download All
0 Kudos
Message 9 of 11
(4,891 Views)

So you have no loop, no timing, no wait between open of the port and reading from it. 

How do you think that your LabVIEW program will get data from the COM port? 

How offen is the data transmitted? 

How fast are the LabVIEW executed? 

0 Kudos
Message 10 of 11
(4,883 Views)