Python DAQmx triggers a reaction of output with an input signal
Hello world
I use a NOR-6251 Board with a python GUI.
I want to send data on the output channel on each falling edge of the input signal when I click on a start button.
The level of the output signal may be 5v/0/1 (0v).
The frequency of input signal squares is 2 MHz for 50 on it (see the attachment for more information).
I don't know if it is better to use the analog inputs or input meter for the input signal. I think I have to set a clock pulse at the frequency of 10 MHz.
I tried several solutions with bad results.
Does anyone have the answers to my problem?
Thanks in advance.
Thanks for your reply.
It works...
Tags: NI Hardware
Similar Questions
-
Don't boot to desktop-Boot computer ups always come with "no input signal" for monitor
Thanks for the research on this issue. So first of all, he could start after a few attempts in the end goes to the blue screen error at approx. 5 min. I started this path several times that in "safe mode with network" to try the many suggestions of repair for two days. " At this point, it's freezing just at "windows is loading files", but probably will go to blue screen error. Boot ups always come with "no input signal" for the monitor and signal switching in the Help menu for 5 min periods I've mentioned and then fails or "monitor going to sleep" occurs.
The error messages rec'vd: corrupted image, corrupted file and header file check sum does not match the sum of computer control. The recommendations of the screen blue: disable the BIOS memory, any material current or drivers and check disk space.
Some tent to fix: memory diagnostics and it showed 'no problem', checked monitor on another computer and it works, in a session of 5 min a download to 'fix' Microsoft via a USB problem like "search of windows crashes" but was 'unable to set', a few other attempts would show the "windows installer has stopped working" preventing any action.
At the present time, am unable to start even with advanced at F8 options. It's HP Pavilion 10/2007, with the help of HP. Its on a wireless network with a netbook, Blu - ray, occasionally a cell phone that works on windows live but none presents as a device.
Hello
· You did changes to the computer before the show?
· What is the exact error message that you receive?
Method 1: Remove the external devices except the keyboard and mouse and try to restart the computer in safe mode and check if you can start inside.
If you are able to boot into safe mode then try a restore of the system it and check if it helps solve the problem:
http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions
Method 2: I suggest you do a system recovery options system restore and see if it helps:
Method 3: If the system restore does not help then do a startup repair and check if this solves the problem.
http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions
-
I remove programs to free up space. now I don't have a connection!
Hi Steven,
You get the error message?
Method 1: Disable the security/firewall program software you run on the computer temporarily and then check if the problem persists.
How can I turn on or turn off the firewall in Windows XP Service Pack 2 or later versions?
http://support.Microsoft.com/kb/283673
If you use a third-party security software, you can check the documentation provided on the software to turn it off.
Important: Activate Windows Firewall\security software once everything is done.
Method 2: Follow the steps mentioned in the link below
How to troubleshoot missing network connections icons in Windows Server 2003 and Windows XP
http://support.Microsoft.com/kb/825826
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base.
How to back up and restore the registry in Windows -
Synchronization of analog and digital output with the external sample clock
Hello
First of all sorry for my English, I will try to explain what I want to do.
I want my PCIe-6321 to send two custom signals (modification sawtooths) on a mirror controller. I would also like to generate output with my card at the beginning of each tooth of saw. Everything must be synchronized with an external k-clock signal of 100 kHz. The idea is that whenever the PCI receives a trigger to external clock, it sends two analog output voltages and when he received 1024 clock ticks it will also send a pic of triggering TTL. What I do is first prepare the map and after that in a loop sending and modifing the output values of the two signals and at the same time send a digital signal Boolean in each arch, so when's done it 1024 iterations of the loop I send an event to the digital port. Attached you can see.
The problem is that I don't know how to synchronize both. Can I use the sample clock just to the analog output? I can use sample for the two outputs clock, or do I need to use the output of the meter? If don't know how to use it here.
If I do nothing else bad/wrong, I would be grateful for feedback.
Thanks in advance,
PabloI don't know how but I find the solution. I'm generating more than a positive value (as I was triggered maybe very fast the oscilloscope has been absent there). If I put the sample clock of digital output to use the sampling/ao/Dev1 clock that it doesn't, but if I put to use the same source as the OD (terminal where my external clock is connected), but the trigger to start the DO to be Dev1/ao/StartTrigger this works. I don't really know why, but it does.
Thank you for your patience and your help. I put here the final code.
-
Analog output with counter Falling Edge
Hi all
Here's the iamge which describes what wishes to accomplish. I would like to trigger that the AO output with the edge of the fall of the meter.
I have set the clock for my AO as the counter.
The analogue output should be raised whenever the Digital signal meter falls
SAMPLE_SIZE = 80
SAMPLING_RATE = 40 #Samples are written every 25 milliseconds
TIME = float ((SAMPLE_SIZE) / (SAMPLING_RATE))CREATE TASKS
CREATE CHANNELS OF AO
CONFIGURE THE TIMING CHANNELS
DAQmxCfgSampClkTiming (taskHandleAO, "PFI12", SAMPLING_RATE, DAQmx_Val_Falling, DAQmx_Val_FiniteSamps, SAMPLE_SIZE)CREATE TASKS
CREATE A CHAIN COUNTER
# Time high-low + time equals 25 milliseconds and is proportional to the frequency of sampling
DAQmxCreateCOPulseChanTime(taskHandleD,"DAQ/ctr0","",DAQmx_Val_Seconds,DAQmx_Val_Low,0.00,0.005,0.020)# The values of voltage DAQmx writing
DAQmxWriteAnalogF64(taskHandleAO,SAMPLE_SIZE,0,10.0,DAQmx_Val_GroupByChannel,Voltage,None,None)# DAQmx AO task start
DAQmxStartTask (taskHandleAO)# Counter DAQmx Start task
DAQmxStartTask (taskHandleD)#TIME is equal to the total time for the writing samples
DAQmxWaitUntilTaskDone (taskHandleD, 2 * TIMES)I get an error every time that I run the task:
DAQError: Over Acquisition or generation has been stopped until the required number of samples were acquired or generated.
function DAQmxStopTaskThat's because my AO task is stopped for some reason any.
Is there an obvious problem with the code. Can it be structured differently?
best regards,
Ravi
I do all my programming in LabVIEW, so I'm pretty limited to help with programming syntax text. That being said, here's what I * think * I see:
Your AO task issues a call to DAQmxCfgSampClkTiming, but is not your task of counter. This probably leaves you with a meter spot which creates only a single impulse, which causes only a single AO D/A conversion. In LabVIEW when I need a pulse train, I would call a similar function of the synchronization with the clock mode is defined as 'implied '.
Hope this helps you get started, I don't know enough to give you the specific syntax in the text.
-Kevin P
-
Digital output with NOR-9401 in cDAQ-9174
Hello
I have a cDAQ-9174 with an e/s digital NOR-9401 module. Now I want to output Digital signals on line0:3
$line0: Boolean 1 time = 10ms
Line1: Boolean variable 1 time = 20ms
row2: Boolean variable 1 time = 30ms
line 3:20 pulses (period = 250us, duty ratio = 0.5) after a time = 40ms
the value of line0:3 must be Boolean 0 after 45ms
Can someone let me know what I need to work to solve this please?
Thank you all for your help.
Concerning
Bing
Thank you Christian for your quick replay.
I have some experience in programming of microcontroller with C. I learned LABVIEW for about 1 month and followed a lot of demons in line and tutorials. I know that nodes DAQmx Data Acquisition screws and fundamental property.
As I said at the beginning on the $line0, lin1and line2, they serve to control the relay in my circuit. 10ms could be controlled with the OS clock. Pulse of line3 series is used for IGBT gate signals, which is the critical moment. I want to use the clock machine to accurately control line 3 and synchronize at the same time the pulse with analog inputs from an another two NI9206 modules in the same cDAQ chassis.
I just want to know more on the digital line demand signal relay output and a correlation between the line of analog input-synchronized finished pulse output. Waveform diagram is locked.
Thank you.
Bing
-
Hello
I have a table as below.
create the table members (member_id varchar2 (128), name varcahr2 (128))
Insert members (member_id, name)
Select '5591558906BA4A019FAB99EDAA26E62B', 'abc' from dual union all
Select '0F1E7A1B363111D3BDF20008C707ACC6', 'eur' from dual union all
Select '49C73ABC91404F8E825314FF6369E432', 'ure' from dual
I want an output with quotes
for example
If I have
Select member_id members
give me
5591558906BA4A019FAB99EDAA26E62B
0F1E7A1B363111D3BDF20008C707ACC6
49C73ABC91404F8E825314FF6369E432
instead I need output like this
'5591558906BA4A019FAB99EDAA26E62B '.
'0F1E7A1B363111D3BDF20008C707ACC6 '.
'49C73ABC91404F8E825314FF6369E432 '.
any help on this is much appreciated
Thank you>
I want an output with quotes
>
Then put quotes in your queryselect '''' || member_id || '''' from members
-
Impossible to compile the Python bindings for dbxml - 2.5.13 with python 2.4
Hello world
I am trying to build the Python bindings for dbxml - 2.5.13 with python 2.4.
Everything else has compiled just fine, but I get the following error for this:
construction running
running build_py
running build_ext
"_dbxml" extension of construction
GCC - pthread - fno-strict-aliasing - DNDEBUG - g-O3-wall - Wstrict-prototypes - fpic - i/usr/local/xmldb/include--i/usr/local/xmldb/include-I/usr/local/py2.4.4/include/python2.4 - c dbxml_python_wrap.cpp-o build/temp.linux-i686-2.4/dbxml_python_wrap.o
cc1plus: WARNING: command line option ' - Wstrict - prototypes "are valid for Ada/C/ObjC but not for C++
dbxml_python_wrap.cpp: "Sub makeXmlException(const DbXml::XmlException&)" function:
dbxml_python_wrap.cpp:3393: warning: deprecated the conversion of the string constant in "tank."
dbxml_python_wrap.cpp:3403: error: invalid conversion from ' const char * ' to ' tank. "
dbxml_python_wrap.cpp:3403: error: initialization argument 2 of ' pyobjet * PyObject_GetAttrString(PyObject*, char*)»
dbxml_python_wrap.cpp:3412: warning: deprecated the conversion of the string constant in "tank."
dbxml_python_wrap.cpp:3415: warning: deprecated the conversion of the string constant in "tank."
dbxml_python_wrap.cpp:3417: warning: deprecated the conversion of the string constant in "tank."
error: command 'gcc' failed with exit status 1
I saw a similar post for an older version, but the solution does not seem to adapt to this particular case. Any suggestions on getting it to compile?
Thank you
Good looking
Published by: beauSD on September 28, 2009 15:43Good looking
You should just be able to cast ename to (char *) ename in the offending call. I would like to know if it works. Some conditional code could probably be added to manage older Python releases if really necessary.
Kind regards
George -
How do I get the analog input signal and send it to output analog (real time)
Hello world
I do a simple task in Visual C++ and I use PCI-6221(37 pin).
Basically, I want to send the same signal of "analog input" to the "analog output".
at the same time (or almost), to make real-time application.
Can someone provide me with sample program please.
I would be grateful if you could provide me with the great tutorial that explains
step by step everything about NOR-DAQmx for C/C++ programming.
Best regards
Khassan
This is my code in C++, you can optimize it if that seems too messy. This code reads the analog input signals and exports it through the analog outputs.
To make this code additional work of the directories include and library directories must be added to OR.
I hope it helps someone.
#include
#include
#include "NIDAQmx.h".
#include#define DAQmxErrChk (functionCall) {if (DAQmxFailed (error = (functionCall))) {goto error ;}}
int main (int argc, char * argv [])
{
Int32 error = 0;
TaskHandle taskHandleRead = 0, taskHandleWrite = 0;
Read Int32 = 0;
float64 context [1000];
char errBuffRead [2048] = {'\0'};
char errBuffWrite [2048] = {'\0'};
bool32 done = 0;
Int32 wrote;DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,0));
DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleClock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));DAQmxErrChk (DAQmxStartTask (taskHandleRead));
DAQmxErrChk (DAQmxStartTask (taskHandleWrite));While (! fact &! _kbhit())
{
DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_GroupByScanNumber,dataRead,1000,&read,));
DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,DAQmx_Val_GroupByChannel,dataRead,&written,));
}
_getch();Error:
If (DAQmxFailed (error)){
DAQmxGetExtendedErrorInfo (errBuffRead, 2048);
DAQmxGetExtendedErrorInfo (errBuffWrite, 2048);
}
If (taskHandleRead! = 0){
DAQmxStopTask (taskHandleRead);
DAQmxClearTask (taskHandleRead);
}
If (taskHandleWrite! = 0){
DAQmxStopTask (taskHandleWrite);
DAQmxClearTask (taskHandleWrite);
}
If {(DAQmxFailed (error))
printf ("error DAQmx: %s\n",errBuffRead); ")
printf ("error DAQmx: %s\n",errBuffWrite); ")
}
printf ("end of the program, press the Enter key to quit\n");
GetChar ();
return 0;
} -
create 4 pulse digital output at the base of the ttl input signal
Hello
I am a beginner in Labview and would welcome advice on how to solve the following problem.
I'm setting up a train of pulses TTL and would like to send in Labview as input. Each falling edge detected on the input signal, I would like to as Labview to generate 4 pulse digital output. For each output pulse, I would like to be able to specify the period and duration. The image should illustrate more clearly, with the figures showing the expected scale.
System: NI PCI-6733 data acquisition card, Labview 8.5
My daq card has 2 timers 24-bit and 8 e / s digital, but I don't know what the best approach is to create between the pulse output of 4 to 8 of this precision... should it be handled at the hardware or software level? And how would I go about it
Thank you
-Sidney
Hi noli.
I found the problem, in fact PCI-6733 support only avoiding the digital output. The timing of software is limited to 1 kHz in case better.
I'm sorry, but this function is not possible with a PCI-6733.
Concerning
-
Problem with cursor Mixed Signal graphic LV 2013
I'm trying to create a function that puts the cursor at a specific point on the x axis. When I send the value, the cursor behaves normally. When I send the value (even when you use a constant) the cursor will keep oscillating between the previous position and entered the property node.
This will not occur when you use a XY Chart, only with a multi signal. Is this a bug or I'm doing something obviously wrong? Here is an excerpt of my comic.
-
Original title: internet says is connected with the strong signal, but stops working at random times?
Hello
For the last few weeks, I had problems with my internet connection. Wireless connections say I am connected and have the strength of the excellent signal. I know that this is not an ISP problem because my other computer works fine. I will be reviewed fine and then all of a sudden, the site doesn't load any more, although I'm always connected to the internet. This happens on Firefox and Internet Explorer, this isn't a browser issue.I read other offered on the internet and tried all, but nothing has changed. I have checked proxies, disabled antivirus and installed new, checked firewall, ran a check for malware, etc..
Any help will be much appreciated because it becomes very frustrating to have to keep reconnected my internet when he says he's working.
Hello
I suggest you follow the links below and check them with the question:
Method 1:
Step 1:
Start your computer in safe mode with network and check the number: http://windows.microsoft.com/en-US/windows7/Advanced-startup-options-including-safe-mode
Step 2:
You need perform a clean boot to prevent any third party conflicting application from interfering with your computer.
To put the computer in a clean boot State, you must follow the steps in the article mentioned below and check with the question.
How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7:
http://support.Microsoft.com/kb/929135Note: You must follow step 7 of the article mentioned above to recover your computer to a Normal startup after you complete all the steps.
Method 2:
Uninstall and reinstall the NIC drivers and check with the question.
a. click on Start menu, in the Search tab type devmgmt.msc and press ENTER.
b. right click on network adapters, and then click on uninstall and restart the computer.
c. after rebooting, install network cards and check with the question.
For reference:
How can I troubleshoot network card? :
http://Windows.Microsoft.com/en-us/Windows7/fix-network-adapter-problems
I hope this helps.
-
I use Windows Movie Maker on Windows 8 computer and when I put in a video and you try to look at it, it appears black with no audio signal. How can I fix it?
Hi Michael,
Thanks for posting your query on the Microsoft Community.
Because the problem is specific to a particular video file or all the files?
Follow the methods and check them off below if it helps:
Method 1: Reset the Windows movie maker for default settings and check.
To restore the default settings1. click on Toolsand then click Options.
2. click on the tab that you want to reset the settings and then click on the default settings.Method 2: I suggest you run the audio Troubleshooter and check if it helps:
Method 3: repair of Director and check
Follow the link as reference below:
https://support.Microsoft.com/en-us/mats/video_freezes_or_crashes
Hope this information is useful.
Thank you.
-
Materialized with dynamic input possible view?
Hello
We have some end users have a very complex query of SQL reports (~ 2500 lines) they came with. We are trying to tune and to create additional indexes as needed. He has made more than one aggregation of xml and the chain in select statements. in any case while I'm looking for other methods deal with the problem regardless of a potentially inefficient SQL query.
In my opinion, they said that the query taking ~ 6000 sec to finish and basically http sessions expire of their web application after 4000 seconds of inactivity. They have a few dynamic user input from the web page which is fed in the request for multiple WHERE clauses. So I think we want to have this query that is run in offline mode (after the user input is collected) as well as the results stored in a table, then the wep app can do a simple select query to retrieve data from the table of results later.
Is there a way to create a materialized view and replace user with some variables bind input and update the values of the variables bind with the participation of the user whenever they want the data, and then refresh the materialized view? Or if there is a better mechanism for Oracle to run asynchronously this query offline with dynamic input and then store the results in a table? My problem is that I don't know if they can call a sp and feed the bind values as parameters, but maybe I need to force them to. I really don't want to process SQL statements dynamic that their request is so great andt hey asked me on GTT, but I was under the impression that the data is lost after each session and probably wouldn't really solve anything. Thoughts?
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
Web pages should return something in<5s or="" the="" end-user="" will="" hit="" the="" refresh="" button="" again="" and="" again="" and="" again="" and="">5s>
Do something like this:
- store the query to run the sql in a table with the values for the variables bind (parent table)
- run the SQL in the background via DBMS_SCHEDULER
- store the results in a partitioned table. (child table) (I assume a large amount of data)
- for example, use a partition of range interval by sequence ID 1. of the parent
- update the parent with the status table "Hey, I'm made.
- Maybe the applicant send an email.
- Web page queries only the parent table.
- a scheduled task removes the no-more-required data through DROP PARTITION.
MK
-
I am relatively new to Captivate 7. I am doing a project which has a couple of slides with text input boxes (TEBs). They are not marked nor part of the graduate quiz. They are more like knowledge-check questions as we go through the course. How to make sure that they are filled before moving on to the next slide? Is it possible to go about this? The other thing is exactly how a submit button for this work? I did an overview of my project and the submit button doesn't seem to be something. Help, please.
Thank you
Ms. frustrated
Check out the Lilybiri blog. This is a response with a demo.
http://blog.lilybiri.com/where-is-null
Anthony
Maybe you are looking for
-
Hello I started my MacBook Pro this morning and launched Google Chrome. The first thing I always do is in presentation mode, because the continuous display of a Web site is so much more enjoyable. When I pressed the button, it did not work. And when
-
Vista - trying to install XP SP2
I have vista 32 bit and I can't download all service packs. My computer wants to download windows xp service pack 2. Anyone has any ideas. Thank you. Martin
-
Editing photos in my pictures.
I lost the toolbar in my pictures that allows me to reframe, balance, resize, correct (x degrees rotation). It has been replaced by a very limited set of options along the base of the page. How can I return the toolbar?
-
Can I upgrade my 32 GB W510 65GB
Hello Is it possible to upgrade my 64 GB SSD, I can drag SSD 64. Thank you...
-
DBlink to 12 c of Database 9i database
HelloI need to create the dblink to 12 c of Database 9i database.If anyone knows the solution, kindly share the steps.Thanks in advance.ConcerningVilli Kumar