LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Micro-controller using Labview

Solved!
Go to solution

Now your are really give more information that we can use. 

These information should you have given from the start. 
So you have a STM program, and you have talk to your program using putty. 


Then look at the examples that come with LabVIEW. 
Do a little google search

@Crossrulz recently did a presentation that you may find helpful.  VIWeek 2020/Proper way to communicate over serial

 

When you have made your first vi, then come back. Show us the vi, tell us what you need to send, and what you expect to receive.  

0 Kudos
Message 11 of 27
(1,860 Views)

thank you so much.. i will watch the video and soon i will come with new vi

0 Kudos
Message 12 of 27
(1,843 Views)

Hello everyone,

Im back with my VI. now with this VI i can able to send command and receive the values which i want but im facing problem that is----

 if i send my 1st command then it is reading half output then i need to keep pressing send button to get full output then again same for next command. moreover sometimes if i send my 2nd command then it is displaying previous output then again i have to press send button multiple times for the output.

can someone tell me what is the problem??

the vi is attached 

 

Thank you in advance 

0 Kudos
Message 13 of 27
(1,807 Views)

What is your setting for reading number of bytes (the nameless U32 wired into VISA Read)?

 

Most likely you have that number set too low and/or are reading the response too fast.

After writing your command you would probably need at least a couple of ms delay before reading the response and if the response is for example 20 bytes, but you read only 10, then you get half a message.

 

Also having an event structure inside a case structure that only triggers occasionally is not exactly ideal.

 

 

0 Kudos
Message 14 of 27
(1,798 Views)

A couple things here...

  1. Post your code, the actual vi not a picture of your block diagram
  2. Watch this video: VIWeek 2020/Proper way to communicate over serial
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 15 of 27
(1,777 Views)

hi,

Thank you,

Already followed that video and made some changes in write sub vi as per i want but facing same issue that is-------

1. getting half output.(even i tried to increase read byte count.)

2 . Need to send same command multiple times to get output. do i need any delay in between or im using visa´s in wrong way ?

 

Thank you

 

Download All
0 Kudos
Message 16 of 27
(1,730 Views)

Hi, 

thank you,

I already went through that video and changed some vi and sub vi as i want it but the problem remains same----

 

1. Getting half output (even increased byte count in read visa ).

2. Need to send one command multiple times after one command then only im getting the output. (do i need a delay i between read and write visa).

 

thank you in advance 

 

Download All
0 Kudos
Message 17 of 27
(1,763 Views)

Neither of the VI's you posted is what you have pictured above?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 18 of 27
(1,752 Views)

yes i changed the VI by looking at the  @crossrulz`s video but the result is same. Can you please tell me what is the problem?

0 Kudos
Message 19 of 27
(1,747 Views)

How are you sending data FROM the microcontroller? 

Do you send a \n or \r at the end of your data string?

0 Kudos
Message 20 of 27
(1,741 Views)