CWDAQTools and return value
What does the integer return value of the Calibrate E series function mean? (0 pass 1 fail ?????)
Curt
Curt,
It returns an error code. If you set the ExceptionOnError property to true, then an exception is thrown.
0 means that there was no error. If it is a negative number, the number indicates an error code, if it is positive, then its a warning.
If you get an error, you can use the NI-DAQ error codes topic, to figure out what the error means, or search the Measurement studio help.
Hope this helps. Please let me know if you have more questions.
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team
Similar Messages
-
Display and return value in select list.
hi,
i want to display the value in select list coming from this quary .
select student_id from class_record where class_id =:p1_class_id and SECTION =:p1_section
minus
select student_id from STUDENT_TYPE_DETAILS where class_id =:p1_class_id and SECTION =:p1_section;
but i want f_name and last name with student_id .f_name and l_name store in table s_per_det.student is also in that table.
how can i define display value and return value in this quary using 3rd table s_per_det.
How can i do this.
Thanks
manojOoh, MINUS.... Can you not use a NOT EXISTS in this case, could have a big effect on the execution plan?
Something like this perhaps?
SELECT f_name||' '||l_name,
stundent_id
FROM class_record a,
s_per_det b
WHERE a.student_id = b.student_id
AND a.class_id = :P1_CLASS_ID
AND a.section = :P1_SECTION
AND NOT EXISTS(SELECT 'X'
FROM student_type_details c
WHERE a.student_id = c.student_id
AND c.class_id = :P1_CLASS_ID
AND c.section = :P1_SECTION)Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;) -
Urgent! Display lookup value and return value at the same time.
We are using pop up lov.
How can we display lookup value and return value at the same time. let me claer..
Our lov query is like fallowing
select dname, deptno from dept
we want to return deptno column into a database bind text item and dname column into a display item (look up)
can we do it (we need to do)
thanks for your help.We did it .
But pop up key lov (display description return value ) property doesn't appear for tabular forms item.
(Report Attributes pages Tabular Form Element section display As property list)
can we set or not.
Thank you. -
Exporting and returning value question
What is different between exporting and returning value in method of a class. if created an object inside the method and exporting it, it means I have a reference to that object inside program. If I use returning value, it means I have a copy of object created inside the method, but the object inside method is destroyed after it ends. Do I understand correctly? if so what do u prefer exporting or returning value? thanks!
Hello Anthony
The major difference is that you can have multiple EXPORTING parameters yet only a single RETURNING parameter. In addition, if you have a RETURNING parameter you cannot have EXPORTING parameters simultaneously.
Defining methods with a single RETURNING parameter is more Java-like than having multiple EXPORTING parameters.
Whenever possible and sensible I prefer RETURNING parameters over EXPORTING parameters because they allow to use the function method call, e.g.:
go_msglist = cf_reca_messagelist_create( ).
Regards
Uwe -
How to pass a function with the same argument multiple times and return values in variables?
The problem I have is I created a function which really is some kind of database. Basically a bunch of:
if (a.value == "this number"){
b.value = "this expression";
Inside the form are 2 dropdown lists that return numerical values which I want to process through that function and put the return value inside separate variables.
var a = this.getField("OPE003.EVEN.1.MIP");
Mip(a);
var result1 = Mip();
I tried to overwriting *a* to process the second field
a = this.getField("OPE003.EVEN.2.MIP");
Mip(a);
var result2 = Mip();
result1 and result2 are put in an array, joined as a string.
Doing so, I always get the last processing twice as the final result.
Can I use a function as a batch processing tool that way?You are right, I changed the code to what you said but how do I pass another value through my fonction so I can get Result1 and Result2?
is it
var a = this.getField("OPE003.EVEN.1.MIP");
var b = this.getField("OPE003.EVEN.2.MIP");
var result1 = Mip(a);
var result2 = Mip(b);
var c = new Array[result1, result2] -
How to know that a method has been called and returning value of a method
Hi, everyone! I have two questions. One is about making judgment about whether a method has been called or not; another one is about how to return "String value+newline character+String value" with a return statement.
Here are the two original problems that I tried to solve.
Write a class definition of a class named 'Value' with the following:
a boolean instance variable named 'modified', initialized to false
an integer instance variable named 'val'
a constructor accepting a single paramter whose value is assigned to the instance variable 'val'
a method 'getVal' that returns the current value of the instance variable 'val'
a method 'setVal' that accepts a single parameter, assigns its value to 'val', and sets the 'modified' instance variable to true, and
a boolean method, 'wasModified' that returns true if setVal was ever called.
And I wrote my code this way:
public class Value
boolean modified=false;
int val;
public Value(int x)
{val=x;}
public int getVal()
{return val;}
public void setVal(int y)
val = y;
modified = true;
public boolean wasModified()
if(val==y&&modified==true)
return true;
}I tried to let the "wasModified" method know that the "setVal" has been called by writing:
if(val==y&&modified==true)
or
if(x.setVal(y))
I supposed that only when the "setVal" is called, the "modified" variable will be true(it's false by default) and val=y, don't either of this two conditions can prove that the method "setVal" has been called?
I also have some questions about the feedback I got
class Value is public, should be declared in a file named Value.java
public class Value
cannot find symbol
symbol : variable y
location: class Value
if(val==y&&modified==true)
*^*
*2 errors*
I gave the class a name Value, doesn't that mean the class has been declared in a file named Value.java*?
I have declared the variable y, why the compiler cann't find it? is it because y has been out of scale?
The other problem is:
Write a class named Book containing:
Two instance variables named title and author of type String.
A constructor that accepts two String parameters. The value of the first is used to initialize the value of title and the value of the second is used to initialize author .
A method named toString that accepts no parameters. toString returns a String consisting of the value of title , followed by a newline character, followed by the value of author .
And this is my response:
public class Book
String title;
String author;
public Book(String x, String y)
{ title=x; author=y; }
public String toString()
{return title;
return author;
}I want to know that is it ok to have two return statements in a single method? Because when I add the return author; to the method toString, the compiler returns a complain which says it's an unreachable statement.
Thank you very much!Lets take this slow and easy. First of all, you need to learn how to format your code for readability. Read and take to heart
{color:0000ff}http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html{color}
Now as to your first exercise, most of it is OK but not this: public boolean wasModified()
if (val == y && modified == true)
return true;
y being a parmeter to the setValue method exists only within the scope of that method. And why would you want to test that anyways? If modified evaluates to true, that's all you need to know that the value has been modified. So you could have public boolean wasModified()
if (modified == true)
return true;
}But even that is unnecessarily verbose, as the if condition evaluates to true, and the same is returned. So in the final analysis, all you need is public boolean wasModified()
return modified;
}And a public class has to be declared in a file named for the class, yes.
As for your second assignment, NO you cannot "return" two variables fom a method. return means just that: when the return statement is encountered, control returns to the calling routine. That's why the compiler is complaining that the statement following the (first) return statement is unreachable.
Do you know how to string Strings together? (it's called concatenation.) And how to represent a newline in a String literal?
db -
I have a simple SELECT statement in a Stored Proc that
queries 2 tables in
SQL Server 2000 using a join. My problem is I want to return
values based on
the outcome of the query eg. if a row is returned then return
1, or return 2
if no rows are found. I have tried various ways to implement
this and they
always work fine in Query Analyser but in Dreamweaver MX2004
either return
no return values ( or at least they are not displayed on my
page ) or the
return values are inconsistent. I am using a DW Command.
I know this is DW and not my code as Query Analyser produces
the correct
values every time. Can anyone tell me what code I can use
that is DW
friendly please.
Thanks.I read your note with a great degree of sympathy but no
solutions. I was having the same trouble with access tables after 4
years of trouble free connections. It may not be relevant but the
solutions for my problem was a Server software SP release. Details
are:
Following the avalanche of hints and tips I am pleased to
report that there is a problem with Dreamweaver MX and MX2004 when
connecting to Access databases running on Windows Server 2003 SP1.
Whilst it is covered in the knowledge base I note that others in
the forum are having similar difficulties with Sequel connections
and unable to retrieve failures.
There is a "fix" - SP2DBFix1.0.2.mxp - for my problem and I
cannot be alone in experiencing this.
And just in case anyone from Adobe is reading this, you
should have written to all your registered and paid up members
informing us of this problem when WS2003 SP1 was released!
Hope this helps. -
Procedure which inserted and returns value
i don't know english very vell and sorry about it :(((
i want write a procedure which inserted or updated table and returns it's ID ...
it's my tabel :
DROP TABLE T_STUDENT CASCADE CONSTRAINTS;
CREATE TABLE T_STUDENT
ID NUMBER(10) NOT NULL,
NAME VARCHAR2(100) NOT NULL,
SURNAME VARCHAR2(100) NOT NULL,
AGE NUMBER(38) NOT NULL,
CNAUTHORID NUMBER(10) NULL
and i have procedure which inserted or updated this table and return's ID (if ID<=0 then inserted else updated):
CREATE OR REPLACE procedure sp_InsertUpdate_T_STUDENT
nResID in out NUMBER,
nID in NUMBER,
vchNAME in VARCHAR2,
vchSURNAME in VARCHAR2,
nAGE in NUMBER,
nCNAUTHORID in NUMBER
as
begin
if nID<=0 then
insert into T_STUDENT (NAME,SURNAME,AGE,CNAUTHORID) values (vchNAME,vchSURNAME,nAGE,nCNAUTHORID );
else
update T_STUDENT set NAME=vchNAME,SURNAME=vchSURNAME,AGE=nAGE,CNAUTHORID=nCNAUTHORID
where ID=nID;
end if;
select ID into nResID from T_STUDENT where NAME=vchNAME and
SURNAME=vchSURNAME and AGE=nAGE and CNAUTHORID=nCNAUTHORID;
end;
this procedure is correct but maybe returns more then one ID and i don't want it :( ....... how i can write this procedure otherwise ???First of all does yout insert statement work??
insert into T_STUDENT (NAME,SURNAME,AGE,CNAUTHORID) values (vchNAME,vchSURNAME,nAGE,nCNAUTHORID )
Should you not insert also the value ID?
The way i would do this was first since u have only have one return value is a function like this:
function sp_InsertUpdate_T_STUDENT
nID in NUMBER,
vchNAME in VARCHAR2,
vchSURNAME in VARCHAR2,
nAGE in NUMBER,
nCNAUTHORID in NUMBER
) return number
is
ln_id number;
begin
if nID<=0 then
insert into T_STUDENT (ID,NAME,SURNAME,AGE,CNAUTHORID) values (SEQ_ID.NEXTVALUE,vchNAME,vchSURNAME,nAGE,nCNAUTHORID ) returning ID into ln_id;
else
update T_STUDENT set NAME=vchNAME,SURNAME=vchSURNAME,AGE=nAGE,CNAUTHORID=nCNAUTHORID
where ID=nID;
ln_id := nID;
end if;
return ln_id;
end; -
Multithreading and Returning Value from RMI
Hi all,
I have an RMI Object which is Multi Threaded. The scenario is like this:
The client program will pass different program specific codes to the RMI object. Multiple clients can pass same or different codes. If the codes are different they can share common data in an asynchronous way other wise they need to be synchronized.
This RMI object will do some database transactions and will return a value to the client. I am not sure how to return a value to the client which has invoked this method as this method executes asynchronously.
I am sorry if this posting is inappropriate for this forum.
Thanks in Advance
SrinivasIf the database transaction executes asyncrhonously, the remote method has to wait for it and return the result via the return statement.
As the remote request is already executing in a thread of its own there is of course no need for the database transaction to execute asynchronously from RMI's point of view so if you can get rid of that complication in your architecture you may as well do it. OTOH your application architecture may do it for other reasons -
Sorting and return values from parralell arrays
import java.io.*;
import java.util.*;
class Check{
String words;
String signature;
Check(String w, String s){
words = w;
signature = s;
class Test{
static String[]a = new String[100];
static String[]b = new String[100];
public static void main(String[] args)throws IOException{
Scanner in = new Scanner(new FileReader("input.txt"));
//Check []ch = new Check[100];
String str = in.next();
int z = 0;
while(!(str.equals("$$$$"))){
a[z] = str;
b[z] = getNumberSequenceFromString(str);
z++;
str = in.next();
insertionSort(a,0,z);
insertionSort(b,0,z);
// for(int i = 0; i < z; i++){
/// System.out.println(a);
for (int i = 0; i < z ; i++){
System.out.println(a[i]+" "+b[i]);
String key = "225533";//should give the word "move", istead it is giving me "TEXT" which is incorrect
int rope = binarySearch(key,b,0,z-1);
System.out.println("rrrrrrrrrrrrrrropr "+ rope);
System.out.println("i found him :"+a[rope/2]);
}//end main
public static String getNumberSequenceFromString(String word){
int l = word.length();
String str = " ";
word = word = word.toLowerCase();
for(int i = 0; i < l; i++){
char y = word.charAt(i);
if(y < 100){
str +=2;
}else if(y < 103){
str +=3;
}else if( y < 106){
str +=4;
}else if( y < 109){
str += 5;
}else if(y < 112){
str += 6;
}else if(y < 116){
str += 7;
}else if (y < 119){
str += 8;
}else{
str +=9;
}//end for
return str;
}//end getWord();
public static void insertionSort(String[]list,int lo, int n){
for(int j = lo+1; j < n; j++){
String key = list[j];
int k = j-1;
while(k >= lo && key.compareToIgnoreCase(list[k]) < 0){
list[k + 1] = list[k];
--k;
}//end while
list[k+1] = key;
}//end for
}//end insertion sort
public static int binarySearch(String key, String[]b, int lo, int hi){
while(lo <= hi-1){
int mid = (lo + hi)/2;
System.out.println("i am mmmmmmmmmmmmmid" + mid);
int cmp = key.compareToIgnoreCase(b[mid]);
if (cmp==0)return mid;
if (cmp < 0)hi = mid -1;
else lo = mid + 1;
}//end while
return lo;
}//end binarysearch
}//end classAbove is my revise code. Your idea worked fine, thank you. I have a problem though. I tried to create a class eg:
class Check{
String words;//for words
String signature; //for numbers
Check (String w, String s){
words = w;
signature = s;
The idea was to store the word and its signature as an object, after which I would sort. Howerver, when I tried reading in the values eg: check[]=str, number, it did not work. I tried 2 separate arrays, but now I cannot return the correct word. I need some help on this one.
Questions:
How could I combine both arrays so that I could sort them, then search a value in the array and return the correct string?
I tried a class but i could not get it to work.I'm not going to try to read all that messy code. Here is some advice.
1. Don't use parallel arrays.
2. If you're going to insist on doing it the wrong way and using parallel arrays, then first get your sort working for a single array.
3. If you're going to insist on doing it the wrong way and using parallel arrays, then after getting the sort to work with a single array, in the part where you're swapping elements, whatever you do to swap in the first array, you'll need to do to the second array as well.
4. Break your code down into methods. -
Help : Complex parameter and return value in WebService?
Hi guys
These days, I publish a WebService, in it there is an
operation like this:
List search(List para);
in this operation, parameter "para" is a java.util.List, which contains many elements, every element is an instance of customizing class "MyItem", I made "MyItem" implements java.io.Serializable interface. Strangely, when I call this operations in my java client,
I found that I could not get out every element from para in server-side, but para.size() is showing it contains 10 elements in it. The same thing happen to the return value of this operation, in client, I got an instance of java.util.List class as the return value, when I try
System.out.println(result.get(0)); it output "null", but
result.size() is 10, I don't know how to explain this
Does anyone who encounter this issue too?
I guess it has something to with the Serializable issue ,but I have made every List item serializable, why it looks like this??Hi Kevin,
I answered you by mail some days ago, but just to complete the thread, I am posting the hint also here:
Custom types should be manually added to the Virtual Interface, so that they can be serialized.
Best regards,
Alexander -
I am creating a Vi. I want to do a sub function. I want to connect a switch to a toggle flip flop so need to use a push button switch in the input but at the same time take its output to a true/false loop and execute it according to the ourput of the toggle flip flop which will have an ON and OFF state.
JerilIn the front panel you can r-click the top right icon and "Show Connector". Click which controls and indicator you want to be your interface. Then drag it to your main application and it'll work as a sub-vi. You can do this for all VI's. Just like the "+" VI takes two numbers (controls) and return one result (indicator).
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
Hi ,
I use Oracle 10g and forms10g.
I have written a db packaged function such as:
function fnc_ipologismos_xiliometron(code_poleis_apo_var in varchar2,code_poleis_pros_var in varchar2)
return number
is
apostasi_var ref_apostaseis_poleon.apostasi%type;
onomasia_pol_apo_var ref_poleis.onomasia%type;
onomasia_pol_pros_var ref_poleis.onomasia%type;
begin
begin
select onomasia into onomasia_pol_apo_var
from ref_poleis
where code_poleis=code_poleis_apo_var;
end;
begin
select onomasia into onomasia_pol_pros_var
from ref_poleis
where code_poleis=code_poleis_pros_var;
end;
begin
select apostasi into apostasi_var
from ref_apostaseis_poleon
where code_poleis_apo=code_poleis_apo_var and code_poleis_pros=code_poleis_pros_var;
exception
when no_data_found
then
apostasi_var:=0;
return apostasi_var;
raise_application_error(-20015,'a message');
--return apostasi_var;
end; return apostasi_var;
end;The problem is that when the exception written above (in bold) returns 0 and exits the function.... whereas i want this value to be returned as well as the message in the raise_application_error....
I call this function in WHEN-VALIDATE-ITEM of a block item... such as:
if pkg_mod3_general.fnc_ipologismos_xiliometron
(:mod3_entoli_metakinisis.code_poleis_apo_type_id,:mod3_entoli_metakinisis.code_poleis_type_id)=0
and :mod3_entoli_metakinisis.seq_code_meso_metakin_type_id=2
then
raise form_trigger_failure;
end if; When the above condition is true then no message is displayed and the cursor sticks to the item(as the raise_application_error in the db packaged function is after the exit of the function) and when the condition is false then no message is displayed again ... as expected.....
How is it get the desired result.....- get the message from the raise_application_error and the function returns 0.....?????
Many thanks,
Simonyou cannot RETURN and RAISE a function.
RETURN ends the function immediately
RAISE ends the program unit and jumps in the EXCEPTION-Handler, if it exists. Else the function ends -
How to locate a cell and return value of neighbour cell
Hi, I have a table containing data pairs in columns like [Title] [Value]. The table has multiple columns resulting in a table like this:
Title
Value
Title
Value
Title
Value
Apples
100
Bread
120
Pork
90
Melons
120
Pancake
150
Beef
160
Peaches
110
Pie
55
Fish
100
In a different table, I want to enter a title and get the value next to it returned. E.g. I enter "Pancake" in column A and get "150" in column B.
I tried using Lookup but it doesn't support multi-column searches so I would have to create IF-chains for the pairs of columns.
The best way I could think of is to locate the address of the title cell and use Offset. Does anyone know a solution for this?More on "you can have both..."
Here's an exmple that preserves your original table layout (in "Main"), uses it to generate an Auxiliary table ("Aux"), thenuses that table as a lookup table for VLOOKUP:
Formulas:
The complicated ones are in the Aux table:
A2: =IF(ROW()-1<=COUNTA(Main :: A),OFFSET(Main :: $A$1,ROW()-1,0),IF(ROW()-1<=(COUNTA(Main :: A,Main :: C)),OFFSET(Main :: $C$1,ROW()-(1+COUNTA(Main :: A)),0),IF(ROW()-1<=(COUNTA(Main :: A,Main :: C,Main :: E)),OFFSET(Main :: $E$1,ROW()-(1+COUNTA(Main :: A,Main :: C)),0),"over")))
Fill down to the end of column A.
Separated for clarity:
=IF(ROW()-1<=COUNTA(Main :: A),OFFSET(Main :: $A$1,ROW()-1,0),
IF(ROW()-1<=(COUNTA(Main :: A,Main :: C)),OFFSET(Main :: $C$1,ROW()-(1+COUNTA(Main :: A)),0),
IF(ROW()-1<=(COUNTA(Main :: A,Main :: C,Main :: E)),OFFSET(Main :: $E$1,ROW()-(1+COUNTA(Main :: A,Main :: C)),0),
"over")))
B2: =IF(ROW()-1<=COUNTA(Main :: A),OFFSET(Main :: $A$1,ROW()-1,1),IF(ROW()-1<=(COUNTA(Main :: A,Main :: C)),OFFSET(Main :: $C$1,ROW()-(1+COUNTA(Main :: A)),1),IF(ROW()-1<=(COUNTA(Main :: A,Main :: C,Main :: E)),OFFSET(Main :: $E$1,ROW()-(1+COUNTA(Main :: A,Main :: C)),1),"over")))
Fill down to the end of column B.
Note that this is the same formula as used in Column A, with only the three zeros in OFFSET changed to ones.
Summary table:
B2, and filled down to end of column B: =IFERROR(VLOOKUP(A,Aux :: A:B,2,0),"nf")
Regards,
Barry -
Popup LOV with same display and return values
Hi
I have created a List of Value using the following query.
SELECT partner_name display, partner_name return
FROM partner_table
WHERE partner_name is not null
order by 1
The above query returns around 3000 rows of data. This has been linked to Item as Popup Key LOV(Displays description, returns key value). When the popup is selected the values are not displayed, only "Row(s) 1 - 10" and pagination buttons are displayed.
Could anyone please suggest me with a solution.
Thanks in advance.Change the Next button label to remove the > character. This sounds like a familiar problem.
Scott
Maybe you are looking for
-
Remote App and AppleTV 1st gen.
I loaded myiPhone with the Remote app. I can control iTUnes from my iPhone and play it over my AppletV. However, Ic annot conrol AppleTV with the Remote app on myiPhone. I canot get to the remote control pad. I used to be abel to do this but not now
-
I don't have any idea where to change 'work offline'. Have never set it for that. just get me back to the previous version of Firefox. It started as soon as I downloaded vers 4, and restarted computer. No Firefox.
-
IDoc segment to capture the freight cost (XML/EDI invoice)
Folks, How to capture the freight cost on an EDI incoming invoice. Any idea which IDoc segment can be useful in this regard. Any thoughts/suggestions/comments would be deelply appreciated.
-
Integration of WEBI report in SAP Enterprise portal
Hi Colleagues, I want to create my adhco report using WEBI and want to publish it to SAP NW Enterprise portal . While creating the i view in the EP i dint find any option in i view template in order to create an i view for WEBI report . However there
-
How to install latest oracle application and database?
Hi all, Hope doing well, sir i am using sql database for my application now i want to use oracle database for my application that is visual studio 2008 .net application. but i don't know the steps of how to get set up file how to install etc. plz hel