PWM measuremen​ts using the 6071E
Hi,
I am trying to measure both frequency and duty cycle of a signal using one of the PCI 6071E counters. I am using the semiperiod measurements and I already got an array of values but cannot determine which of those is the hi values and which is the low. I read I can set the DAQmx_CI_SemiPeriod_StartingEdge property to DAQmx_Val_Rising, but is not working. I am getting the following message "DAQmx_CI_SemiPeriod_StartingEdge is not supported on your device". However, in the Register Programming Manual for the 6071E is clearly stated that is possible to select the polarity of the channel.
This is my code:
DAQmxErrChk (DAQmxCreateTask("", TaskHandlePtr));
DAQmxErrChk (DAQmxCreateCISemiPeriodChan(*TaskHandlePtr, Channel, "", MinVal, MaxVal, DAQmx_Val_Seconds, ""));
DAQmxErrChk (DAQmxCfgImplicitTiming(*TaskHandlePtr,DAQmx_Val_ContSamps,2));
DAQmxErrChk (DAQmxSetChanAttribute(*TaskHandlePtr,"",DAQmx_CI_SemiPeriod_StartingEdge,DAQmx_Val_Rising));
Any ideas ?
Hello Pacsoft,
Unfortunately, that Starting Edge property is not supported on E-Series devices on DAQmx. It is only supported on M Series and TIO based devices, hence the error message you were receiving. There is a Traditional NI-DAQ example program that should work for your device.
DAQ-STC: Count the Semi-Periods (HIGH Duration and LOW Duration, Separately) of Each Pulse in a Digi...
I hope this helps,
Travis G.
Applications Engineering
National Instruments
www.ni.com/support
Similar Messages
-
I am contemplating using a PCI 6071E with SCXI. We have the boards (6071E), we would need the cable (I suppose SH1006868) and the SCXI system. I would like to know how would you access the counter and digital line capabilities of the board. I will be using a SCXI-1314 with a SCXI-1520 Module for strain measurements but will need to use the counter and digital lines of the board as well. Can this be done? If so, how and/or what else do I need?
I think this KnowledgeBase will answer the question for you.
Accessing DAQ Board Counter Pins with an SCXI System
Otis
Training and Certification
Product Support Engineer
National Instruments -
Why does the PC lockup when using a 6071E with an ASUS P5ND2-SLI motherboard?
Please Help,
Thanks,
Brian
Problem Summary:
PC locks up to a point that will not allow keyboard control. Sometimes the system reboots itself. This code works on Win2000 systems and XP systems with a different motherboard. I have the Hyperthreading disabled. I have also tried switching PCI slots to use different IRQ’s.
Code: Code crashes right after last line function: GPCTR_Control(). No errors reported.
//Board Model = "NIDAQ PCI-6071E", device code: 223
short sSampleTimeBase = 1;
unsigned short usSampleInterval = 2; //ActualSampleInterval = (1microsec) * 2 = 2.0 micro sec
short sMode = 1;
short sPolarity = 0;
double dScanRate = 10; // 10Hz
short psBuffer[20];//double buffering at 10Hz
unsigned long ulBufferSize = 20;
int iChannelCount = 1;
short sChanList[1] = {1};//chan nums start at 1, NOT 0
short sGainList[1] = {1};//set gain to 1
Init_DA_Brds( m_sDeviceNumber, &sDeviceCode) ;
AI_Configure( m_sDeviceNumber, sChanList[0], sMode, 0, sPolarity, 0 ) ;//add ONE channel
Select_Signal(m_sDeviceNumber, ND_IN_SCAN_START, ND_RTSI_0, ND_LOW_TO_HIGH);
Select_Signal (m_sDeviceNumber,ND_RTSI_0, ND_GPCTR0_OUTPUT,ND_DONT_CARE))//the first card is master card
DAQ_Rate(dScanRate, 0, &sScanTimeBase, &usScanInterval);
DAQ_DB_Config( m_sDeviceNumber, 1); //"1" enable double buffering
SCAN_Setup( m_sDeviceNumber, (short)iChannelCount, sChanList, sGainList );
SCAN_Start( m_sDeviceNumber, psBuffer, ulBufferSize, sSampleTimeBase, usSampleInterval, sScanTimeBase, usScanInterval );
GPCTR_Control(m_sDeviceNumber,ND_COUNTER_0,ND_RESET);
GPCTR_Set_Application(m_sDeviceNumber,ND_COUNTER_0, ND_PULSE_TRAIN_GNR); //Begin Counter Pulse Train
GPCTR_Change_Parameter(m_sDeviceNumber, ND_COUNTER_0, ND_SOURCE, ND_INTERNAL_100_KHZ); //set internal counter
GPCTR_Change_Parameter(m_sDeviceNumber, ND_COUNTER_0, ND_COUNT_1, 100000/(unsigned long)dScanRate/2);//set pulsewidth 1, 100kHz/ScanRate/2
GPCTR_Change_Parameter(m_sDeviceNumber,ND_COUNTER_0, ND_COUNT_2, 100000/(unsigned long)dScanRate/2);
GPCTR_Control(m_sDeviceNumber,ND_COUNTER_0,ND_PROGRAM)) //program the ATMIO card
System Info:
Operating System(OS): Microsoft Windows XP
OS Version: 5.01.2600
OS Info: Service Pack 2
Processor: Intel(R) Pentium(R) 4 CPU 3.40GHz / x86 Family 15 Model 4 Stepping 1 / GenuineIntel / 3400 MHz
Number of Processors: 1
Physical Memory: 1,048,044 KB RAM
Drive C:\ 238,293,104 of 244,187,968 KB free
Motherboard: Asus P5ND2-SLI
Chipset:
nVIDIA nForce4 SLI - Intel Edition ( Crush 19 )
nVIDIA MCP-04Brian,
This problem is a little hard to pinpoint. When you
say this code works on a Windows 2000 and Windows XP machine do you run it with
the exact same card, or with another DAQ card? From the code you provided
it looks like you are using the device to generate a pulse train. Are you
able to run any other code that generates a pulse train? You might try
the code located here:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DFFB56A4E034080020E74861&p_node=201235
Are you able to perform other types of operations with this device, perhaps
analog input? If you only use Measurement and Automation Explorer (MAX)
to create a pulse train, does your computer freeze? You can test the analog
input and pulse train generation through MAX by expanding Devices and
Interfaces >> Traditional NI-DAQ and selecting your device. Next
select Test Panels and either Analog Input or Counter I/O. What version
of Traditional DAQ are you running? If it is an older version, does upgrading
your driver help?
Finally, if you still have DAQmx installed (or if you can install it) can you
generate a pulse train in test panels?
Regards,
Jesse O
Application Engineering
National Instruments
Jesse O. | National Instruments R&D -
Hi everyone,
I would like to synchronize a NI 4474 A/D card with a NI 6733 D/A card via the RTSI bus. Is there any way of sharing the timebase using the measurement studio for VB 6.0? It seems like it could be possible using the traditional NI-DAQ .DLL but I would prefer to do it with the ActiveX API.
I am quite desperate, since all my attempts to use the CWDAQTools1.RouteSignal and CWDAQTools1.RouteRTSI command failed miserably :-(
Thank you very much in advance!
FedericoThank you very much indeed!
Unfortunately it doesn't really work... I cannot use the DI options since my A/D card (NI 4474) does not support DI/DO... When using the other option (CWDAQTools1.RouteRTSI) I keep getting an error message that this command is inapropriate for my device (even though it does have a RTSI bus and allegedly it also supports time sharing...)
Looking forward to your answer!
Kind regards
Federico -
I have a PXI- 5152 digitizer and need to use the soft front panel to take a differential measurement. I found how to do this by programmatically, but cannot figure out how to do this on the soft front panel. Can anyone help?
Hi Towleb1,
From you second sentence in your question I assume you already found this resource, but just in case I wanted to provide you with a white paper called Differential Measurements Using High-Speed Digitizers. This is a fantastic resource that includes flowcharts and instructions for hardware self-calibration, probe compensation, gain and offset calibration, and actually taking the differential measurement itself.
As far as taking a differential measurement with the NI SCOPE Soft Front Panel, are you talking about taking a single differential measurement or are you talking about taking a differential measurement between two channels on the PXI-5152?
You mentioned that you found how to do this programmatically, but is there a reason you specifically want to use the NI SCOPE Soft Front Panel instead of LabVIEW?
Sam B.
Applications Engineer
National Instruments -
How to use PXI 6071E daq card to complete multichannels scan with high sampling speed
I used pxi 6071E daq card to acquire 115v 400hz AC signals.when I use mutichannel scan function,I find that the voltage of waveforms have much more error.The voltage error is about 0~15v.please you can tell me why this happened?how to solve it.
Attachments:
多通道监测4.vi 199 KBSunny;
As you are scanning multiple channels and the signal range is high, you can try to set the interchannel delay a little higher. The interchannel delay is the time which the multiplexer will take to switch to the next channel. If that time is to short, the instrumentation amplifier can have problems to settle, and then an error at the reading will happen.
You can change the Interchannel delay at the AI Config.vi.
Hope this helps.
Filipe -
Can I count the PWM pulses and note the timer value simulataneously.
Im using 6024E. I want to be used for 1-phase motor control. I could generate PWM pulses and read the feedback analog current, but I am unable to read the velocity of the motor. Counting PWM pulses(generated by sensor for each degree of rotation) and reading the digital timer value simultaneously to calculate velocity of the motor. If any body can give the solution it will be appreciated
Attachments:
motor_control_ver1.0.llb 210 KBHello;
In case you can read a digital pulse train that would give you the speed of the motor, you can use one of the counters of the DAQ board you have to accomplish that.
You can configure the counter as buffered event counter, hook up the digital pulse train to the counter gate, and since you have the frequence of the internal timebase that is connected to the counter input, you can calculate the speed of the motor by having the count values that are stored at the event of a gate input pulse.
Hope this helps.
Filipe A.
Applications Engineer
National Instruments -
PWM Update Rate using PXI 7334 & 6602 cards
I have a NI 8176 controller and a PXI 7334 (FlexMotion) Motion Controller Card. I am using the PWM output to control an actuator and I would like to update the duty-cycle as frequently as possible.
I have the card PWM frequency set to 32 kHz, but can only achieve 1.5 kHz update rate.
The attached VI shows the code I'm using to write to the card.
I also have a PXI 6602 card, I can achieve an update rate of 6.5 kHz with that, but I bought the 7334 card with the expectation of achieving a faster update rate.
Any advice on how to improve the update rate of either card would be appreciated. Likewise, does anyone know another hardware set-up that would be a viable alternative?
Many thanks,
Brian
Attachments:
pwm_generation_with_7334_card_-_tick_method_of_speed_measurement.vi 50 KB
PWM_Benchmark_V1.1.vi 112 KBHi Amaury, thanks for the fp2 file, I’ve just moved site, got my lab back yesterday. (please watch the numbers 7344 and 7334 in the text below!)
The FPGA2 firmware I had was Version 5.20.0001, MAX would not allow me to select the file 7344pwm.fp2, I got the message “This file is not valid for the Flexmotion board selected”.
However, I went to C:\Program Files\National Instruments\Motion\FlexMotion\bin and deleted 7344.fp2
I then renamed 7344pwm.fp2 to 7344.fp2 and copied it to the “bin” folder, then in MAX I selected new file to download, pointed to 7344.fp2 and successfully download the new firmware to my 7334 motion controller. Now in MAX the FPGA2 firmware version is 5.20.000f.
Unfortunately I c
an still only update the PWM duty-cycle on my 7334 at 3.6 kHz!
Is this correct? do I need to update the file 7334.fp2 instead? or does the file 7344pwm.fp2 also work for the 7334 card?
Also, is it possible to generate a PWM using the stepper motor output in open-loop mode? If so, do you have example code on how this is done?
Thanks again for your help,
Brian
Regards
Ray Farmer -
How to delete the members in one dimension use the maxl script
i have question that i want to delete the members in one dimension useing the maxl script, but i do not know how to do it. can the maxl delete the members in one dimension? if can, please provide an sample script, thank you so mcuh.
MaxL does not have commands to alter an outline directly, except the reset command which can delete all dimensions but not members selectively. The best you could do would be to run a rules file (import dimensions) using a file that contains the members you want to keepload rule for the dimension. As typical the warning is to test this first before you do it on a production database
-
How can multiple users use the same Creative Cloud Individual on one single-machine?
We have one shared graphics workstation, which is infrequently in use by different people - therefore we bought a single-workstation license (which we were referred to "Creative Cloud Individual"). In the FAQs it says it installs locally, but whenever a user different from the installing adminstrator logs in, he is forced to use the trial.
Is there a way to make the local installation usable on that single machine for multiple users?
Thanks in advance for your replySerenatasystems do the other users not have administrator access? What happens if they sign in using the Adobe ID tied to your Creative Cloud subscription? Do your Adobe Creative applications then exit trial mode?
-
What happens on iCloud when multiple family members use the same Apple ID? For example if we all choose to use iCloud for contacts, are they all merged together? We use the same Apple ID so we can use find my iPhone to keep track of the whole family.
Of course if you are both connected to the same iCloud account you have the same contacts - what did you expect?. The contacts live on the server and are read from there by the devices; so as you've both managed to sync your contacts up to iCloud they are now inextricably mixed. You can only delete your contacts by deleting individual ones, and doing that will delete them from your phone as well.
You can only unravel this by
1. In the iCloud contacts page at http://icloud.com, select all the contacts, click on the cogwheel icon at bottom left and choose 'Export vCard'.
2. Sign out of System Preferences>iCloud
3. Create a new Apple ID and open a new iCloud account with it for your own use.
4. Import the vCard back into the iCloud contacts page.
5. Go to http://icloud.com and sign in with the original ID. This is now his ID. Work through the contacts individually deleting the ones you don't want him to have. When done sign out and advise him to change his password.
6. Go to the new iCloud account and delete his contacts individually.
Of course if you have also been syncing calendars and using the same email address there are problems with doing this. -
Cannot send email from Verizon to a specific domain using the web UI
I'm trying to send an email to a specific address on a domain I own from a Verizon account using the web UI. Whenever I click send, a popup appears saying "Your e-mail contains the following invalid e-mail addresses:" followed by the email address. I can send email to this address from a GMail account as well as my work email.
In Chrome, I can see that a "code":1002 error is being produced.
Does anyone know why this would happen? Does Verizon check destination domains for reputation? Is there any way to debug this further?rhodeislandred wrote:
I'm trying to send an email to a specific address on a domain I own from a Verizon account using the web UI. Whenever I click send, a popup appears saying "Your e-mail contains the following invalid e-mail addresses:" followed by the email address. I can send email to this address from a GMail account as well as my work email.
In Chrome, I can see that a "code":1002 error is being produced.
Does anyone know why this would happen? Does Verizon check destination domains for reputation? Is there any way to debug this further?
What is the domain that is giving you the error? -
How do I use the Japanese fonts in Font Book in a Pages document?
How does one use the Japanese fonts in Font Book in a Pages document. Pages has its own fonts but I cannot get the Japanese fonts into it.
To type japanese on a computer you change the keyboard, not the font. Go to system prefs/keyboard/input sources and add Japanese/Kotoeri to the list, then select Hiragana in the "flag" menu at the top right of the screen, then type. The font will take care of itself.
http://redcocoon.org/cab/mysoft.html
If you have any further questions, just ask. -
How do I use the Web module to upload video to my website?
I'm using the Lightroom HTML gallery to upload my photos, fine and dandy, very happy with it. I also have some videos trimmed in Lightroom that I want incorporated into the gallery. This doesn't seem to be happening, instead I just get thumbnails. What/how do I incorporate my video clips into my web gallery? I moved over from jAlbum so I could have a simple one-tool workflow, so I'm really hoping that this is possible.
You can combine stills and video for output to h.264 (mp4 file) for example to upload to Youtube or Vimeo.
FTP upload will be subject to the limitations of your host. The web module within Lightroom creates all resources to link to the file index.html
The forthcoming LR6 is anticipated to have HTML5 galleries. -
How do I use the web cam on my pc? Hp w2007 I have windows vista
How do I use the web cam on my pc? Hp w2007 I have windows vista
Hp w2007 is a HP monitor without webcam ...
Where is the webcam?
V.
*** Say 'Thanks' with Kudos ***
Maybe you are looking for
-
I have just upgrade Itunes (10.6.3.25) and now I can not see my Ipad anymore. before the upgrade it was working fine. I already tried all suggestions from the support page, except re-installing Itunes. any suggestions?
-
Why cant i sign into imessage ?
im having trouble signing into imessage
-
Third party sales - Sales Accrual
Is there a way I can book a Sales Accrual in a third party sale scenario when I book a statistical GR? Thanks Raj
-
A message comes up saying that its not working properly and it closes.
-
How to create dataserver for axis2
Hi all, I installed ODI 10.1.3.5.0 and axis2 and apache tomcat 6.0.20. I want to create dataserver for axis2 then webservices for existing datastores. can u pls give me the step by step procedure. thnks in advance mani