04-26-2012 12:53 PM
Hi guys,
I need some help with creating a custom scale. I am reading motor current (analog I/P) and would like to display that on a graph and write it to a file. I need to use a linear scaling for custom scale. The slope is 2 and the intercept is 0. I've attache the code to make it clear what I am trying to acomplish. The way I've set it up right now is no scaling. There are 2 tasks in the code. I would like to create a custom scaling for the first task as seen in the attached code. I have done custom scaling using DAQ Assistant Express VI. But I dont see such options when I try to do the same with the DAQmx task. Please let me know how this can be done. Any help is greatly appreciated.
Thanks,
Raj
Solved! Go to Solution.
04-26-2012 12:56 PM
04-26-2012 01:01 PM
Hi Jeff,
Isn't what you suggested is with the DAQ Assistant express VI? I dont see how to open up the same panel in the DAQmx code! Please have a look at my code and let me know how to create the custom scaling in that block diagram. Thanks!
Raj
04-26-2012 01:20 PM
Ah.
on the DAQmx pallate >Advanced>Scale Setup
There is "Create Scale.vi" and a scale property node
04-26-2012 01:21 PM
Look at Programming>>Measurement I/O>>DAQmx>>Advanced>>Scale Setup.
Hope this helps
04-26-2012 01:36 PM
Hi Jeff,
Thanks for your help. Can i bother you with one more question? can you tell me how to connect the create scale VI in the sub vi code I have attached? as in do I need to have the create scale VI before or after the first DAQmx create channel VI? and I would like to create this custom scale only for the first physical channel and not for the physical channel 2. I would like to have the second channel (physical channel 2 in the code) to remain un scaled. Please let me know how this can be done. If you can show me the connections via a screen shot it'll be very helpful and easy for me to understand as I am a newbie to LV!
Thanks,
Raj
04-26-2012 02:17 PM
Here it is as a snippet (You didn't specify what version you used and the FP is not 2012)
04-26-2012 03:13 PM
Hi Jeff,
I tried doing it the way you have connected in the block diagram. I am not able to connect the "scale out" of the DAQmx create scale VI and the DAQmx channel. I've attached the screen shot of the block diagram. Please let me know how to fix this error.
Thanks,
Raj
04-26-2012 04:20 PM
04-26-2012 05:11 PM
You both had me going nuts trying to figure how to get to that property. Basically just right click the DAQmx property node and "Select filter..." . This brings up the "Configure Filter Settings" where I chose 'show all attributes'. I could then get to the AI Custom Scale Name property.
Interestingly when you use the Property Browser and select the magnifying glass you can get to that property...but you just can't select it if you have the filter set incorrectly. Lesson Learned.
I also found this community example and that one.