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 Matt

Thank god you are back! 

I would think the same if not the problem was with all 3 charts. As soon as I wire the custom scale to the DAQ.mx all 3 charts just freeze. No new data is getting plotted.

 

Greetings 

DP

0 Kudos
Message 11 of 22
(1,403 Views)

HA,

 

Well ill try to help.  It will be a good learning experience for me as well.

 

Can you tell me what your setup is and ill simulate it here. 

 

What hardware you have and configuration of your task?



-Matt
0 Kudos
Message 12 of 22
(1,398 Views)

I have a cDAQ-9174 with two modules that I use so far. One for reading temperatures in degrees celcius from 2 thermocouples type K (NI 9211) and a second module to read a current signal 4-20mA from a pressure sensor (NI 9219). When the pressure sensor gives of a signal of 4mA I want it plotted on the graph as 0 mbar. When it reads 20mA I want it to plot it as 1000mbar. That is what the custom scale was for or atleast what I hoped for.  

 

Greetings 

DP

0 Kudos
Message 13 of 22
(1,395 Views)

DP,

 

First thing i notice in your original VI is that you do not have the units on your physical channel setup for current.  you need to set that to "from custom scale" when the custom scale is wired.  Im curious if youve seen that error before? You should also wire the error from the daqmx read to an or statement and wire that to your while loop stop, I attached a snippet for that.  So if you get an error at the read it will stop the loop. 

 

One last suggestion, you may want to minimize the block diagram to the current problem, just the current measurements, so you can focus on that. 



-Matt
0 Kudos
Message 14 of 22
(1,379 Views)

Hi Matt

I am pretty sure that I have tried setting the units to "from custom scale" when I wired the custom scale. That did not seem to help anything. Nope I have never seen that error before as I just wired the error signal to DAQmx Clear Task. That is a really good idea. I am gonna try to do that. Do you think it will give me an error code if no data is getting passed through the AI Current DAQmx or can I somehow make it do so?
So you think I should remove the two DAQmx for temperature and test the system without? 

 

Thanks alot Matt. 

Greetings 

DP

0 Kudos
Message 15 of 22
(1,372 Views)

I would assume that no current is just no current, still a measurement, shouldnt be a problem. But yes i would just focus in on the current measurements. Just create a new VI for testing.  I simulated the data here and everything seemed to be working as expected. 



-Matt
0 Kudos
Message 16 of 22
(1,362 Views)

I will try to do that but I will first be able to tell you how it went tomorrow if that is ok? 🙂

When you simulated the data did you also put two AI Temp DAQmx and an AI Current DAQmx after eachother like I did? I am really curious how you wired everything up and made it work! 😄

 

Greetings 

DP

0 Kudos
Message 17 of 22
(1,359 Views)

Hope this helps.

 

Also read this document before you try to troubleshoot again.  Im not sure where the error in your application was, could be the task setup, but for the custom scale i think you need to set the max and min on your channel setup to the max and min of the custom scale scaled values.

 

http://digital.ni.com/public.nsf/allkb/66FCA01C089F42D786256DDD00040CE5



-Matt
0 Kudos
Message 18 of 22
(1,352 Views)

I am gonna try out what you suggested.

I havent made any task configuration or as far as I know which could be the problem. Could you show me what you made of task configurations? To better understand what you exactly mean?

Another thing I wanted to ask you Matt is how to add a timestamp to the TDMS file. Is it complicated? Before when I used the write to measurement file the timestamp was included. 

 

Greetings 

DP

0 Kudos
Message 19 of 22
(1,345 Views)
Solution
Accepted by Ben

I was referring to the task setup in your application.  Try to fix the custom scale and then well talk about that part of it.  Here is an example to add timestamps to your tdms file.

 

Add timestamp to TDMS



-Matt
Message 20 of 22
(1,331 Views)