10-03-2016 11:45 AM
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
10-03-2016 11:49 AM
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?
10-03-2016 12:04 PM
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
10-03-2016 01:15 PM
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.
10-03-2016 01:34 PM - edited 10-03-2016 01:38 PM
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
10-03-2016 01:53 PM
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.
10-03-2016 01:58 PM
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
10-03-2016 02:12 PM
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
10-03-2016 02:32 PM - edited 10-03-2016 02:36 PM
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
10-03-2016 03:08 PM
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.