Same function gathers different number of points in different calls?
I am running an automated test program, testing moving pistons. The test will extend the piston, and gather position data via some pots, and current data, while its moving. It will then retract the piston, and do the same data gathering. It then does some other tests.The data is written to some files, and is then retrieved for post-test processing later on.
I use the same function for extending and retracting, and I am noticing that the number of data points gathered during the extend is always much less than the number of points gathered during the retract.
This is the 3rd version of function I have used to gather data from the test apparatus, and this issue has stuck with all 3 versions . I have attached the function to this post. The top-level VI is large and contains many lower-level VIs, so I can't include the whole thing. I am using a USB 6008, LV8.5, Daqmx 8.5.
Any ideas why this would run differently each call?
Explanation of the function:
The gray box VI with 'NI' is a subvi that communicates with a controller for the tester. It sends the position to move the piston to. In the loop, the daq assistant grabs data from the 6008, and looks at pot values. If the values are close enough together, several times, it stops the loop and the data gathering (the piston has reached the end of its stroke). After the data gathering loop, the rest of the function is for writing data to a file.
NOTE that only the 'true' case inside the while loop matters here, as thats where the problem lies.
PS. sorry the front panel looks like crap, because this is a subvi so its front panel is never seen.
Solved!
Go to Solution.
Attachments:
move_actuator_rev3.vi 341 KB
I have been thinking along the lines of what Wayne said.
Can I initialise the Assistant by calling it outside the loop, but with a True constant on the 'stop' input, and then run the rest of the function as normal? Would I not get the error about 'resource is reserved ' or in use or whatever it is?
Stephen : I have tried troubleshooting by stepping through the execution, but I find it doesn't run accurately. Since the function stops recording when a succession of near-identical points are detected (when the piston stops), if I run it in 'highlight execution' mode it will get 5000 points each for retract and extend (assistant is set to 1k buffer size, 5 successive similar points stops the execution).
I will fool around with setting up the function before the loop, until someone gives more suggestions.
Similar Messages
-
Different number of rows for different columns in JTable
hi
I need to create a JTable with different number of rows for different columns...
Also the rowheight should be different in each column...
say there is a JTable with 2 columns... Col1 having 5 rows and column 2 having 2 rows...
The rowHeight in Col2 should be an integer multiple of Rowheight in Col1
how do I do this ??
can anybody send me some sample code ?????
thanx in advanceHow about nesting JTables with 1 row and many columns in a JTable with 1 column and many rows.
Or you could leave the extra columns null/blank.
You could use a GridBagLayout and put a panel in each group of cells and not use JTable at all.
It would help if you were more specific about how you wanted it to appear and behave. -
Hi,
I have few set of load test scenarios, I would like to add each of these test scenarios to "AutoPilot" and run each different scenario profile at different number of iterations.
As in Oracle Load Testing the "Set Up AutoPilot" tab I see a section like this "Iterations played by each user: ", which says run these many iterations for every virtual user of all profile added under "Submitted Profile Scenario". So is there any thing like that to set different iterations for every scenario profile added in Autopilot.
Thanks in advanceIt's not a built-in feature to override a page's styles on a tab-by-tab or site-by-site basis, but perhaps someone has created an add-on for this?
It also is possible to create style rules for particular sites and to apply them using either a userContent.css file or the Stylish extension. The Greasemonkey extension allows you to use JavaScript on a site-by-site basis, which provides further opportunity for customization. But these would take time and lots of testing to develop and perfect (and perfection might not be possible)...
Regarding size, does the zoom feature help solve that part? In case you aren't familiar with the keyboard and mouse shortcuts for quickly changing the zoom level on a page, this article might be useful: [[Font size and zoom - increase the size of web pages]]. -
Different number of parses with different providers
I tried to figure out
how could I control number of parsing from MS ADO app.
To my surprise it seems that there is no general way to do it.
The behaviour is heavily dependent on underlying OLEDB provider,
and for some of the providers (Oracle's own including)
I did not manage to reduce number of parses.
I wrote a simple vbs script that:
1. Opens the connection for the given provider
2. Executes ALTER SESSION SET session_cached_cursors=100
3. Creates ADO command with 'SELECT ... FROM USER_TABLES..'
and with one parameter
4. Opens ADO recordset with this command, reads from and closes it
Here is the script:
'TestADOCommandParsing.vbs
Dim stConnectString
Dim stUID
Dim stPWD
Dim stTestTag
Dim stServer
Dim cn
Dim cmdALTER_SESSION
Dim cmdUserTables
Dim rsUserTables
Dim param
Dim nRows
Dim I
Const c_stProvider = "Ora" '"MS" '"ODBC" '
Const adVarChar = 200
Const adParamInput = 1
Const adUseServer = 2
Const adOpenStatic = 3
Const adLockReadOnly = 1
stUID = "..."
stPWD = "..."
stServer = "..."
stTestTag = "TestParsesADO_" & c_stProvider & "_1"
If c_stProvider = "MS" Then
stConnectString = "Provider=MSDAORA;" & _
"User ID=" & stUID & ";Password=" & stPWD & ";Data Source=" & stServer & ";"
ElseIf c_stProvider = "Ora" Then
'Oracle provider.
'The PLSQLRSet attribute [=1] specifies whether OraOLEDB needs to parse the PL/SQL
'stored procedures to determine if a PL/SQL stored procedure returns a rowset:
stConnectString = "Provider=OraOLEDB.Oracle;PLSQLRSet=0;" & _
"User ID=" & stUID & ";Password=" & stPWD & ";Data Source=" & stServer & ";"
ElseIf c_stProvider = "ODBC" Then
stConnectString = "Provider=MSDASQL.1;Extended Properties=" & _
"""DRIVER={Microsoft ODBC for Oracle};" & _
"UID=" & stUID & ";PWD=" & stPWD & ";SERVER=" & stServer & ";"""
End If
wscript.echo "Provider = " & c_stProvider
wscript.echo "stConnectString = " & stConnectString
Set cn = CreateObject("ADODB.connection")
cn.Open stConnectString
Set cmdALTER_SESSION = CreateObject("ADODB.Command")
With cmdALTER_SESSION
.CommandType = 1 'adCmdText
.Prepared = False
.CommandText = _
"BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET session_cached_cursors=100'; END;"
Set .ActiveConnection = cn
End With
cmdALTER_SESSION.Execute
Set cmdALTER_SESSION = Nothing
Set cmdUserTables = CreateObject("ADODB.Command")
With cmdUserTables
Set .ActiveConnection = cn
.CommandType = 1 'adCmdText
'The Recordset parameters
'CursorLocation, CursorType, LockType
'seem to be irrelevant for reparsing of Oracle cursor.
'Oracle session_cached_cursors parameter also has no effect.
'Command.Prepared setting affects it, but only for ODBC-based provider:
'False: N parses, N executions
'True: 1 parse, N executions
.Prepared = True
.CommandText = _
"SELECT TABLE_NAME FROM USER_TABLES " & _
stTestTag & " " & _
"WHERE TABLE_NAME LIKE ? " & _
"ORDER BY TABLE_NAME"
Set param = .CreateParameter("TABLE_NAME_Pattern", adVarChar, adParamInput, 30, "%")
.Parameters.Append param
End With
Set rsUserTables = CreateObject("ADODB.Recordset")
For I = 1 To 10
cmdUserTables.Parameters("TABLE_NAME_Pattern").Value = "QU_%"
With rsUserTables
'The Recordset parameters:
'CursorLocation, CursorType, LockType
'seem to be irrelevant for reparsing of Oracle cursor:
'.CacheSize = 100 'Irrelevant
'.CursorLocation = adUseServer 'adUseClient 'Irrelevant
'.CursorType = adOpenStatic 'adOpenForwardOnly 'Irrelevant
'.LockType = adLockReadOnly 'Irrelevant
.Open cmdUserTables
While Not .EOF
nRows = nRows + 1
.MoveNext
Wend
wscript.echo CStr(I) & ". nRows = " & CStr(nRows)
.Close
End With
Next
Before running tests:
VARIABLE SQLTextPattern VARCHAR2(100);
COLUMN HASH_VALUE FORMAT 9999999999
COLUMN SQL_TEXT FORMAT A40
COLUMN "Invalids" FORMAT 9999999
COLUMN "Parses" FORMAT 9999999
COLUMN "Execs" FORMAT 9999999
COLUMN "Parses/Execs" FORMAT 9999.99
COLUMN CH# FORMAT 999
COLUMN ROWS# FORMAT 9999
I ran TestADOCommandParsing1.vbs script 3 times with
different providers and table aliases to distinguish
SQL from different tests:
host cscript.exe TestADOCommandParsing1.vbs
After each run I changed table alias var:
EXEC :SQLTextPattern:='%TestParsesADO_Ora_1%';
or
EXEC :SQLTextPattern:='%TestParsesADO_ODBC_1%';
or
EXEC :SQLTextPattern:='%TestParsesADO_MS_1%';
and queried V$SQL, V$SYSSTAT.
Before running the tests:
SYSTEM@ADAS> SELECT NAME, VALUE
2 FROM V$SYSSTAT
3 WHERE NAME = 'session cursor cache hits'
4 ;
NAME VALUE
session cursor cache hits 91051
Test with Oracle OLEDB provider:
SELECT
SUBSTR(SQL_TEXT,1,200) SQL_TEXT
,PARSE_CALLS PARSES
,EXECUTIONS EXECS
,CHILD_NUMBER CH#
,FIRST_LOAD_TIME
,ROWS_PROCESSED ROWS#
FROM V$SQL
WHERE SQL_TEXT NOT LIKE '%SQL_TEXT%'
AND SQL_TEXT NOT LIKE '%SQLTextPattern%'
AND SQL_TEXT LIKE :SQLTextPattern
ORDER BY CH#
SQL_TEXT PARSES EXECS CH# ROWS#
SELECT TABLE_NAME FROM USER_TABLES TestP 21 0 0 0
arsesADO_Ora_1 WHERE TABLE_NAME LIKE :1
ORDER BY TABLE_NAME
SELECT TABLE_NAME FROM USER_TABLES TestP 0 10 1 230
arsesADO_Ora_1 WHERE TABLE_NAME LIKE :1
ORDER BY TABLE_NAME
SELECT NAME, VALUE FROM V$SYSSTAT...
NAME VALUE
session cursor cache hits 91062
Test with ODBC OLEDB provider:
SELECT ... FROM V$SQL ...
SQL_TEXT PARSES EXECS CH# ROWS#
SELECT TABLE_NAME FROM USER_TABLES TestP 1 0 0 0
arsesADO_ODBC_1 WHERE TABLE_NAME LIKE :V
001 ORDER BY TABLE_NAME
SELECT TABLE_NAME FROM USER_TABLES TestP 0 10 1 230
arsesADO_ODBC_1 WHERE TABLE_NAME LIKE :V
001 ORDER BY TABLE_NAME
SELECT NAME, VALUE FROM V$SYSSTAT...
NAME VALUE
session cursor cache hits 91062
Test MS OLEDB provider for Oracle:
SELECT ... FROM V$SQL ...
SQL_TEXT PARSES EXECS CH# ROWS#
SELECT TABLE_NAME FROM USER_TABLES TestP 11 0 0 0
arsesADO_MS_1 WHERE TABLE_NAME LIKE :V00
001 ORDER BY TABLE_NAME
SELECT TABLE_NAME FROM USER_TABLES TestP 0 10 1 230
arsesADO_MS_1 WHERE TABLE_NAME LIKE :V00
001 ORDER BY TABLE_NAME
SELECT NAME, VALUE FROM V$SYSSTAT...
NAME VALUE
session cursor cache hits 91062
As you see the number of parses (both soft and hard) differ from
provider to provider.
Provider Hard parses Soft parses Executions
ODBC 1 0 10
MS for Oracle 11 0 10
Oracle 11 10 10
It looks like there is no way to control this 'bad' behaviour of
OLEDB providers, at least from ADO level. I looked through the docs on
Oracle provider for 8.1.6, but found nothing.
There is a temptation to drop all this stuff in favour of SQL
incapsulated in PL/SQL procedures...
Any comments?D.Bender wrote:
Hello,
What's very confusing is that it doesn't always return the same number of readings. Sometimes it is 5, then 7 and afterwards 6 without changing anything. Since it is the first program for the Keithleys at work nobody can help me. I already tried highlighting execution and retain wire values. This way I saw that the VISA write command should give the correct command but the VISA read does not return the right number of readings. In addition to that I don't get any readings on the second iteration, so I can only see some on the first. The Keithley also does not show any new measurements (at least it does not show any numbers, only the typical "----").
I can't view your file but I have experience with the Keithley 2400 so here is my opinion.
This is a common problem for new users working with buffers. The most likely cause is that you are reading the buffer BEFORE it is full. If you initiate the second measurement immediately, you will likely see a Keithley error caused by trying to set the buffer values while a measurement is in progress. The keithley will immediately return the buffer contents when asked to. You, as the programmer, must set up your LabVIEW code to wait for the buffer to fill, then read the values. While a fixed delay before reading could work, here is a better solution.
I posted my code for a I-V sweep (set voltage, measure current over a linear range) here http://forums.ni.com/t5/LabVIEW/Error-code-110-in-keithley-2400/m-p/2680579#M797618. (sorry I don't have access to the files right now to upload them here. The idea is first set the registers to watch for the buffer to become full. When full, the SRQ bit will be set to 1. After starting the measurement, i probe the SRQ value in a while loop. Once it's set to 1, read the buffer and reset registers. This method is outlined in the Keithley 24xx SMU manual (I can't remember which page). -
Same functions with different return types in C++
Normally the following two functions would be considered the same:
int getdata ( char *s, int i )
long getdata ( char *s, int i )
Every other compiler we use would resolve both of these to the same function. In fact, it is not valid C++ code otherwise.
We include some 3rd party source in our build which sometimes messes with our typedefs causing this to happen. We have accounted for all of the function input types but never had a problem with the return types. I just installed Sun ONE Studio 8, Compiler Collection and it is generating two symbols in our libraries every time this occurs.
Is there a compiler flag I can use to stop it from doing this? I've got over 100 unresolved symbols and I'd rather not go and fix all of them if there is an easier way.Normally the following two functions would be
considered the same:
int getdata ( char *s, int i )
long getdata ( char *s, int i )Not at all. Types int and long are different types, even if they are implemented the same way.
Reference: C++ Standard, section 3.9.1 paragraph 10.
For example, you can define two functions
void foo(int);
void foo(long);
and they are distinct functions. The function that gets called depends on function overload resolution at the point of the call.
Overloaded functions must differ in the number or the type of at least one parameter. They cannot differ only in the return type. A program that declares or defines two functions that differ only in their return types is invalid and has undefined behavior. Reference: C++ Standard section 13.1, paragraph 2.
The usual way to implement overloaded functions is to encode the scope and the parameter types, and maybe the return type, and attach the encoding to the function name. This technique is known as "name mangling". The compiler generates the same mangled name for the declaration and definition of a given function, and different mangled names for different functions. The linker matches up the mangled names, and can tell you when no definition matches a reference.
Some compilers choose not to include the return type in the mangled name of a function. In that case, the declaration
int foo(char*);
will match the definition
long foo(char*) { ... }
But it will also match the definitions
myClass foo(char*) { ... }
double foo(char*) { ... }
You are unlikely to get good results from such a mismatch. For that reason, and because a pointer-to-function must encode the function return type, Sun C++ always encodes the function return type in the mangled name. (That is, we simplify things by not using different encodings for the same function type.)
If you built your code for a 64-bit platform, it would presumably link using your other compilers, but would fail in mysterious ways at run time. With the Sun compiler, you can't get into that mess.
To make your program valid, you will have to ensure your function declarations match their definitions. -
Different number range for different sales area but same order type
i have 2 different sales area but i have assigned same sales order type for 2 different sales area,
but i need the number range different for different sales area for that same sales doc type,
is that there is any user exists for number range? if so how can i find the user existsHi,
You can surely have a different number range per Sales Area. For this you will have to make use of a User Exit (which would surpass the standard SAP functionality). Try USEREXIT_NUMBER_RANGE.
Maintain the desired range in VN01 with the respective Range Keys.
Make a custom table comprising of Sales Area and Number Range keys (same keys which you maintained in VN01).
Now everytime, the system will check which sales area is used and accordingly, it will fetch the Number Range Key~Sales Area combination from the custom table, and will pick up the number range from VN01.
Coding should done by a good technical guy to make this work nicely.
Hope this helps you.
Regards,
Vivek -
Same functionality as COR6N - through Function Mod - passing Batch Number
Hi All,
We are using function 'BAPI_PRODORDCONF_CREATE_TT' to make a completion confirmation with a goods movement.
We are trying to achieve the same functionality as COR6N.
We enter a proc order, then put a qty into yield, click Goods movement (the matr is batch managed) and then enter a batch (movement type 101 by default). Then save. Everything is ok and is I check in table MSEG there is an entry for the confirmation with the batch I used.
Now, when we try this with the bapi the qty is confirmed but in MSEG the batch that appears is different than the one we passed to the BAPI. This is how we are calling the funciton:
CALL FUNCTION 'BAPI_PROCORDCONF_CREATE_TT'
EXPORTING
POST_WRONG_ENTRIES = '0'
TESTRUN = 'X'
IMPORTING
return = wa_bapiret1
TABLES
timetickets = i_timetickets[]
goodsmovements = i_goodsmovements[]
link_conf_goodsmov = i_link_conf_goodsmov[]
detail_return = li_detail_return[] .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = li_ret
i_timeticket one entry with fields informed: orderid, phase, plant, yield
i_goodsmovements one entry with material plant resource stg location, batch, mov type
(values as in COR6N)
i_link_conf_goodsmov[] two cases:
1.if we place an entry such as
i_link_conf_goodsmov-INDEX_CONFIRM = 1.
i_link_conf_goodsmov-INDEX_GOODSMOV = 1.
Then no entry appears in table MSEG, in COR3 delivered qty is not increase but in COR6N the already confirmed quantity IS increase
1.if we place no entry then
Then an entry appears in table MSEG but the batch is not the one in i_goodsmovements, in COR3 delivered qty is increase and in COR6N the already confirmed quantity also increases.
So our problem is that when we use i_link_conf_goodsmov to make the bapi use the batch we specify then it does not seem to work. success is returned from bapi in both cases. Of course we do a commit work immeaditely after the bapi.
I would really appreciate somebody help me out.
BR,
AshwaniGuys please advise on this issue.
Ashwani -
Same number range for two different series groups?
Dear all,
There are two scenarios
1.Normal export under bond case, series group is 20 and number range maintained,running number is 300016
2.Another scenario,where ARE1 document generation for Deemed exp customer(already customised) , series group is 30.
But, client requirement is , for this second scenario also, system should pickup running number range of series group 20(under bond case) as per excise legal requirement
Ie running number is for series group 20 is 300016
For the above deemed exp case (second scenario)it should pickup 300017
And again when they do under bond case(first scenario), it should pick up 300018 like that
Is it possible to maintain the same number range for two different series groups(20 and 30)?
Even if you maintain the same number range for 30, as per running number range of 20
Will the system update simultaneously the same number range for 20 and 30 series groups?
Please suggest the way.With two different series groups, it is not possible to have the same number range. Even if you maintain it, they will be treated independently.
Normally, you should not use different series groups if the same number range has to be used. In fact, the concept of series group has been developed to ensure that number ranges can be maintained separately.
Regards,
Aroop -
I've just discovered that different typefaces seem to have different auto-leading in Pages. I am used to default leading being 120% of point size (or some consistent rule), but it seems this is not so any more. The same text in 10pt Times New Roman, which I would expect to line up with 10pt Palatino, for example, doesn't. I've tried using the inspector, at least to get both faces to behave the same for given settings, but I haven't been able to. How much control does Pages allow for this type of settings, and are there any hidden secrets as to how to do so? Many thanks
Message was edited by: Just me thenIf you set the line spacing in the inspector to Exactly and 12 points for 10 point type, it will work the way you want.
-
Same Document type, Different number ranges
All SAP Gurus,
I want to assign Different number based on movement types, but the problem is that both the number ranges (101 for purchase order and 122 return delivery to vendor) are having the same document type (WE).
Is it possible to assign different number ranges to them?
Please give ur valuable suggestions.
RegardsIn Std SAP , It is Not Possible..
-
CC - Same function, same transaction but with different comb of same obj
Hi,
I would like to know if it is possible in a same function for a same transaction to get an 'OR' between auth objects
Let say I have function YS01 with transaction ME28, we would like to check the following objects :
(1) M_BEST_EKG (ACTVT 01,02,06,75,76 + EKGRP U1, U2)
AND M_BEST_WRK (ACTVT 01,02,06,75,76 + WERKS 8011)
AND M_EINK_FRG (FRGGR 39,42,43)
OR
(2) M_BEST_EKG (ACTVT 01,02,06,75,76 + EKGRP U34, U35)
AND M_BEST_WRK (ACTVT 01,02,06,75,76 + WERKS 8011)
AND M_EINK_FRG (FRGCO 01,02,03 + FRGGR 69, 73)
If not, is it recommended in the 'Permission' tab of the function YS01 to:
- maintain 'normally' the auth obj linked to trans ME28 as in (1)
- and to add a 'manual' permission with all the concerned objects in (2) + S_TCODE auth object with TCD=ME28 ?
Thanks in advance
BillFryeX wrote:
I have this in my controller:
-(IBAction) setSize:(id)sender
And it would be enough to get to the title of the button
The sender param should be a pointer to the originating button, and you can use the button's tag property to id it. E.g.:
-(IBAction) setSize:(id)sender {
UIButton *button = sender;
NSString *title = button.currentTitle;
int tag = button.tag;
NSLog(@"sender=%@, title=%@, tag=%d", sender, title, tag);
- Ray -
Number range based on different business area for same document type
Hi All,
The scenario is my client wants to give the different number range for a particular document type based on different business area.
Is there any user exit by which I can restrict the same.
Regards,
MeenakshiHello,
Document number ranges are created per company code and fiscal year. You cannot create / restrict the document number ranges per business area.
Business areas a independent of all organizational values, they cut across all company codes.
Regards,
Ravi -
Different number ranges for same order type
Hi PP Guru's ,
Can anyone send me the user exit for the differnet number range creation for the same order type.
Same order type is used in two different Plants. So our client want to track the production order plantwise.
Thanx in advance.
Regards,
NagrajHi Nagaraj,
The number range is defined at order type level ( i.e. client level)
So if you want to use different number range for different plant, then use different order type for different plants.
Thanks and regards
Murugesan -
iPhone A recieves a text message, and iphone B (which has a different number but on the same account) recieves the same message that was intended for iPhone A. However, when iPhone B recieves a text (intended for iPhone B) iPhone A will not recieve it. This only happend after the new update (IOS 6).
It can be done, but you will have to sign in to your account on her itunes to updated the apps. Try these instructions:
http://support.apple.com/kb/HT1848 -
Same pseudo random binary number on two different laptops
I want to generate same pseudo random binary number on two different laptops at the same time.
How can I do that. Please provide suggestions.
JKHi Joseph,
I don't have any examples of this. Usually you use PRNGs to generate unique numbers…
You need to create your own algorithm.
There are USB sticks available that generate unique numbers in a certain reproducable way, which are used for authentification of bank account operations. You might take them as inspiration for your task…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Maybe you are looking for
-
Gestures no longer work in iTunes 10.4 (80)
Can you folks confirm the following please? In previous vesions of iTunes I could go back and forth by simply swiping 2 fingers similar to navigating in Safari. With Lion back/forth is done with 1 finger alas iTunes does not respond to 1 or 2 fingers
-
Check duplicate record in array
suppose i have an array int a[]={1,2,3,4,4,5,6,7,7}; how should i check duplicate record and remove them? thanks...
-
Is thier a reason haveing a for loop in paint would cause a problem
when i have a gui
-
Please recommend a UML design tool
Apart from the obvious - Rational Rose and TogetherSoft - can anyone recommend a [cheaper] UML design tool that can generate UML class diagrams for existing Java classes (including EJBs) - as opposed to the usual generation of code from the diagrams?
-
Can someone help me with my Library problem
I had to restore my user library and it named it Library(Original). How can I change this back to just "Library". It will not allow me to rename.