LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dattalogger using API

Hi, I am trying to create a data logger using API from a smart device.
However I am facing issue with writing the data to the file. After the 1st loop, the reference value of the file becomes zero, and the data is not getting logged in the file. This is the first step of the project. I then want to load this file on myRIO and able to log data in myRIO

0 Kudos
Message 1 of 8
(313 Views)

Hi mars,

 


@mars23 wrote:

After the 1st loop, the reference value of the file becomes zero, and the data is not getting logged in the file. 


This could happen when there is an error occuring inside the loop/case.

Does an error occur?

 

Did you know you can simplify your VI by using FormatIntoString with all its possibilities?

Like this:

Do you know you can show the "digital display" for your charts? (No need for separate indicators!)

Do you know you can change the formatting of digital/numeric indicators to also show an unit (like "W")? (No need for conversion to string!)

 


@mars23 wrote:

I then want to load this file on myRIO and able to log data in myRIO


You know the myRIO will handle the file in its internal "hard drive"?

Do you know the myRIO doesn't have an UI and so it cannot use the FileDialog ExpressVI?

Best regards,
GerdW


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

I did not know the myRIO doesn't have an UI. So, then what should I use instead of the FileDialog ExpressVI ? could you please guide me ?

0 Kudos
Message 3 of 8
(275 Views)

Hi mars,

 


@mars23 wrote:

I did not know the myRIO doesn't have an UI.


Do you see any monitor connector (like DP, HDMI, DVI) on your myRIO?

 


@mars23 wrote:

So, then what should I use instead of the FileDialog ExpressVI ? could you please guide me ?


You need to define the filename programmatically, without user interaction…

 

I repeat: you know the myRIO only uses its "internal drive" and has no access to the storage of your host computer? (This is one of the main problems when unexperienced people use NI-RT targets…)

Best regards,
GerdW


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

Thanks, I simplified the output with your suggettion..

I checked with the Probing tool , There is a error inside the loop. 
error code : ERR(-375004). Is the shift register getting reset to zero because of this error ?

mars23_0-1752763188880.png

 

0 Kudos
Message 5 of 8
(235 Views)

Hi mars,

 


@mars23 wrote:

error code : ERR(-375004). Is the shift register getting reset to zero because of this error ?


You can easily test this with some more probes!

 

Now you should implement some error handling to handle that "too many requests" error! (Or even prevent it by don't requesting data so often!?)

Best regards,
GerdW


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

Hello, 
I am trying to debug the code. However, just wanted to clear one doubt. We are about 25 students working on this same API from college lab. Is it possible that since everyone is trying to access this API, this issue is being created ?

0 Kudos
Message 7 of 8
(201 Views)

Hi mars,

 


@mars23 wrote:

We are about 25 students working on this same API from college lab.

Is it possible that since everyone is trying to access this API, this issue is being created ?


There are 20+ clients trying to access the same service.

The error message is about "service overload".

 

This might be pure coincidence - or cause & reaction…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 8
(197 Views)