Entered in text based NIDAQmx ao/StartTrigger PFI specification
I'm trying to convert some traditional NIDAQ code to NIDAQmx, and I'm having a problem with the output of continuous waveform with an ao/StartTrigger. I have a PCI 6251 running on Windows 7 multifunction data acquisition.
The relevant part of my code is as follows (this is Pascal, TriggerEdge is defined as DAQmx_Val_Edge1_Falling)
create a task
status: = DAQmxCreateTask('', @ExposeBeamTaskHandle);
If status = 0 then
Start
Set the output channels
AOChannels: = BoardIdentifier +'/ ao0:1';
Set up to +/-10 V.
status: = DAQmxCreateAOVoltageChan (ExposeBeamTaskHandle, PChar (AOChannels),
(- 10,0, 10.0, DAQmx_Val_VoltageUnits2_Volts, nil);
Configure the input to the output of startup, use the beginning of analog output trigger default trigger
status: = DAQmxCfgDigEdgeStartTrig (ExposeBeamTaskHandle, ' ao/StartTrigger', Trigger_Edge);
Set trigger entries so that PFI6 is the input ao/StartTrigger value
TerminalString: = "/" + BoardIdentifier + "/ ao/StartTrigger";
TriggerString: ='/ ' + BoardIdentifier + ' / PFI6';
Status: = DAQmxConnectTerms (PChar (TriggerString), PChar (TerminalString), DAQmx_Val_DoNotInvertPolarity);
Set the sampling frequency
status: = DAQmxCfgSampClkTiming (ExposeBeamTaskHandle,
Nile, / / use the internal timer
1000000/TimeStep, / / rate, in samples per second per channel
DAQmx_Val_Rising, //rising edge of thec clock
DAQmx_Val_AcquisitionType_FiniteSamps, //finite number of samples to acquire
Buf_Points); number of output per channel
status: = DAQmxWriteBinaryI16 (ExposeBeamTaskHandle,
Buf_Points, //1 point per channel
FAKE, //no autoupdate
0 //no timeout... return immediately after written
DAQmx_Val_GroupByScanNumber, //interleaved data
@Buffer [0], //Pointer to the table
@SampsWritten, number of samples actually wrote
Nile); reserved for future use
Status: = DAQmxStartTask (ExposeBeamTaskHandle);
StartingTime: = time;
While ((not done) and (time)
Start
status: = DAQmxIsTaskDone (ExposeBeamTaskHandle, @done);
Application.ProcessMessages;
end;
Status: = DAQmxStopTask (ExposeBeamTaskHandle);
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Relaxation is set independently by the wiring on the PFI6 PIN.
If I comment the DAQmxCfgDigEdgeStartTrig command, I get the desired result. However, the trigger does not work... (he did not work in OR-traditional DAQ). I get various errors on DAQmxWriteBinaryI16 (- 89131, - or 89134-89137), which translate the particular route is already in use, or if I use/Dev1/PFI6 in DAQmxCfgDigEdgeStartTrig as the source and destination cannot be the same.
I can't find examples in place NIDAQmx on how to configure a specific PFI as input for the ao/StartTrigger.
Any help would be appreciated.
Hi shiva,.
The question you probably arises because of the following line of code:
status:=DAQmxCfgDigEdgeStartTrig(ExposeBeamTaskHandle, 'ao/StartTrigger', Trigger_Edge);
The function, DAQmxCfgDigEdgeStartTrig, carries a Terminal to the trigger to start AO; You cannot route the trigger to start AO himself. Instead, you must specify PFI6 in this line:
status:=DAQmxCfgDigEdgeStartTrig(ExposeBeamTaskHandle, 'PFI6', Trigger_Edge);
DAQmx installs several examples in ANSI C on your machine. The following example on your machine should briefly present what you're trying to do:
With this configuration, you don't need the DAQmxConnectTerms function in your code. This should help you squared away.
Kind regards
Tags: NI Hardware
Similar Questions
-
Native SDK is suitable for text-based application?
I write an application based on the text for Playbook. I read the libraries and learning native SDK for the last days. Now I can't find an easy way to 'draw' texts on the screen of the playbook.
Please give me some pointers or suggestions.
If native SDK do not, let me know related libraries or knowledge that I need to look for.
If the native SDK is not appropriate, what development tool would you suggest me to use? HTML5 or something else? And why?
I'm new to this forum and new to playbook.
Thank you.
Native development kit is not really appropriate, unless you are ready to use the libraries of the add-on as the port of Qt, which is perhaps still a work in progress. The NDK for target now is mainly to games or other applications for which should be essentially generate UI whole 'manually '.
HTML5 can obviously manage text. So can air. I can't recommend one over the other, or any other environment for you, since "text-based application" is not really describe what you are trying to reach.
-
Unable to select or enter the text in the hidden form field
If I select 'Visible' to fields in the form that I created, I can enter text in them BUT they show as a gray light box.
If I select "Hidden" or "Hidden but printable" there is no box grey, but I can not put in value, select or enter the text in the fields once the PDF form is saved.
It of the same or not I have to save as 'Reader Extended PDF' or not.
I use Acrobat for Mac.
Thanks in advance.
It's highlighting of field assets.
-
Cascade LOV display text (based on LOV) report clasic
Hi Experts,
It is possible to use cascade LOV - item is displayed as text (based on LOV) in clasic report? (Display AS)
I would like to refer to another column displayed in the report in LOV.
Example:
#PRIM_STATUS # is the column I would like to reference.select description d, val_strg2 r from domain_cntr where cntr_name = 'CH_PRIM_ST_NOTE' and val_strg1 = #PRIM_STATUS# and active_idc = 'Y'
Is this possible? IN THE CLASSIC REPORT
concerning
J :DHello
>
Is this possible? IN THE CLASSIC REPORT
>
Yes.It can one thing long enough to encode, so be prepared for that.
Here's how:
a. use the APEX_ITEM API in your report query. Be sure to only specify the p_item_id parameter, using #ROWNUM #.
b. in the LoV wrtie Parent a trigger of onChange event which triggers a JavaScript function and pass it the ID of the item.
(c) in this JavaScript function makes a call to get AJAX < select >... < option... >... < / select >, in short the full HTML of the child LoV
d. push this HTML fragment in the child Lov. You build the ID of the target based on the ID of the parent. E.g. f01_0001 to f02_0001.
e. you can further keep the invisible or disabled child initially and then make it visible/enable after it is filled.Kind regards
-
How can I add Auto text based on the value in the numeric field?
Need help... I'm trying to add the auto text to a text based on a value in a numeric field. I want my text fields (summary box) to say 'Success' if (box score) value is equal to 10 and say "is not good" If the value is less than 10. My digital field is calculated by selecting drop-down lists.
Thanks in advance for your help.
Ed Watson
Here is a link to the document that I created...
https://files.Acrobat.com/?TrackingID=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb
Try this:
If (NumericField1.rawValue< 10)="">
TextField1.rawValue = "does not."
}
else {}
TextField1.rawValue = "passed."
}
-
Why Enter makes text go outside, in indesign?
Whenever I press 'Enter' or 'Shift + Enter', the text below is out of the text frame. The only way I can insert a new line of text is to use the menu "Type, insert a newline, paragraph break. It's very long and frustrating! It happens on new and old documents. It has not always done this, but at least for the last six months. Can someone help, please?
The Enter key is assigned to insert a column break not return a paragraph.
For a carriage return, you have to press the return key.
Some computers do not have a Num pad and then the Enter key is attributed to where is the Return key.
If you're going in Edition > keyboard shortcuts
Product area: Type Menu
Insert the column break - and delete the value Num Enter
Then go to insert paragraph return
and remap it to the Enter key.
-
Display as text based on LOV a form
A column of report can have Apex 4.0.2 display type "display text (based on LOV). I don't know this type of display in a form, only "view only". However, that displays the code (for example, empno), and no description (ename). I don't want to use the list select or Popup LOV, because my article should not be editable.
Is there something like "Display text (function LOV)" in a form?
I know that I can make a point of non-base of data and use a SQL statement as a source, but that I can not re - use the existing LOV.Is there something like "Display text (function LOV)" in a form?
Before APEX 4.0 there was a display text (based on LOV, does not save the State) form point type. In 4.0, the variety of the types of items has been simplified and customization options the smaller number of types of basic elements moved elsewhere.
Set the properties of the element as follows:
H4. Name
Display: display only
H4. Parameters
Save Session State: No.
Based on: the display value for list of values -
Try to have the current date dynamically concluded a textfield of extendable table row when the button is clicked to create each stretch line. The user can then enter additional text in the same text next to the date field.
Example:
[25/04/2012] This is the text entered by the user.
Current date is filled by each line Update created when you click the button "Update a line".
The following script works but only for the first instance, not the second, third, fourth, etc...
Click event: (JavaScript, client)
this.resolveNode('Table2._RowB').addInstance (1);
xfa.resolveNode ("Table2.RowB. #subform. Updated") .rawValue
Thank you
~ Gift
Hi Don,
This solution covers the above problem? https://Acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw
Niall
-
Return text based on a calculated score
I am a beginner with calculations of LiveCycle. I created a questionnaire that calculates a score based on the answers that a user chooses to drop downs.
Now I need to find a way to fill a field with a text based on the range of results. For example, the score calculated for the questionnaire is between 8 and 10, then I want to have a subtitled 'Risk Assessment' field, which should fill it with the text "High". If the calculated score added up to between 5 and 7, then "the risk assessment field must fill it with the text"Moderate". etc.
I have tried to understand this using if/then, but so far have had no luck. This is what I have so far - my two fields named "Score" and "risk".
If (Score.rawValue > =8) then (risk) == endif 'High'
Any help would be greatly appreciated.
Hello
One way would be to use the Choose function in the case to calculate if the risk on the ground, so something like;
// 1 2 3 4 5 6 7 8 9 10
Choose(Score, "Low", "Low", "Low", "Low", "Moderate", "Moderate", "Moderate", "High", "High", "High")
Concerning
Bruce
-
Limit the number of characters in a text based on the first digit field
Hello and thank you in advance for your help!
I want to limit the amount of characters in the text field based on the first digit of the number (the text field is limited to a number format... no decimals, no comma).
For example, if the number starts with a 3, I would limit the text field to allow only ten characters. I have three scenarios but if I could start with code and what is the best place to add (key combination or validation?) I can take it from there. Thanks again for your help!
I wrote this code for you that does this. Use it as a typo of the custom field code:
// Validate that only digits are entered if (event.change) { event.rc = /^\d+$/.test(event.change); } // Validate string length if it starts with 3 if (/^3/.test(AFMergeChange(event))) { event.rc = AFMergeChange(event).length <= 10; if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message }
You can duplicate the second part of it for additional terms, but keep in mind that this code won't let you even remove the first character in the field if the result is not valid.
For example, if you enter "234567890123456" then you can't remove the "2" at the beginning because that would result in a number not valid. You can delete all the other numbers, even if and when it is 10 digits or less, then you can remove the departure "2" as well.
-
Disable or enable a text based on the recorded person field.
I have a requirement in a form based on an Oracle table. If my manager opens the top form, he could enter a value in a text box. But if employees open the same form that they could see the text field but cannot change the value in the text (i.e., its registered status and disable) box.
Please suggest me what I do? Enjoy it!
Thank you
NSHow you are authenticating users? You can install plans permission to hide and show elements, or you can set read-only properties.
-
The PXI-4461 connections and text based programming
Hello
I looking for a guide-schedule based on text for the PCI card, / AO PXI-4461 24 bit. Currently, I am able to program it similar to the PXI-6259 but could not find a way to set it up as (differential, Pseudo-differentiel) in order to obtain the correct output impedance.
Is there a hardware (user) for PXI-4461 guide?
I use Visual c# to encode the PXI-4461. How can I determine the location of the classes and the specific methods for the PXI-4461.
Thank you.
Anand
-
change the field type selection list of text based on the data in the other domain.
Hello
We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.
Say, we have two fields
Day:
Products:
If day = 'Monday' produced a drop in low field of another product would be a free text field. Is this possible in APEX?
This is the configuration I did.
I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.
However, when I click on submit, it throws an error:
ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored
Kind regards
Satya
You can have both share the same database column, the process of the APEX DML does not know how to consolidate.
You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.
-
How to hide the field element of text based on true or false cases in the oracle apex
Hello
I have a set of text field in the oracle apex:
- Order number
- Revision number
When we open the report, the review must be hidden.
Only when the user enters the unique order number (order not duplicate numbers), revision number should be visible.
If he enters the number of duplicate order, the revision number should be hidden.
Help, please.
Hi 2932464,
2932464 wrote:
Hello
I have a set of text field in the oracle apex:
- Order number
- Revision number
When we open the report, the review must be hidden.
Only when the user enters the unique order number (order not duplicate numbers), revision number should be visible.
If he enters the number of duplicate order, the revision number should be hidden.
Help, please.
Give you an example of how to do to get there.
Step 1. Create three elements of the Page
(1) P1_ORDER_NO - text field
(2) P1_REVISION_NO - text field
(3) P1_ENABLE_DISABLE_REVNO - hidden, protected value - no.
2 create dynamic Actions 3
(1) disable the revision on the loading of the page number
Event - loading of the Page
Action - disable
Fires when the result of the event is - real
Selection type - point
Point - P1_REVISION_NO
(2) check the number of duplicate order
Event - change
Selection type - item (s)
Article (s) - P1_ORDER_NO
Condition - is not null
Action - to execute the PL/SQL Code
Generate in front of false action - not checked
Fires when the result of the event is - real
Fire on page load - disabled
Stop execution on error - checked
Wait for the result - verified
PL/SQL - code
declare l_count number; begin select count(*) into l_count from emp where empno = :P1_ORDER_NO; if l_count > 0 then :P1_ENABLE_DISABLE_REVNO := 1; else :P1_ENABLE_DISABLE_REVNO := 0; end if; end;
To present the page = P1_ORDER_NO
Page referred to return = P1_ENABLE_DISABLE_REVNO
(3) enable and disable the revision number
Event - change
Selection type - item (s)
Article (s) - P1_ENABLE_DISABLE_REVNO
condition - greater than or equal to
value - 1
Action - disable
Fire on Page Laod - disabled
Generate the opposite action of false - verified
Selection type = item (s)
Article (s) - P1_REVISION_NO
Hope this helps you,
Kind regards
Jitendra
DER_NO
-
Change a text based read-only to writable field on Drop Down selection
I have a drop down list named "Terms of payment", there are three selections "Net 30", "45" Net, and 'Other' if the user selects another there is a text box that is read only format named "OPTDescription" which should be changed to read only write. " In this text box, the user will describe other terms of payment.
I tried to reuse the code I received previously for radio buttons, but it doesn't seem to work. Here is my code:
CHANGE A FIELD TO ONLY WRITABLE BASED ON MENU DROP DOWN
var f = this.getField ("OPTDescription");
{if(Event.Target.Value=="Other")}
f.ReadOnly = false;
f.fillColor = color.white;
} else {}
f.ReadOnly = true;
f.fillColor = color.gray;
}Make sure you only check the option to validate the value of the field drop-down immediately (under its properties - Options), and then use the above code as its custom validation script. Just change event.target.value to event.value .
Maybe you are looking for
-
Further improvements are needed? If yes what they could be?
-
Too low current performance with USB-6501
For my measure I connected to an output port (output high voltage, 28 pins) with resistor of 10kOhm to ground (Pin 32). For the active reader to type out in car, I measured a 3.33V voltage and current of 0.33mA. I repeated the same measure with open-
-
LAbview 6.1 file incompatible with v8.6
I use NEITHER cDAQ-9172 data acquisition. We have a labview file that has been developed some years on Labview 6.1. I bought a new computer that has Labview 8.6 on him. Now, the old file refuses to launch Labview 8.6. He keeps asking other vi file
-
Download files from music to Photostory since 'my music '.
I did many photoreports seamlessly add music from my computer. He repeated all of a sudden, that I did not choose a "valid music file. I don't know what to do. Here are the songs from the CD that I downloaded on my computer, songs, I bought on Itu
-
How can I change the name of a song in the Media Player?
In Windows Media Player, I would like to change the names of the two pieces of music. How?