Generate PWM signal with 6602 utilizing load cell feedback

Hi Everyone,
I am new to LabVIEW so I apologize if this question is elementary but I really need some help with the coding. First of all, I need to generate 8 independent PWM signals to control 8 separate linear acuators using the NI 6602 board. I have each actuator wired to their own COUNTER OUT pins and ground on the SCB-68 that is connected to the 6602. The specs for the actuators state that it will take an input of "RC input range of 1.00 to 2.00msec pulse widths @ 55Hz. Bandwidth=.44to160Hz. Period from 6-23  msec". How can I code for these PWM signals given the specs from the manufacturer?
In the end I need to be able to not only control these actuators based upon duty cycle, but based upon the load each actuator is applying. Each actuator has a load cell in series measuring the tensile force through the load cell (the actuators will be pulling on strings). Each load cell is wired to a NI 9237 in a NI 9074 block that is connected via USB to the same computer. So first comes first, how can I code for the load cell output to be brought into the LabVIEW environment?
My last question is pulling this all together. How can I code so that I can input a specified load into LabVIEW and then based upon the value the load cell is reading, the duty cycle of the PWM will be adjusted until the the desired load is achieved?
Thanks in advance for any help! Also, I know that this is quite a complex questions so if you can even point me in the direction of resources that would be helpful, I would greatly appreciate that too!
Thanks,
Ryan

Hello Ryan,
Here's a tutorial on generating PWM with LabVIEW:
http://zone.ni.com/devzone/cda/tut/p/id/2991
How are the load cells outputting the data? Is it an analog signal? If so, you can read that in using an analog input task, and run that in parallel with the PWM task. Then you can modify the frequency and duty cycle inputs that you're giving you the DAQmx write inside the PWM code based on the analog input. By putting the DAQmx read and the DAQmx write in the same for loop, you can read from one and modify the other at the same time.
Here's a tutorial that shows a lot of useful information for using DAQmx within LabVIEW:
http://zone.ni.com/devzone/cda/tut/p/id/2835#toc6
If you're interested in getting better at LabVIEW in general, NI has some learning materials available here:
http://www.ni.com/academic/students/learnlabview/
Let me know if you have any further questions once you've gone through those first two tutorial links.
Colden

Similar Messages

  • Generating PWM signal using Signal Express

    Hi,
       Would anyone help in generating PWM signal usinf Signal Express 2.5.1.   I am using a cDAQmx and connected NI 9472 to the slot number 6 to output the PWM signal. Also I have connected a NI 9421 to the slot number 5 to acquire the PWM signal, so that I could verify the signal.
       So would you please let me know how could I generate a PWM signal using Signal Express without any LabVIEW Programming. Please help me out.

    HI Aamruth,
    I atached a project, where you can see how to do it. I hope this helps.
    Regards, Mona 
    Attachments:
    PWM.seproj ‏29 KB

  • Measuring PWM Signal with NI9423 with C-RIO 9073

    Attachments:
    Simulator1.vi ‏114 KB

    Eh..sorry. I do not know what happened, but it seems like my questions is gone in my previous post.
    Let me recap, I'm new to NI Components and LabView.
    I wanted to measure 8 PWM Signal generated from a controller (200Hz, Max 4A, 24Vdc).
    WIth NI engineer's suggestion, I bought cRIO 9073 and NI 9423 for this purpose.
    I have created a VI for this purpose. It seems to be working at first, but later on, the value read by the NI 9423 becomes unstable even though the out put signal from the controller was stable.
    The value read by 9423 just goes up and down with an increasing PWM signal from my controller.
    below is the setting for the 9423.
    Thanks.

  • DAC voltage capped when operating in torque mode with load cell feedback

    Hi, i'm doing a tension control on a cable driven system using servo motor. I had connected a load cell as analogue feedback for cable tension into the labview programme suggested in http://www.ni.com/pdf/manuals/371242c.pdf (Figure 13-3. Torque Control Using Analog Feedback Using LabVIEW)
    Problem 1: The response between desired tension and actual tension is good until about 80N, when the motor stops responding to higher torque changes. The voltage output in DAC is only 4-5V (max voltage output is suppose to be 10V) and the motor and amplifier had been verified to run up to 200N. What is limiting my DAC?
    Settings:
    Card: PCI-7350
    Analogue input: 0-5V
    Problem 2: I had implemented a low pass filter of 30Hz in MAX for the load cells. The effect is quite good for the low tension. However, as the tension increases, the noise increases proportionally too, causing vibrations and switching sounds to be heard at higher tension. Is there anyway to overcome this?
    Please help. Thanks 

    I can't see anything special with your settings, so I currently don't have a clear understanding, why the output voltage is limited.
    Could you please test the analog output? You could do this configuring the axis as an open loop stepper axis. This will allow you to set the analog output with Load DAC.
    Does this allow you to output higher voltages?
    Could you please do the test with and without signal connection to the analog output? Maybe the input impedance of your drive is too low and pulls down the board's output voltage.
    I hope that helps,
    Jochen

  • Servohydra​ulic control with load cell feedback

    Hello,
    We are planning to build a tie rod fatigue test system with Labview and NI PCI-7344 4-Axis Motion Control Board. We have two linear servohydraulic actuators for applying linear force to tie rod and a servo motor for steering wheel movement. Tie rod must be vibrated by linear servo hydraulic actuators with constant force (+/- 50N , compression and tension direction) as 20 Hz while the steering turns (this is for road simulation) .
    I think we can generate the 20 hz triangle waveform with 7344 motion control board for controlling servo hydraulic. But the main problem is to apply stable force with servo hydraulic actuators while steering wheel is turned by servo motor with constant frequency. There are two load cell as load link in the system so can we solve this problem with connect load cell to 7344 as feedback ?
    Could you please share your opinions about hardware and software selection and application? What do you think about onboarb programming for this system?
    I have attached two images regarding this systems which was build by some companies.
    Best Regards
    Steward

    Steward,
    I think you should be able to use the analog feedback feature of the 7344 to accomplish your task. Please refer to this link where you can find an attachment that explains the details of using analog feedback.
    I don't think that you will need any onboard programming for the control task but depending on your security needs you might want to use it for emergency stop actions (e. g. when something goes wrong and the speed or the force become too high).
    Please note that the 7344 does provide 12 bit ADCs for analog feedback. If the accurracy of these ADCs is not enough for you you should consider to use a 7356 instead which provides 16 bit ADCs.
    Please read the document linked above. If you find that for some reason analog feedback is not the solution for your task we can talk about other options.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • 9237 with full-bridge load cell: load cell_null_off_shuntcal.vi throws error 200077

    Hi,
    I'm trying to use the example
    load_cell_null_off_shuntcal.vi  with a full-bridge load cell (Honeywell
    Model 31, unamplified). I am using LabView 8.6,  cDAQ-9172 and NI9237. The
    load cell is connected to pins 2,3,6 and 7.
    The inputs for the VI front panel
    are: internal excitation10V; mV/V 2.1492 (calibration sheet); max weight 10
    lbs; bridge resistance 350 ohms (Honeywell specs); 9237 internal shunt
    resistance 100 kohms; shunt location R4 (default setting). I have selected
    "Do offset null" and "Do shunt cal".
    This is the error I receive:
    Error -200077 occurred at DAQmx
    Perform Shunt Calibration (Bridge).vi:1 Possible reason(s):
    Measurements: Requested value is not
    a supported value for this property.
     Property:
    AI.Bridge.ShuntCal.GainAdjust
    You Have Requested: -61.980405e3
    Valid Values Begin with: 500.0e-3
    Valid Values End with: 1.500000
    If the "Do shunt cal"
    green button is not selected, there is no error. I understand that the Gain
    adjust value should be approx 1, whereas the one I get is much larger. The  subVI  DAQmx PerformShuntCalibration
    (bridge).vi contains a "Call library function node" which I don't
    know how to interrogate.  
    Has anyone else had experience
    with this error? Do you have any advice on:
    1)    
    How to "see" the calculations being
    perfomed inside the "call library function node"?
    2)    
    What the correct shunt element
    location for a full bridge load cell is? (although changing this location does
    not eliminate the error, I can't find this info).
    3)    
    Anything I may be doing wrong with
    my inputs to cause this error?
    Thanks,
    Claire.
    Solved!
    Go to Solution.

    Hi Claire,
    You have to physically connect the SC terminals to one arm of the bridge (normally R3). The terminal is not provided for connecting external resistors.
    See example 
    C:\Program Files\National Instruments\LabVIEW 8.6\examples\DAQmx\Analog In\Measure Strain.llb\Cont Acq Strain Samples (with Calibration) - NI 9237.vi
    "A VI inside a Class is worth hundreds in the bush"
    യവന്‍ പുലിയാണു കേട്ടാ!!!

  • OCI bowser generates new session with each page load

    Here is a summary of my problem:
    I am trying to implement the SAP Open Catalog Interface (OCI) with our eCommerce software, but I am having issues with the Web browser that OCI uses.
    Our eCommerce software utilizes the browser session id to identify the user. Our issues is that the OCI browser supplies a new session id with each page load.
    The weird part is that if I open a standard instance of IE, access the site, and then access the site though OCI the same session is shared by both the OCI browser and the IE browser. The OCI browser is now able to maintain the session ID as the user browses the site.
    Thanks.

    Thank you for your quick response.
    I understand that session IDs are always unique, and should only last for as long as the instance of the browser is open.
    What I have seen happen is that the session ID will get recreated with each page load with in a single instance of the OCI browser.
    When the site is opened in OCI it logs the user in, and then redirects them to the homepage. The problem is that the load of the login page, and the load of the homepage have different session IDs. If the user then clicks on a link on the homepage that page load will again have a different page load. This causes the eCommerce system to see them as separate users.
    As I described when I open an instance of IE first it seems to work. This leads me to believe that the OCI browser can read the cookie information, but can't write or create. 
    I am trying to figure out why the OCI browser keeps generating new Session IDs.

  • Shaker control with output from load cell

    Hi
    I am using a (analog output) shaker to generate sinusoidal forces at different frequency and of different magnitude. I am also using a load cell (analog input) to sense these forces . The max force generated by shaker decreases as I increase the frequency of vibration. Whereas, the experiment requires the force to be constant when the frequency is changing. I plan to use the max force obtained from the load cell data, as the process parameter, to modify the amplitude of input wave which excites the shaker. I seek help in this regard. I am using PCI6221 and SCC68.
    Thanks in advance.
    RSD 

    Sorry, I have been extremely busy the last couple of days (months?). I still haven't had much time to ponder the problem, but one thought comes to mind, at what frequencies are you running this and what is the load cell, and its supporting electronics, frequency response. You mention that the amplitude decreases as the frequency increases, but that you increase the gain of the driver amplifier. It (the system) is most likely non-linear in its response, so how much you increase the gain will vary. The nonlinearity of the response is one of the reasons there is so much published about control systems, PID controllers, etc.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • 672PCI 6723 error when attempting to generate DO signal with 20kHz sample clock

    I have a piece of code that successfully worked on the PCI-6224 card, but when I tried to implement the same code on the PCI-6723 card I have run into problems.
    Here is the code that I am using:
    ManchConversion6723();//produces SendIt array of series of 1s/0s
    // DAQmx Configure Clock
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
    DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,20000,0.5));
    DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,72));
    // DAQmx Configure Digital Output
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));MessageBox("D");//vj
    DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev3/port0/line0","",DAQmx_Val_ChanPerLine));MessageBox("E");//vj
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev3/Ctr0InternalOutput",20000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,72));
    // DAQmx Write Code
    DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,72,0,10.0,DAQmx_Val_GroupByChannel,SendIt6723,NULL,NULL));
    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    When I arrive at the DAQmxCfgSampClkTiming line, I receive an error stating:
    DAQmx Error: Measurements: Requested value is not a supported value for this property.
    PropertyAQmx_SampTimingType
    You Have Requested: DAQmx_Val_SampClk
    You Can Select: DAQmx_Val_OnDemand
    Task Name: _unnamedTask<0>
    Status Code: -200077
     I believe the problem stems from the source variable of the function. I am simply tring to send the data out at the 20KHz rate.
    Any help would be greatly appreciated. Thanks in advance!
    Solved!
    Go to Solution.

    Nevermind. Seems as though the PCI-6723 does not contain correlated DIO channels. In other words, sample clocks can not be tied to the DIO channels to allow for digital waveform generation. According to the AO Series User Manual, this applies to NI 6731/6733 Only. The error was trying to tell me that only a single transmit or receive channel was allowed.
    For this reason, I will just stick with my PCI-6224 card. 
    Sorry for the confusion.

  • NI 9219 with load cell

    Hello,
    I am using the NI 9219 with a Futek Load Cell whose specifications are as follows:
    Name
    Min
    Typ
    Max
    Unit
     Channel: 1
     Compensated Temperature
     60
     160
    F
     Excitation
     1
     20
    Vdc
     Hysteresis
     -.25
     .25
    % of R.O.
     Input Resistance
     744
    Ohms nom.
     Insulation Resistance
     500
    Mohms @ 50 Vdc
     Nonlinearity
     -.25
     .25
    % of R.O.
     Nonrepeatability
     -.05
     .05
    % of R.O.
     Operating Temperature
     -60
     200
    F
     Output Resistance
     700
    Ohms nom.
     Safe Overload
     150
    % of R.O.
     Temperature Shift Span
     -.01
     .01
    % of Load/F
     Temperature Shift Zero
     -.01
     .01
    % of R.O./F
     Zero Balance
     -1
     1
    % of R.O.
     Capacity
     500
    lbs
     Rated Output
     2
    mV/V nom.
     Calibration Excitation
     10
    Vdc
    I am getting a signal from my load cell which is great, but I was wondering how you can adjust the signal output to have minimal interference from noise, vibrations, etc. and how to program the load cell that it can be calibrated to zero (0) before any data is aquired?
    Any help is greatly appreciated! 
    Thanks,
    Yatsco

    Hello Yatsco,
    Thank you for using NI forums.  One thing you will probably want to look into is using the filtering VI's in LabVIEW.  A low-pass filter can help to eliminate any high frequency noise from your measurement.  Also, take a look at the Field Wiring and Noise Considerations article for some more information on eliminating noise.  Lastly, this community example shows how you could calculate the DC offset and compensate for it before measuring your signal.  Please let me know if you have any additional questions concerning this application.
    Regards,

  • Question on Measuring Lift Force for MAV Ornithopter for Student Project using Load Cell

    Hey everyone!
    I am new to these forums so bare with me, please. I am part of a senior design student group working on making a micro aerial vehicle ornithopter (generates lift by flapping its wings) similar to this Design.
    We are using this load cell connected to an AD620 Op-Amp circuit that basically has two input wires from the load cell coming into the op-amp with a gain of 100 (there is an Rg resistor with 500 ohms in the circuit). The load cell and op-amp circuit are both powered correctly with 10 V and +-15 V, respectively. There are two output wires coming out of the circuit. One comes out of the 6th terminal of the op-amp, and one is connected to ground. If we turn on everything and test the output of the circuit with a multimeter there is little if no fluctuation in the output voltage, which is about .25 V with zero load. If we add precise weights and form a linear graph of the output voltage vs. weight, we can find that there is about .0045 volts/gram relationship.
    Here comes the part we we are having trouble. It seems as though the circuit it working correctly, but when we try and hook it up to our USB-6221 DAQ Board though the ai0 (or any analog input) and confirm a LabVIEW program to read the output, we get a ton of noise along with a weird looking graph.
    Here is a picture of the front panel that shows the output we are getting http://img130.imageshack.us/i/frontpanelg.jpg/
    Basically, I would have though we could get a straight line that continuely increases or decreases depending on the load on the load cell. Why would it graph a ton of vertical lines? I would think it would be just one data point per time value?
    Here is the simpler block diagram just to test the output: http://img26.imageshack.us/i/blockdiagramsmall.jpg/
    Here is the main block diagram that we were going to use to convert to force, etc. but its not working (no need for while loop?): http://img15.imageshack.us/i/blockdiagrambig.jpg/
    The properties of the DAQ Assistant VI is as follows:
    input range: -10 to 10 v
    RSE terminal configuration
    acquisition mode: n samples and not sure how many samples we want to read or how fast. we had 1k hz and 100 samples and the image above is basically what we got it the program runs continuously. 
    I don't know what else I can tell you, except that if anyone helps me you would be like a godsend to our group. It would be very much appreciated
    Thanks!!!

    As I am unable to look at youor images (the corporate filter here is blocking the url) I can't see what you are describing. I will say that a multimeter will not show fast transitions that will show up in a LabVIEW/DAQ application, so using a meter usually doesn't tell you that much about signal "cleanness". How long are the wires from the op amp/load cell to the DAQ? How long are the wires, and what type (shielded, twisted pairs, untwisted pairs, etc.) from the load cell to the op amp. The output levels of the load cell are usually quite low, so the possibility of also picking up "environmental" electrical noise is very high, and this will be amplified as well. Since the output of the op amp is higher, the noise introduced between it and the input to the DAQ is less of an issue, but there as well. So making sure that signal wires are properly shielded and grounded is important, and there are long papers describing this for low level analog signals. Since the load cells desired output will probably vary relatively slowly (a few Hz) it may also be helpful to put a simple low pass filter before the DAQ.
    You should insert the images into your post, as jpg, or png (you have jpg images) Not bmp! (this is for others that might read your post, yours are jpg which should be ok). Generally most of us won't or can't go to links, corporate network filters and corporate policies frown on it, too much maleware lurking at the end of unknown URL's
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Data acquisition from a 250N Load cell

    Hi ,
    I am very new at using the Labview.I am using Labview 6i(PCI 6052E).The load cell(250N) is connected to a pump.The pump has 2 bags.One of them is filled with water and the other is empty.I want to load the bag which is empty from the bag filled with water using the pump.The load cell is connected to the bag which is filled with water.I am trying to aquire a volatge signal continously from a load cell and display it on a chart.
    My program has no errors and I am able to run the progam.But it is not aquiring any signal.Could u please help me out.Attached is my code for the same .
    -Manasa

    Hi Manasa,
    Make sure you are handling your errors in your code. You can do this by wiring your error clusters through your VI and then terminate them in a General Error Handler VI. If you are doing this, make sure that your device works in Measurement & Automation Explorer (MAX). Do this by opening a test panel and verifying that you can get a known voltage (like a battery) to read correctly. If you can successfully get a voltage in MAX, try running one of the example programs. You can find them at Help » Find Examples..., then browse to hardware input and output. If you can get an example program that is similar to what you are trying to do to work, try comparing your code to the example.
    Please post back if you have any questions. Have a great weekend!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Acquire 2 digital signal with custom scaling (Engg Units)

    I am a newbie to DIO world.
    I have write a VI to acquire 2 digital signals. one from a load cell and other for motor rpm (pulses). I need to acquire these two signals and then convert them into engg units using custom scaling and write them to a txt file with time stamp.
    Please suggest best ways to accomplish this task.
    Thanks
    DAQG
    Solved!
    Go to Solution.

    Look at the examples on DAQmx in the example finder.
    You wouldn't actually be acquiring 2 digital signals.  You would be acquiring an analog signal from the load cell.  A digital or counter acquisition is what you would acquire from the motor.  Search for analog measurements and counter measurements in the example finder.  Some of the example should show you how to apply the custom scaling.

  • How to generate PSK signal via IFRIO

    Hi, i want to ask is anybody know how to generated PSK signal via IFRIO.
    I already generate PSK signal and analyse it using modulation tool kits but how to configure IFRIO to make it send out this signal?
    PSK signal detail:
    BPSK with symbol rate 4000bps
    modulated by 16KHz carrier.
    Thanks.

    Hi
    precisely i have no idea what is the sampling rate of the signal. I just want to generate the signal with constant amplitude based on the actual sampled signal. is it possible to achieve?.
    Attached is my actual sampled signal.
    Attachments:
    data samples.doc ‏32 KB

  • Generate PSK signal without out of memory error

    Hi all,
    I want to generate a PSK modulated signal with message bits length much larger like over IM bits atleast. I have to first generate the message bits, diffrentially encode them and modulate them at the end. But when I give larger length of bits to the input of PSK modulation vi, it gives me an out of momory error.
    What I am doing to get rid of this out of memory error is... I generate 128k message bits using MT generate bits vi, Encode them and modulate them using MT PSK modulate vi and write the modulated signal data repeatedly in the binary file using binary file write vi that I placed within a for loop with loop count of 20 so that I writes modulated signal data for (20*128k= 2.56M encoded bits). But doing so introduces phase discontinuity.
    Can anyone suggest a better way of generating PSK signal with message bits atleast 1M and without the out of momory error?
    Any kind of help would be highly appretiated.
    Best regards

    Hello Sandee,
    The problem here is that when attempting to modulate a large number of bits in a single shot is that you are using the number of bits * samples per symbol * 24 bytes of memory just in creating the message and the modulated signal. In your case if you are using 16 samples per symbol this would require 384 MB of memory for a 1-shot operation of a 1M-bit message.
    Luckily this problem has been taken into consideration within the Modulation toolkit (MT). If you take the MT PSK Transmitter VI example that is installed with modulation toolkit you can make some small modifications to implement your desired functionality.
    By placing the code within a for loop and wiring the first call VI to the reset inputs of the MT VIs you can reset the VIs on the first iteration of the loop and be able to use the previous iteration states for further iterations. Also, to prevent losing samples due to filter delay you need to make sure to flush the buffers (an input to the MT Modulate PSK VI) on the last iteration.
    Let me know how this goes in your specific application.
    Regards,
    Dan King

Maybe you are looking for