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.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO data update

Solved!
Go to solution

Dear sir, 

I have a confusion in the VI that i have attached. I want to import the data i had got in myRIO. so i created a shared variable for voltage, current, power factor. When i run the excel VI the value of current is wrongly updated as ZERO in excel sheet. 

The other doubt is, whenever i run the final VI the voltage and current values are continuously updated, when i stop the VI the values of power factor is updated. Initially i thought the reason behind this is the power factor is placed out of while loop.even when i removed the while loop the power factor value is displayed a zero and the same continuous continuous when i stopped the VI. I could not solve this problem sir, so i am seeking your help,please help me to rectify this error sir.

Download All
0 Kudos
Message 1 of 8
(7,154 Views)

Hi swathik.

 

Can you attach a snap of your excel sheet as well?

 

Cheers,

Rao

0 Kudos
Message 2 of 8
(7,118 Views)

i attached sir

0 Kudos
Message 3 of 8
(7,106 Views)

i attached sir

0 Kudos
Message 4 of 8
(7,105 Views)
Solution
Accepted by topic author swathik

Hi Swathik,

 

The answer to your question as to why the power factor updates only once is because you have placed that indicator outside the while loop (as you mentioned). The solution is not to remove the while loop, but put all the code that you want to be updated/ repeated multiple times into one while loop,i.e.., if you want all the calculation of power factor and such parameters (P,Q,S,phi) to be also carried out every time and logged every time, put it inside the while loop.

 

Another thing, is the improper use of the shared variables. You have to be very careful in the implementation of the same.

 

It is a much better practice to go ahead with the Producer consumer architecture, which you can follow from the following link

 

http://www.ni.com/white-paper/3023/en/

 

The producer loop will keep generating values from the myRIO, and the consumer loop will log the obtained data into the excel sheet.

 

Cheers,

Rao

0 Kudos
Message 5 of 8
(7,099 Views)

Please send me any links regarding shared variable sir.

0 Kudos
Message 6 of 8
(7,072 Views)

i am running server VI and client VI using my RIO. i want to get the data in the web page with excel sheet.

 

here i attach my client and Server vi programs

 

 

0 Kudos
Message 7 of 8
(5,517 Views)

Hi ,

 

Try using Network Published shared variables to transfer data between Client and Server. Should be much simpler to do this. 

 

http://www.ni.com/tutorial/12176/en/

 

Regards.

0 Kudos
Message 8 of 8
(5,514 Views)