LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Apply custom scale and add bolean so I can log on demand

Solved!
Go to solution

Hi

 

I have a problem adding my custom scale to the code. I have a pressure transducer that is working in the range of 4-20mA. So I made a custom scale as you can see in the code and tried to wire it to the custom scale name on the DAQ.mx. That does not seem to work any suggestions? 

 

Another problem I have is that I want to be able to log on demand with a bolean button. How do I do that if I want to keep the option to only write data at a specific time interval? 

 

Greetings 

DP

0 Kudos
Message 1 of 22
(3,484 Views)

Hi DP,

 

To use the custom scale simply wire it to the create channel on the AI current create channels.  Also when it comes to writing to file i would suggest to ditch express vi's.  I can help with writing to file, but what kind of file are you using and you mention writing for a specefic time interval. What do you mean by that?



-Matt
0 Kudos
Message 2 of 22
(3,456 Views)

Hi Matt!

 

I am not sure what input you want me to wire the scale to as I can not seem to find it.

Yes, I would really like you to help me out. I have slowly been ditching the express vi's so that would be a huge help. I am using a regular text. file (LVM).

About the specific time I made an option on the front panel to be able to choose how often data should be written to a text. file (every x seconds) but I also want a button / bolean on the front panel to initiate logging. Right now the data is written at the specified interval as soon as the VI starts. I thought about putting one more case structure around the elapsed time vi and the write to measurement file vi and wire a bolean to the case structure to solve the problem.

 

Greetings 

DP

 

0 Kudos
Message 3 of 22
(3,448 Views)

I wired up the scale for you and put in logging for TDMS, if you want to import tdms into excel you may need to install the tdms viewer its free and you can download from ni. 

 

Let me know if youve got questions.



-Matt
Message 4 of 22
(3,443 Views)

Hi Matt 

 

I will be able to test it out tomorrow morning and will tell you how it all went. I really appreciate your help and your fast response! As far as I can see from your changes you have unwired the log interval and I guess the logging interval is controlled by the time target? Also that was a smart trick with the bolean for logging. So when the time has passed and the log button is pressed the data will be written when the target time has been reached? What is the purpose of the true constant you wired to the reset input on the elapsed time vi ? 

 

Once again thanks for the help!! Great guy!

 

Many greetings 

DP

0 Kudos
Message 5 of 22
(3,440 Views)

Yes to all of your quesitons, and i just wired in the constant so you could see it was set to auto reset.  So when the elapsed time has reached the target time the timer will reset automatically.  Just wanted you to see that.  If that does the trick for you just mark the solution and kudoes are always welcome Smiley Very Happy

 

Good luck. 



-Matt
0 Kudos
Message 6 of 22
(3,437 Views)

Hi Matt

 

I tested the code today and when it is running it is not displaying anything on the graphs. As soon as I unwire the scale from the AI Current DAQ.mx it displays data again. What could be the problem? That was the exact problem I had before.

 

Greetings 

DP

0 Kudos
Message 7 of 22
(3,416 Views)

Anyone else have any ideas? please help out! 🙂

 

Greetings 

DP

0 Kudos
Message 8 of 22
(3,375 Views)

I have tried so many options but I can not seem to make it work. If anyone is reading this and know how to solve my problem please help! I am going nuts trying to figure out why I can't read any data when I wire the custom scale to the "Custom scale name". I also tried with the custom scale node and different approaches. 

 

Greetings 

DP

0 Kudos
Message 9 of 22
(3,347 Views)

HI DP,

 

After looking at your scale I think chart 3 is the only chart that would be able to plot the data.  You should wire up a digital indicator to check the data. Ive personally never used a custom scale before, but i wouldnt be surprised if the data was not what you expected. 



-Matt
0 Kudos
Message 10 of 22
(3,322 Views)