<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scaling in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1096029#M484792</link>
    <description>&lt;P&gt;I would really appreciate your feedback on creating the timer based on pressure reading. Thanks &lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2010 18:39:04 GMT</pubDate>
    <dc:creator>romesh</dc:creator>
    <dc:date>2010-03-22T18:39:04Z</dc:date>
    <item>
      <title>Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1093214#M483707</link>
      <description>&lt;P&gt;I have a sensor that calculates both pressure and vacuum. When I caliberated the sensor I received different slopes and offset for pressure and vacuum respectively. I have a certain sequence of solenoid states and I have to measure the pressure and vacuum flow rate. Sequence for ex:&lt;/P&gt;&lt;P&gt;Step 1) Solenoid 1 (pressure state), the system will go from 0psi to 32psi. Start the timer at 10psi and stop the timer at 32psi and based on time calculate flow rate.&lt;/P&gt;&lt;P&gt;Step 2) Solenoid 1 (vacuum state), 32psi to -10psi. Start the timer at 10psi and stop the timer at -10psi and calculate vacuum flow rate.&lt;/P&gt;&lt;P&gt;Step 3) Solenoid 2 and so on&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issues:&lt;/P&gt;&lt;P&gt;1) How do I apply different scaling?. I read the voltage using DAQ read and if its &amp;lt; 1.16 I need vaccum scaling and if not pressure scaling. Should I use some property node to implement it.&lt;/P&gt;&lt;P&gt;2) How can I implement the timer.&lt;/P&gt;&lt;P&gt;I would really appreciate if someone could direct me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2010 21:00:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1093214#M483707</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-17T21:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1093886#M483965</link>
      <description>&lt;P&gt;I have a project where I am doing the exact same thing except for the timing. I am doing pressure and vacuum. Are you using one sensor to do this or multiple?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I am doing mine is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one sensor that has a -14.7 to +30psi rating with an output of 0-10VDC.&lt;/P&gt;&lt;P&gt;If I scale this sensor I use a linear slope doing a calculation for the full range of 44.7 psi / 10 VDC = 4.47 slope.&lt;/P&gt;&lt;P&gt;If you take this number and times it times the voltage from your sensor you should get a number that is close to what you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as thee timing goes that is a bit more complicated. You can use a while loop and store the time when you go past 10 and when you get to your desired position. Then you can do the math to get the differential time. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look at my example &lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 15:24:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1093886#M483965</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-18T15:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1093903#M483972</link>
      <description>&lt;P&gt;Also for the scaling you need to subtract what the voltage is when the sensor is at 0 psi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scale should look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;voltage - voltage at zero * 4.47 psi/volt (assumes a -14.7 to 30 psi sensor with a 0 - 10 VDC output) = pressure. This will give you a positive and negitave pressure. This way you do not need two scales. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if we assume that your voltage is at 3 volts when at zero you get the following result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 volts - 3 volts * 4.47psi/volt = 0 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if we assume that your voltage is at 5 volts you get 
the following result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5 volts - 3 volts * 4.47psi/volt = 8.94 psi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if we assume that your voltage is at 1 volts you get 
the following result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 volts - 3 volts * 4.47psi/volt = -8.94 psi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 15:40:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1093903#M483972</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-18T15:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094001#M484005</link>
      <description>&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;Thankyou
 so much for your help. I just have one more questiion. For each 
solenoid I calculate the pressure and &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;vaccum and display it with the 
flow rate and the sequence has to progress in a right order. I have a 
case &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;structure based on state machine from a queue. In state "scan" I 
scan all my analog input channels and in state &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;"calculate pressure/vac" I
 use the slope to calculate pressure/vac. I have a state to check 
sequence and I would &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;like to create a static variable which should 
increment evertime I get into this state and check my solenoid firing &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;
sequence is right. This firing sequence is 0,1,2,3..30. Is it possible to do this with local variable or 
should I use &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;SPAN class="tags-added"&gt;global variable. Are is there any other method I could use 
to keep track of my firing sequence and log the sequence at the end.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 17:18:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094001#M484005</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-18T17:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094011#M484009</link>
      <description>Can you post your code so that I can look at it. I would try and stay away from local and global variables. Let me look at your code and I can help with a more appropriate solution.</description>
      <pubDate>Thu, 18 Mar 2010 17:34:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094011#M484009</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-18T17:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094023#M484015</link>
      <description>On check threshold state I need a variable solenoid fire sequence to check the firing order is right and if not give an option to the use to continue with the scan or stop the application that firing order was not right. Please let me know what would be the right thing to do. I still haven't implemented the slope yet.</description>
      <pubDate>Thu, 18 Mar 2010 17:49:12 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094023#M484015</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-18T17:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094043#M484025</link>
      <description>&lt;P&gt;What do you mean by variable sequence for the solenoid?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How are you going to check the firing order? Do you get a pressure or something back if you open a particular solenoid?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 18:09:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094043#M484025</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-18T18:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094074#M484032</link>
      <description>&lt;P&gt;Yes when I fire a solenoid the pressure on the tube should reach 32psi and when its open it should reach -10psi&lt;/P&gt;&lt;P&gt;vacuum. I am used to programming in text based language. What I meant by variable is if it was C I would have&lt;/P&gt;&lt;P&gt;used a static variable "solenoid_sequence" and check the index of threashold peak detector.vi with this variable.&lt;/P&gt;&lt;P&gt;Static by default in C will be initialized to zero then increment the variable. And when the next solenoid fires I will&lt;/P&gt;&lt;P&gt;check if its equal to 1 and so on to make sure i get the order right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 19:00:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094074#M484032</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-18T19:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094150#M484063</link>
      <description>So if I am understanding this correctly.... You need to change solenoide 1 to off get pressure reading then switch it on and get a pressure reading. In one state it should read +32psi and in the other state it should read -10. You need to perform 30 cycles of on and off for the soleniode. Correct?</description>
      <pubDate>Thu, 18 Mar 2010 20:38:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094150#M484063</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-18T20:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094176#M484073</link>
      <description>&lt;P&gt;Yes that is correct. I also placed a PSI indicator LED array keeping in mind that I can use the color[4] property to enable different color. For example initially in off state, green when the pressure reaches 10psi indication I started the timer, red when pressure reaches 32psi indicating I stopped the timer, then display the flow rate using some digital numeric indicator. I was able to change for a single LED using that property but when it comes to array I am not sure how to implement that. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help. &lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 20:56:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094176#M484073</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-18T20:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094191#M484078</link>
      <description>&lt;P&gt;Here is a start of what you need. There is a lot to it. I added the digital channel stuff. You will still have to add the analog channel to read. I also added the cycle counter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can change the color of a single boolean indicator but if you place them in an array it will change all of them. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not have time to write all of the code. I can give advice if you try and can not get it to work. I tried to show you the basic flow from the structure that you had.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would suggest adding a third loop that only does the analog reading for the pressure sensor. You can add more logic in the loops to make the channel wait until it is above a certain point to read the pressure or vacuum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I said I am will to help but I have done as much as I can for now.&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2010 21:16:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094191#M484078</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-18T21:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094237#M484093</link>
      <description>Thankyou so much. I really appreciate your help.</description>
      <pubDate>Thu, 18 Mar 2010 22:08:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094237#M484093</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-18T22:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094272#M484106</link>
      <description>About changing the color to an LED I need some some advice on how to implement it. I want the led to start with default color, change to orange when 5psi is reached(start the timer) and change to red when 30psi is reached(stop the timer). Should I use 30 LED's and use color[4] property or I read about color box on this forum many times. Please let me know how I can implement that logic.</description>
      <pubDate>Thu, 18 Mar 2010 23:22:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094272#M484106</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-18T23:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094605#M484201</link>
      <description>For the Led you can use the following vi. I added it to an example so that you can see how it works. Save both VI's to your hard drive then run the example vi.</description>
      <pubDate>Fri, 19 Mar 2010 12:40:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094605#M484201</guid>
      <dc:creator>aeastet</dc:creator>
      <dc:date>2010-03-19T12:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094904#M484310</link>
      <description>&lt;P&gt;Thanks. I have modified the program from your help and got to a point where I have to start the timer when &lt;/P&gt;&lt;P&gt;pressure is 10psi and stop when 30psi. I didn't implement the digital stuff from your sample because I guess&lt;/P&gt;&lt;P&gt;I wan't clear when I explained my application to you. I am not controlling the solenoid. The solenoid are&amp;nbsp;&lt;/P&gt;&lt;P&gt;controlled by outside instrument. All I am doing is reading a bunch of pressure sensor using USB6218 data&lt;/P&gt;&lt;P&gt;acquisition. I have attached my VI. Please let me know how to automatically start and stop the timer based on&amp;nbsp;&lt;/P&gt;&lt;P&gt;pressure and for the same solenoid start the timer again at 10psi and stop at -10psi. I tried with outer while loop&lt;/P&gt;&lt;P&gt;and a shift register to carry the time until pressure is 30psi and get an current time again to subtract the prev&lt;/P&gt;&lt;P&gt;value with the current. But I wasn't sure how to break the while when the condition is met and start it when the&lt;/P&gt;&lt;P&gt;pressure drops again to 10psi and reaches -10psi for vacuum. Thanks for all your support. &lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2010 18:09:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1094904#M484310</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-19T18:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1096029#M484792</link>
      <description>&lt;P&gt;I would really appreciate your feedback on creating the timer based on pressure reading. Thanks &lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2010 18:39:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Scaling/m-p/1096029#M484792</guid>
      <dc:creator>romesh</dc:creator>
      <dc:date>2010-03-22T18:39:04Z</dc:date>
    </item>
  </channel>
</rss>

