Cannot call "mask and limit testing" inside a loop
Calling "mask and limit testing" in a loop doesn't work. The problem
is that the Upper Limit and Lower Limit are initialized only the first
time the VI is called. All waveforms are tested against the same
limits even if different limits are passed at each iteration. Is there
a way to use this VI in a loop?
Thanks!
Martin
Attachments:
test_limits_testing.vi 193 KB
Dear Martin,
Thank you for contacting National Instruments. I would like to apologize for the delay in responding to your support request.
From the information you have provided, it sounds like you are running your VI and experiences issues with the lower and upper mask refreshing after subsequent iterations of the FOR loop.
The �Mask and Limit Testing� Express VI is not intended to function inside a loop; however, you can fortunately modify this Express VI to perform the desired action. To do so, please follow these instructions:
1) Open the Block Diagram for your �test_limits_testing.vi� file
2) [Right Click] on the �Mask and Limits Testing.vi� Express VI
a. Select [Open Front Panel]
b. When prompted to convert to a standart subVI, choose [Convert]
3)
[Right Click] on the �subMaskLimitTesting.vi� Express VI
a. Select [Open Front Panel]
4) From the toolbar, select [Window] >> [Show Block Diagram]
5) You should see two subVI�s named �MatchDT� (white icons with black text)
a. Wire a [True] Constant to the �Reset 2� input terminal for each of the �MatchDT� subVI�s
i. To do this, right click each input terminal and select [Create]>>[Constant]
ii. Make sure the constant value is set to [T] for �true�
6) Save and Close the subVI�s
7) Re-run your �test_limits_testing.vi� file, and the masking limits should re-initialize upon each loop iteration
You have successfully customized the VI to function within a loop.
I hope this helps! Please don�t hesitate to let me know if there�s anything else I can help with or clarify. Have a great day!
Kind Regards,
Joe Des Rosier
National Instruments
Similar Messages
-
Mask and Limit Testing Express VI
Hello.
Im a bit new at looking at limit testing signals. Im using the Mask and Limit Testing Express VI to mask a signal I acquired previously. See attached VI.
My problem is that we would like to load the limit mask at run time using a file of some sort.
At the moment I am un-able to get any sort of mask loaded using the limit inputs to the Mask and Limit Testing Express VI. Does anybody know how I might do this?
Thanks in advance
Chuck
Attachments:
Limit Test (SubVI) example.vi 724 KB
Limit Type.ctl 5 KBHi and thanks for getting back so soon
True the upper and lower inputs are not connected because I wanted to show a working (all be it without an external mask) VI
the problem is I can't get the upper and lower inputs working in any form If I connect the inputs. So I guess my question should be,
How do I wire the upper and lower inputs to produce a working mask with the data supplied?
Then how do I use a file to provide the mask data.
Sorry for my lack of clarity and I hope this helps.
Chuck -
Hello,
When i am trying to use the Mask and Limit testing I am getting " Unable to View Properties" could you please tell me what will be issue on this.
Thanks
KJD
Attachments:
Mask and limit testing.png 56 KB
Mask and limit testing.png 56 KBI would say off hand that the express VI is corrupted.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
How to avoid data selection inside the loop?
Hello Experts,
I am working on one performance item and I have already applied some changes to the original version.
Now, If I compare my new program with old program, I have good improvement in performance. I am checking if I can do anything on statements that are top on the below list. I think 40% for Modify statement is acceptable after my research (Below run is updating around 20M records which is real time volume for this application).
As we can see 34% of run time to going for one SELECT query on custom table. Take a look at below high level flow of my program to understand above select query.
1. Select data from ZABC
2. Select data from Variant Table (Var1, Var2, Var3 etc.., 12 in real time)
3. Loop Variant Table
4. Select data from X, Y, Z table for Var<n>.
5. Populate final internal table from ZABC, X, Y and Z table
6. Modify ZTABLE with Final Internal table data
7. End Loop on Variant Table
As described in the flow of the program, ZABC table data is common for all the variants and need not to fetch multiple times. Hence I am doing it only once in my program. Below is that select query:
select rrcty ryear rbukrs racct rcntr sum( amt1) as amt1 "Like I have 32 amount fields in original query
from zabc
into table i_zabc
where ryear in r_year " Two records in ranges with I and EQ
and rvers = '001'
and rrcty in r_rrcty "Three records in ranges with I and EQ
and rldnr = 'DT'
group by rrcty ryear rbukrs racct rcntr
order by rrcty ryear rbukrs racct rcntr.
ZABC table is again having huge volume of data and we are fetching millions of records with above query. That is primary reason to take long time. May be that is okay as I am already using Indexes of this table. But, I am not comfortable with it as it can reach max. memory point and through run time error. Fetch Cursor is one reliable option that I can see here, but with that, I should move ZABC selection inside the variant loop which can cause fetching ZABC data 12 times (Let me know If I am missing anything here).
Now, third statement in my trace results, with 10% of overall time is this:
loop at i_abc assigning <fs_abc>.
loop at i_table assigning <fs_table> where low <= <fs_abc>-racct and high >= <fs_abc>-racct.
endloop.
endloop.
6 million executions with this complex WHERE condition is causing this statement to get 3rd position in trace results. I tried below two options which are, I think, taking even more time - (I am still monitoring these options)
1) Removed WHERE condition on LOW, HIGH and applied filter inside the loop.
2) Removed WHERE condition on HIGH only and applied filter inside the loop.
Any suggestions on how to proceed with ZABC selection and I_TABLE loop.
Let me know if you have any questions on above compose.Since I looked at this case before, let me try some quick suggestions:
Is table ZABC related to table X, Y and/or Z and can the selection be limited by applying those 12 selection variants?
If yes, try a join select involving these tables that could make your step 1 obsolete and replace steps 4 and 5.
This might also get rid of the "loop inside loop" problem. Generally, make sure that the inner table is declared as a sorted table with a key that consists of the fields as used in the WHERE-condition of the inner loop. Use secondary keys for internal tables if your ABAP release permits and the task at hand warrants it.
Finally, look at PACKAGE SIZE option for the (join) select to reduce memory consumption.
Thomas -
Problem to define limits in Mask & Limit Testing vi
With Labview 8.0 I can not longer define limit mask by draging points on Define Signal mask screen.
I used Mask & Limit Testing express vi before with Labview 7.1 and was able move points with cross mouse cursor to define limits envelope around tested signal.
With new labview this feature is disabled and I have to manualy enter X,Y cordinates for each point.I have reported this issue to R&D for further investigation, we hope to see it resolved in a future revision of LabVIEW. Sorry for the inconvenience.
(ID # 3V09NT1W)
Since I'll likely be the person fixing this, I went ahead and investigated this and found the cause of the problem, so I can provide a better workaround too.
One of the VIs used in this dialog has a very easy-to-make mistake in it. It's a little embarassing, though at least I can say I didn't write the original VI in this case.
If you open the following VI:
vi.lib\express\express shared\ex_TableUpdateTable.vi
The "graph relative coords orig" refnum going into the top two property nodes is wired incorrectly. Visibly it's impossible to tell this until you click once on the wire between the two property nodes. Notice that it is coming from the input to the first node, not the output of the first node. Delete this wire and re-wire it from the output of the first one. This will force the write to happen after the read.
Interestingly, the VI did not change at all between 7.1 and 8.0, this race condition just got compiled / clumped differently which caused the write to happen before the read in 8.0.
Message Edited by Jeff B on 03-01-2006 11:11 AM -
Mask & Limit Testing Express vi
Hello,
i have a problem with the Mask & Limit Testing vi. I want to connect the upper and lower limits at the terminals outside the vi. The limits are signals like this:
0 10
200 30
30000 200
The first column is the time in ms the second for example the length in mm.
How must i connect this limit data?
greetings SchwedeAre you trying to test the data to one limit, then to the second, then to the third? Or are you trying to build two waveforms and then test to them?
The first is solved by setting up the limits as constants in the Express VI and then wiring in the constants.
The second is much more difficult as the waveforms need to match in dt and array length. I think that can be accomplished easier than Jeff is doing it, but I would like a better idea before I spend the time to come up with an example.
So, several steps with constant levels or a single step with a complex level mask?
Thanks,
Bob Young
Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
DISTek Integration, Inc. - NI Alliance Member
mailto:[email protected]
Attachments:
mask_and_limit.vi 67 KB -
Blue tooth operation and lock up. After i connect my bluetooth it works fine foe a few calls. Then if i place an outgoing call, I cannot hear the reciving party but they can hear me. Other times i can hear them but they cant hear me. After rebooting the phine it works again for a few calls. This is consistent with 2 diferent blue tooth devices?
Sorry about the delay, I have been away from my computer for a couple of days.
Since you are able to use Siri and dictate notes, that indicates the mic itself is working.
I would suggest fully quiting the Phone app and resetting the iPhone.
Double click the Home button (bottom center of the display with square icon on it) to get the fast switcher. Press and hold on one of the icons so they start "shivering" and the red "-" icons. locate the Phone icon and press the red "-" on it. Then press the Home button again to stop the "shivering".
Then Reset the iPhone, press and hold the Home and Sleep/power (top right edge of iPhone) buttons until you get the Apple logo. Wait for it to finish restarting and then test again. -
Cannot Turn On iPhone Cellular Calls - FaceTime and iCloud must be signed in to the same Apple ID to use iPhone Cellular Calls.
I *AM* signed into Facetime and iCloud using the same Apple ID. Why am I receiving this error all of a sudden? I make calls using my Mac and need this feature. I have tried disabling and re-enabling both over a dozen times. TRUST ME, it is NOT user error -- it is Apple releasing features before they are fully ready error!I'm pretty sure we can clarify whether or not we are on a Public Beta or not, despite NDA........
From the FAQ: https://appleseed.apple.com/sp/betaprogram/faq
Quote:
Is the public beta software I am installing confidential?
Yes, the public beta software is Apple confidential information. For example, don’t install the public beta software on any systems you don't directly control or that you share with others. Don’t blog, post screen shots, tweet, or publicly post information about the public beta software, and don't discuss the public beta software with or demonstrate it to others who are not in the Apple Beta Software Program. If Apple has publicly disclosed technical information about the public beta software, it is no longer considered confidential. Read our Terms for full details -
I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling mine.
Each device needs a separate address. Use an email address (gmail.com) on the iPad.
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
http://tinyurl.com/a7odey8
Troubleshooting FaceTime and iMessage activation
http://support.apple.com/kb/TS4268
Using FaceTime and iMessage behind a firewall
http://support.apple.com/kb/HT4245
iOS: About Messages
http://support.apple.com/kb/HT3529
Set up iMessage
http://www.apple.com/ca/ios/messages/
Troubleshooting Messages
http://support.apple.com/kb/TS2755
Setting Up Multiple iOS Devices for iMessage and Facetime
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
FaceTime and iMessage not accepting Apple ID password
http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
Unable to use FaceTime and iMessage with my apple ID
https://discussions.apple.com/thread/4649373?tstart=90
For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
How to Send SMS from iPad
http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
Cheers, Tom -
I can't import pictures into iPhoto. (f I can right click and there is a choice to put in iPhoto that works fine) . No matter what happens, even when I download them first, all that imports is a mass of pictures of flags and masks, and they are the only things that are imported, no matter what picture I try to import into my librarly. Can anyone help me with this? I live in a small down 5 hours from an apple store so I can't just take it in and get somene to look at it.
I am on a Macbook Pro. I called AppleCare and all i got was 'gee, I don't know'. Everything was fine until about 3 weeks agoElaine. What are you trying to import from? Are you inserting a camera memory card in the slot on the side of your mac? Are you connecting your camera to the mac through a USB cable? It sounds like you can see your pictures, where do you see them, on the memory card that you open on your desktop, or are you using software that came with your camera?
-
downloaded acrobat reader 11 onto my Mac Book Pro, it can open the file but will not print. Get a message that says PDF cannot be printed, however, I forwarded it to someone else and they could print it, no problem. I called HP and spent an 1hour with them and then called Apple support and worked with them for 3 hours. No one can figure it out. Is there something wrong with this version? the pdf was created in 2004. Do I have to pay to get Acrobat?
Let me give you a slightly different perspective than everyone else here. You are using an unsecured wireless network, which means that all your network traffic is easily available for viewing by anyone else using that network. That's bad. Very bad, for you, unless you absolutely trust everyone who lives within range of this network. So stop doing it.
As to the Mac not connecting, wireless networking is simply too complex for any reasonable answer without more information. There are many possible error points, and as often as not it's the Mac that can connect and the Windows PC that cannot. Since you can't give us any information about the configuration of the neighbor's network, and can't make any changes to it, we can't do much to help you troubleshoot it. -
When i call, i cannot hear them and they cannot hear me
when i call, i cannot hear them and they cannot hear me
I'm having the same problem in the last 2 days, Can that fixed?
-
Multiple Numeric Limit Test - Evaluate Post and Status Expression
We have a Multiple Numeric Limit Test where the limits for one of the measurements is a function of one of the other measurements.
In the Post-Expression there are two expressions that set the low and high limit based on one of the readings.
But the comparison does not seem to be using the calculated limits.
The report file shows the correct calculated Low and High Limits, and shows the measured reading as being in between the Low and High limit, but fails that measurement. I feel the Status Expression is using the default limits that are out of range.
The post expression looks like this
Step.Result.Measurement[2].Limits.Low=Step.NumericArray[1]*1.9,
Step.Result.Measurement[2].Limits.High=Step.NumericArray[1]*2.1
In Table 3-4 "Order of Action that a Step Performs", Evaluate Post-Expression (Action #15) is before Evaluate Status Expression (Action #16), but it seems that is not the case.
Or am I changing the wrong Low and High Limits. Am I just changing the Limits used in the report file and not the limits used for comparison?
Again the correct low and high limits are in the report but not used for comparison.
ThanksDigging into the NI step type for Multiple Numeric Limit Test, I find that the comparison is done at Post-Step substep which is before my Post Expression is evaluated to set the correct limits.
So I have added code to my VI module to set the limits after taking the measurements but before returning to TestStand. -
Abstract classes and constructors - cannot call abs. methods in CONSTRUCTOR
Let me explain the scenario:
I'm building a program in which I need to read a file (among other things) and I intend to use object orientation to it's fullest in doing so. I thought of creating an abstract FILE class which has the commonalities, and two subclasses SERVER_FILE and PC_FILE, which implement the abstract method GET_CONTENTS in different ways (OPEN DATASET / GUI_UPLOAD), same for the CHOOSE method which allows to select the file from it's corresponding source.
Initially I've used an interface but since another tasks like setting the file path are common for both, switched to an ABSTRACT class.
Now, the problem is, from the main code I intend to use a FILE reference to handle either type of file. At the instantiation moment I'd like the path attribute to be set; if it was not set by parameter, i'd like to call the CHOOSE method which is abstract for the superclass. Since this is common for either subclass, I need a way to code it once in the superclass. But I get an error because the CHOOSE method is abstract.
This is the problem code (extracts):
* CLASS lcl_file DEFINITION
CLASS lcl_file DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
i_path TYPE string OPTIONAL
EXCEPTIONS
no_path_chosen,
get_contents ABSTRACT
RETURNING
value(rt_contents) TYPE string_table
EXCEPTIONS
read_error.
PROTECTED SECTION.
DATA:
_v_path TYPE string.
METHODS:
choose ABSTRACT
EXCEPTIONS
no_path_chosen,
set_path
IMPORTING
i_path TYPE string.
ENDCLASS. "lcl_file DEFINITION
* CLASS lcl_file IMPLEMENTATION
CLASS lcl_file IMPLEMENTATION.
METHOD constructor.
IF i_path IS SUPPLIED.
CALL METHOD set_path
EXPORTING
i_path = i_path.
ELSE.
*---->>>> PROBLEM CALL - CAN'T BE DONE!!
CALL METHOD choose
EXCEPTIONS
no_path_chosen = 1.
IF sy-subrc = 1.
RAISE no_path_chosen.
ENDIF.
ENDIF.
ENDMETHOD. "constructor
METHOD set_path.
_v_path = i_path.
ENDMETHOD. "set_path
ENDCLASS. "lcl_file IMPLEMENTATION
* CLASS lcl_server_file DEFINITION
CLASS lcl_server_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION.
PROTECTED SECTION.
METHODS:
choose REDEFINITION.
ENDCLASS. "lcl_server_file DEFINITIO
* CLASS lcl_server_file IMPLEMENTATION
CLASS lcl_server_file IMPLEMENTATION.
METHOD choose.
DATA:
l_i_path TYPE dxfields-longpath,
l_o_path TYPE dxfields-longpath.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A' " Application server
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path <> l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "choose
METHOD get_contents.
DATA: l_line LIKE LINE OF rt_contents,
l_osmsg TYPE string.
CHECK NOT _v_path IS INITIAL.
OPEN DATASET _v_path FOR INPUT
IN TEXT MODE
MESSAGE l_osmsg.
IF sy-subrc <> 0.
MESSAGE e000(oo) WITH l_osmsg
RAISING read_error.
ELSE.
DO.
READ DATASET _v_path INTO l_line.
IF sy-subrc = 0.
APPEND l_line TO rt_contents.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET _v_path.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_server_file IMPLEMENTATION
* CLASS lcl_pc_file DEFINITION
CLASS lcl_pc_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION.
PROTECTED SECTION.
METHODS:
choose REDEFINITION.
ENDCLASS. "lcl_pc_file DEFINITIO
* CLASS lcl_pc_file IMPLEMENTATION
CLASS lcl_pc_file IMPLEMENTATION.
METHOD choose.
DATA:
l_i_path TYPE dxfields-longpath VALUE 'C:\',
l_o_path TYPE dxfields-longpath.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'P' " PC
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path <> l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "choose
METHOD get_contents.
CHECK NOT _v_path IS INITIAL.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = _v_path
CHANGING
data_tab = rt_contents
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
RAISE read_error.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_pc_file IMPLEMENTATION
* Data
DATA: gr_file TYPE REF TO lcl_file.
* Main Program
START-OF-SELECTION.
* Get text lines from file
IF p_srv = abap_true.
CREATE OBJECT gr_file
TYPE
lcl_server_file
EXCEPTIONS
no_path_chosen = 1.
ELSE.
CREATE OBJECT gr_file
TYPE
lcl_pc_file
EXCEPTIONS
no_path_chosen = 1.
ENDIF.
On a 4.6c system this code gave me a dump, while on my NW7.0 SP it doesn't even activate with the following error:
You cannot call abstract methods in the "CONSTRUCTOR" method.
- Following some suggestions from Java forums i've tried to define the constructor in the base class as PROTECTED or PRIVATE instead, then calling super->constructor from the subclasses, but I get this error in german:
Sichtbarkeit des Konstruktors darf nicht spezieller als die Sichtbarkeit der Instanzerzeugung (CREATE-Zuzatz) sein.
which Altavista translates like:
Visibility of the constructor may not be more special than the
visibility of the instance production (CREATE Zuzatz).
- I've also thought of defining the CHOOSE method as a class (not instance) one, then calling it before creating the file object which maybe solves the problem, but I see that approach more "procedural oriented" which i'm trying to avoid.
- Of course I could define a constructor for each subclass, but both would have exactly the same code.
I'm really lost on how should I code this. My main focus is on avoiding code dupplication.
I hope someone with more OO experience can see what I'm trying to do and sheds some light.
Many thanks for reading all this!Dear Alejandro,
When i saw your code, you are trying to access an astract method CHOOSE(which is actually implemented in sub class) from the constructor of the base class which is not possible. By this time, we don't know which sub class it is refering to, so it gives an error. I see two solutions for this..
1. To define constructor in sub class and call the choose method from the consturctor of the sub class(which in this case is reputation of the same again for each sub class)
2. Remove the calling of choose method from the constructor of the main class and call it separately(after creating the object). By now we know which sub class we are refering to. I would have designed the program in the following way.
* CLASS lcl_file DEFINITION
CLASS lcl_file DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
i_path TYPE string OPTIONAL
EXCEPTIONS
no_path_chosen,
get_contents ABSTRACT
RETURNING
value(rt_contents) TYPE string_table
EXCEPTIONS
read_errorm,
set_path ABSTRACT
EXCEPTIONS
no_path_chosen.
PROTECTED SECTION.
DATA:
_v_path TYPE string.
* METHODS:
* choose ABSTRACT
* EXCEPTIONS
* no_path_chosen,
* set_path ABSTRACT
* IMPORTING
* i_path TYPE string.
ENDCLASS. "lcl_file DEFINITION
* CLASS lcl_file IMPLEMENTATION
CLASS lcl_file IMPLEMENTATION.
METHOD constructor.
IF i_path IS SUPPLIED.
_v_path = i_path.
* CALL METHOD set_path
* EXPORTING
* i_path = i_path.
* ELSE.
**---->>>> PROBLEM CALL - CAN'T BE DONE!!
* CALL METHOD choose
* EXCEPTIONS
* no_path_chosen = 1.
* IF sy-subrc = 1.
* RAISE no_path_chosen.
* ENDIF.
ENDIF.
ENDMETHOD. "constructor
* METHOD set_path.
* _v_path = i_path.
* ENDMETHOD. "set_path
ENDCLASS. "lcl_file IMPLEMENTATION
* CLASS lcl_server_file DEFINITION
CLASS lcl_server_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION,
set_path REDEFINITION.
* PROTECTED SECTION.
* METHODS:
* choose REDEFINITION.
ENDCLASS. "lcl_server_file DEFINITIO
* CLASS lcl_server_file IMPLEMENTATION
CLASS lcl_server_file IMPLEMENTATION.
METHOD set_path.
DATA:
l_i_path TYPE dxfields-longpath,
l_o_path TYPE dxfields-longpath.
CHECK _v_path IS INITIAL.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A' " Application server
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path = l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "set_path
METHOD get_contents.
DATA: l_line LIKE LINE OF rt_contents,
l_osmsg TYPE string.
CHECK NOT _v_path IS INITIAL.
* OPEN DATASET _v_path FOR INPUT
* IN TEXT MODE
* MESSAGE l_osmsg.
IF sy-subrc = 0.
* MESSAGE e000(oo) WITH l_osmsg
* RAISING read_error.
ELSE.
DO.
READ DATASET _v_path INTO l_line.
IF sy-subrc = 0.
APPEND l_line TO rt_contents.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET _v_path.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_server_file IMPLEMENTATION
* CLASS lcl_pc_file DEFINITION
CLASS lcl_pc_file DEFINITION
INHERITING FROM lcl_file.
PUBLIC SECTION.
METHODS:
get_contents REDEFINITION,
set_path REDEFINITION.
* PROTECTED SECTION.
* METHODS:
* choose REDEFINITION.
ENDCLASS. "lcl_pc_file DEFINITIO
* CLASS lcl_pc_file IMPLEMENTATION
CLASS lcl_pc_file IMPLEMENTATION.
METHOD set_path.
DATA:
l_i_path TYPE dxfields-longpath VALUE 'C:\',
l_o_path TYPE dxfields-longpath.
CHECK _v_path IS INITIAL.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'P' " PC
i_path = l_i_path
fileoperation = 'R' " Lectura
IMPORTING
o_path = l_o_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc = 0 AND l_o_path = l_i_path.
MOVE l_o_path TO _v_path.
ELSE.
RAISE no_path_chosen.
ENDIF.
ENDMETHOD. "set_path
METHOD get_contents.
CHECK NOT _v_path IS INITIAL.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = _v_path
CHANGING
data_tab = rt_contents
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc = 0.
* RAISE read_error.
ENDIF.
ENDMETHOD. "get_contents
ENDCLASS. "lcl_pc_file IMPLEMENTATION
* Data
DATA: gr_file TYPE REF TO lcl_file.
* Main Program
START-OF-SELECTION.
* Get text lines from file
IF abap_true = abap_true.
CREATE OBJECT gr_file
TYPE
lcl_server_file
EXCEPTIONS
no_path_chosen = 1.
ELSE.
CREATE OBJECT gr_file
TYPE
lcl_pc_file
EXCEPTIONS
no_path_chosen = 1.
ENDIF.
gr_file->set_path( ).
Regards
Kesava
Edited by: Kesava Chandra Rao on Mar 19, 2008 11:44 AM -
Property Loader and Multiple Numeric Limit Test
Hi!
I'm trying to export the limits of all numeric limit tests im my sequence.
I've no idea what i'm doing wrong, but i fail with exporting the limits of the multiple numeric limit tests. There are only the limits of the "normal" numeric limit tests in my export.
Could someone please explain me how to export also the limits of the multiple numeric limit test?
(TS 2013)when defining what to export, it is usually easiest/cleanest if you can explicitly define all multiple numeric step measurements as explicit indixes? For example if your MNL step has 2 measurements defined, you'd want to export 4 additional matches...
Step.Result.Measurement[0].Limits.Low
Step.Result.Measurement[0].Limits.High
Step.Result.Measurement[1].Limits.Low
Step.Result.Measurement[1].Limits.High
...and so on for more indexes....
note how the pattern is different from the regular
Step.Limits.*
by default when you try to export using the '>' buttons for MNL steps, TestStand will usually try to help by generating an incomplete/invalid expression of:
Step.Result.Measurement[?].Limits
which it expects you as the user to fix before proceeding, however the '?' is often overlooked, because it's so small!
some people prefer to simply export the entire Step.Result.Measurement.* to the file because they'd prefer not to define array indexes, but this will log the explicit XML for the container values, which may not be as easy for end users to work with... your mileage may vary. Good luck!
-Elaine
Maybe you are looking for
-
I can't connect my iPod nano 6th gen to iTunes 11.1.
I can't connect my iPod nano 6th gen to iTunes 11.1. It keeps saying 'it could not be identified properly". I've tried all the steps on troubleshooting page but nothing's successful. Anybody got some help?
-
Edit as new not working with draft messages?
Occasionally I want to send two similar messages at the same time. I write one message and save it as a draft - usually at this stage without any addresses specified. I visit the Drafts folder and use Edit as New to open the draft message as what I e
-
DQM moving data from STREET 2 field in SAP to STREET 3 field
During the address cleanse function by DQM, it is currently taking the information I have supplied in SAP field STREET2 and moving and/or copying it to STREET3. Does anyone know what is causing this or what the logic is being used to determine that
-
OEPE 1.6 - Oracle WebLogic Server 11gR1 PatchSet 3 requres WLS 10.3.4
Hi! Anyone knowing when Weblogic Server 10.3.4 is planed GA Borre
-
Need help with speaker problem
hi im having a problem with my speakers. ive used the green cord and i have a HDMI too my vidio card. ive tried everything to get the sound to work but i dont know whats wrong with it..