Run Button without execute the program
Hi,
Normally, when I am pressing the "run button", it will run the program. How do I prevent from executing the program until I want to enable? For example, I have 3 power supplies on my pxi box, and I don't want to run the program until I have all my value set: voltage, current limit, output function and etc...Then, I will press the button like (enable or set) to set a certain voltage at certain power supply. I am using Labview 8.6. Thank you.
Solved!
Go to Solution.
Move the Set button outside that inner loop. It should be inside the True case but not inside the inner loop.
To run it again for another power supply, you need to control the outer loop with a separate stop button. Remove the boolean constants from the True and False cases that are wired to the stop sign. Wire the new stop button to the stop sign. When you are done setting all power supplies, press the new stop button.
If you know you will only be using two power supplies, you could replace the outer while loop with a For loop with a constant value of 2 wired to the N. Then the loop will execute for the first power supply setting and then repeat for the next.
- tbob
Inventor of the WORM Global
Similar Messages
-
How to delete confirmed schedule lines, without executing the ATP check?
Sales and Distribution: Concerning ATP (product allocation)
Situation:
Step 1: An order is created with priority low. Quantities are confirmed for line items.
Step 2: A second order is created with a higher priority. No confirmed quantities.
Rescheduling program (SDV03V02) is then executed. This selects and sorts the orders in the correct order.
The confirmed quantities for the first (low priority) order should now be freed up, to be able to allocate those quantities to the second (high priority) order.
The problem I am facing is that the confirmed quantities are NOT released.
We cannot use BAPI_SALESORDER_CHANGE or SD_SALESDOCUMENT_CHANGE to delete or modify the schedule lines, because these function modules execute the ATP check again. And when that happens, quantities are again confirmed and assigned.
How can we get rid of the confirmed schedule lines, without executing the ATP check?
Thanks,
Edwin.Found a solution to the problem:
In the Rescheduling program we export a parameter to the memory, to make it possible to delete schedule lines without executing the ATP check.
Deleting of the schedule lines is done with a BAPI, which will call the ATP check automatically for ATP relevant materials. This we want to stop from happening (only when calling the BAPI).
After the BAPI has been called we FREE the MEMORY ID.
The parameter is imported again in Customer-Exit EXIT_SAPLATPC_001.
Transaction.. SMOD
Enhancement.. ATP00001
Component.... EXIT_SAPLATPC_001,
Include...... ZXATPU01.
The customer exit is used in function AVAILABILITY_CHECK_CONTROLLER, just before calling function 'AVAILABILITY_CHECK'.
Simply refreshing the ATP tables in the customer-exit, will prevent the ATP check from being executed (because we removed the list containing the materials for which the ATP check needs to be done). As a result, the function 'AVAILABILITY_CHECK' will not be processed. -
Executing the program in Background
Hi experts i'm trying to Execute the Program in background.
Given the Input and output file locations and Press F9 for process the program in background from SE38. cause i want to run my program as a batch(Background)
but its not accepting. can you please help me how to resolve this issue.
i'm providing the code can you please verify that.
Many Thanks
SELECTION-SCREEN *
selection-screen begin of block b1 with frame title text-001.
*.. Filename
PARAMETERS: f_name TYPE char100, "Upload filename
d_name TYPE char100. " Download filename
selection-screen end of block b1 .
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_serv radiobutton group RAD1,
p_frnt radiobutton group RAD1 default 'X'.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_name.
*.. Data Declaration
DATA: lt_file TYPE filetable,
lv_file TYPE LINE OF filetable,
rc_i TYPE i,
cl_gui TYPE REF TO cl_gui_frontend_services,
w_path LIKE dxfields-longpath.
*.. Check if from server or frontend
IF p_frnt = 'X'.
*.. Create objects for method
CREATE OBJECT cl_gui.
*.. Clear the filename
CLEAR f_name.
*.. Call method to search for file
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Choose Input File'
CHANGING
file_table = lt_file
rc = rc_i
EXCEPTIONS
OTHERS = 4.
*.. Check if file found
IF sy-subrc EQ 0.
*.. Check that file path not empty
CHECK NOT lt_file[] IS INITIAL.
LOOP AT lt_file INTO lv_file.
*.. Set parameter to filename
f_name = lv_file-filename.
ENDLOOP.
ENDIF.
*.. Free object
FREE cl_gui.
*.. Upload from Server
ELSE.
Retrieve filename
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = '/sap_ftp/'
filemask = '**'
fileoperation = 'R'
IMPORTING
O_LOCATION_FLAG =
O_SERVER =
o_path = w_path
ABEND_FLAG =
EXCEPTIONS
rfc_error = 1
error_with_gui = 2
OTHERS = 3.
Set file path
f_name = w_path.
ENDIF.
*.. File selection for output file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR d_name.
*.. Only allow search for front-end
IF p_frnt = 'X'.
*.. Data Declaration
DATA: lt_file TYPE filetable,
lv_file TYPE LINE OF filetable,
rc_i TYPE i,
cl_gui TYPE REF TO cl_gui_frontend_services.
*.. Create objects for method
CREATE OBJECT cl_gui.
*.. Clear the filename
CLEAR d_name.
*.. Call method to search for file
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Choose Input File'
CHANGING
file_table = lt_file
rc = rc_i
EXCEPTIONS
OTHERS = 4.
*.. Check if file found
IF sy-subrc EQ 0.
*.. Check that file path not empty
CHECK NOT lt_file[] IS INITIAL.
LOOP AT lt_file INTO lv_file.
*.. Set parameter to filename
d_name = lv_file-filename.
ENDLOOP.
ENDIF.
*.. Free object
FREE cl_gui.
ENDIF.
*.. General Checks for Selection screen
AT SELECTION-SCREEN.
*.. Check if program run in batch mode and ping directory
IF sy-batch = 'X'.
*.. Move filename to file_name
file_name = d_name.
*.. Check if path can be reached
OPEN DATASET file_name FOR INPUT IN TEXT MODE.
IF sy-subrc NE 0.
MESSAGE e082(zsomerfield).
ENDIF.
ENDIF.
NITIALIZATION.
*.. ALV Variables
variant_save = 'A'.
w_repid = sy-repid.
w_variant_handle = c_handl.
START-OF-SELECTION *
START-OF-SELECTION.
*.. Check if batch program running in batch mode or not
IF sy-batch = 'X'.
*.. Open file on application server for reading
OPEN DATASET file_name FOR INPUT IN TEXT MODE.
DO.
*.. Upload entries
READ DATASET file_name INTO zpernr.
*.. IF end of file reached then exit DO statement
IF sy-subrc = '4'.
EXIT.
ELSE.
*.. IF entry found then add to employee table
in_file-empnum = zpernr.
*.. Add entries to table
APPEND: in_file.
*.. Clear header lines
CLEAR: in_file, zpernr.
ENDIF.
ENDDO.
*.. Close dataset
CLOSE DATASET file_name.
*.. Get file from frontend and run in foreground
ELSE.
*.. Upload from local machine.
DATA: file_name TYPE string. "LIKE rlgrap-filename,
*.. Set filename to filename from screen
file_name = f_name.
*.. Upload the information from the file into the table in_file
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
TABLES
data_tab = in_file
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.
*.. Make sure file uploaded correctly
IF sy-subrc <> 0.
MESSAGE E018(ZHR_MESSAGES).
ELSE.
MESSAGE i017(ZHR_MESSAGES).
ENDIF.
ENDIF.Hi Vamsi,
<b>First Check in the Foreground your program is working for the application server file or not</b>
When you will Execute your program in Background internal table "ZPERNR" will be populated from the file that is there on the application server.
After that what you want to do with the internal table.I think you have not sent the whole code.
In background FM GUI_UPLOAD willl not work.
If you want to debug your code put wait for 100 seconds at the place where you want to dubug your code.Go to transaction code SM50 your job will be running there.
Select Your job
Go to Menu Bar Program/Mode - > program - > Debugging.
In this way you can debug your code.
First Check in the Foreground your program is working for the application server file or not -
Tcode opens selection screen, but does not executes the program
Hi!
tcode opens selection screen of a custom program, but it seems that it does not executes the program itself.
Sounds strange, but how to explain this if I can run a program manually with no problem and it displays result screen, but when I try to run the program with tcode - it opens selection screen but program quits before displaying result screen. I was putting a breakpoint at the begining of the program - it does not triggers debuger when running a tcode (it triggers debugger if to run program manually).... any ideas?
Help will be appreciated,
MindaugasAre you using this???
SET PARAMETER ID '80B' FIELD T_TABLE-OPBEL.
CALL TRANSACTION 'FPE3' AND SKIP FIRST SCREEN.
That way it should work....
Greetings,
Blag. -
Why do i have to keep clicking my left mouse button to make the program work it just stops and if left click it starts working. I'v only just started to use this program and It's no good at all if I go to a website and click a button I have to keep clicking it to finish what its doing.
hello jeffsprig, can you try to replicate this behaviour when you launch firefox in safe mode once?
[[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
multiple other affected users have reported that this was an issue caused by malware on their pc. please run a scan of your system with [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner] and the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes].
[[Troubleshoot Firefox issues caused by malware]] -
In Snow Leopard, there was a quick look feature that allowed you to look at files without opening the program. It doesn't show up in Lion on my iMac. Any ideas? Thanks
While in Finder, select the file (click on its icon once) then press the Spacebar.
-
Error while executing the program 'RBDMIDOC'
Hi Experts,
While executing the program RBDMIDOC
I am getting the following errors
One error in Communication data :
1) No data distributed because of conversion errors
Two errors in Data selection and formatting :
1) No ISO code found for the country key NT in the field NATIO
2) Conversion error: infotype 0002, object 01,P,00000033
I am having change pointer entries in BDCP table.
Can anyone please tell me how to resolve these errors....
Thanks in advance...us the program
RHALEINI -
Error in executing the program,what can be the error
Error in executing the program.
What can be the error ,if the error shown is PROGRAM ABC DOE! after entering the values in selection screen?Hi,
Use find to search globally for message in the program.
Check the message that is handled in the program in the selection screen validations.Double click and find out the message.Then you can easily trace why it's happening. -
How to send files to others mail id when executing the program
Hi all,
I am getting text file from application server and i am sending total text file data into my internal table.
I am checking this internal table data especially material number and customer number with data base tables mara and kna1.If the matnr and kunnr are existing in database successfully means then only i am creating the sales orders for that text file data.if any record out of 10 records is not success means i am not creating sales orders for total text file data.
My error log file as
file name,date time,total no of records,error record no,error description.
one more text file as
file name,date time,total no of records,succesful records , error records.
I am getting these all data into my one more internal table.
I am appending all data into my internal table.
so i want retrieve only last row of data from that internal table.pls guide me how to get last row from the internal table.
these text files i have to send to my user mail id directly when i am executing the program.
any one knows the any function modules to send that text files to perticular mails.pls send the FM's to me.
Regards,
lokesh.hi
good
go through this report,hope help you to solve your problem
report y_cr17_mail.
data method1 like sy-ucomm.
data g_user like soudnamei1.
data g_user_data like soudatai1.
data g_owner like soud-usrnam.
data g_receipients like soos1 occurs 0 with header line.
data g_document like sood4 .
data g_header like sood2.
data g_folmam like sofm2.
data g_objcnt like soli occurs 0 with header line.
data g_objhead like soli occurs 0 with header line.
data g_objpara like selc occurs 0 with header line.
data g_objparb like soop1 occurs 0 with header line.
data g_attachments like sood5 occurs 0 with header line.
data g_references like soxrl occurs 0 with header line.
data g_authority like sofa-usracc.
data g_ref_document like sood4.
data g_new_parent like soodk.
data: begin of g_files occurs 10 ,
text(4096) type c,
end of g_files.
data : fold_number(12) type c,
fold_yr(2) type c,
fold_type(3) type c.
parameters ws_file(4096) type c default 'c:\debugger.txt'.
Can me any file fromyour pc ....either xls or word or ppt etc ...
g_user-sapname = sy-uname.
call function 'SO_USER_READ_API1'
exporting
user = g_user
PREPARE_FOR_FOLDER_ACCESS = ' '
importing
user_data = g_user_data
EXCEPTIONS
USER_NOT_EXIST = 1
PARAMETER_ERROR = 2
X_ERROR = 3
OTHERS = 4
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
fold_type = g_user_data-outboxfol+0(3).
fold_yr = g_user_data-outboxfol+3(2).
fold_number = g_user_data-outboxfol+5(12).
clear g_files.
refresh : g_objcnt,
g_objhead,
g_objpara,
g_objparb,
g_receipients,
g_attachments,
g_references,
g_files.
method1 = 'SAVE'.
g_document-foltp = fold_type.
g_document-folyr = fold_yr.
g_document-folno = fold_number.
g_document-objtp = g_user_data-object_typ.
*g_document-OBJYR = '27'.
*g_document-OBJNO = '000000002365'.
*g_document-OBJNAM = 'MESSAGE'.
g_document-objdes = 'sap-img.com testing by program'.
g_document-folrg = 'O'.
*g_document-okcode = 'CHNG'.
g_document-objlen = '0'.
g_document-file_ext = 'TXT'.
g_header-objdes = 'sap-img.com testing by program'.
g_header-file_ext = 'TXT'.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = sy-uname
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
FOLMEM_DATA =
RECEIVE_DATA =
File from the pc to send...
method1 = 'ATTCREATEFROMPC'.
g_files-text = ws_file.
append g_files.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header
method1 = 'SEND'.
g_receipients-recnam = 'MK085'.
g_receipients-recesc = 'B'.
g_receipients-sndex = 'X'.
append g_receipients.
call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
exporting
method = method1
office_user = g_owner
ref_document = g_ref_document
new_parent = g_new_parent
importing
authority = g_authority
tables
objcont = g_objcnt
objhead = g_objhead
objpara = g_objpara
objparb = g_objparb
recipients = g_receipients
attachments = g_attachments
references = g_references
files = g_files
changing
document = g_document
header_data = g_header.
*-- End of Program
thanks
mrutyun^ -
How to use Labview ""buttons"" to functioning the program?
i'm trying to use the ok button to operate the program to add the value in the cluster X Y (millemetre) [which is from the machine vision operation] with the value X Y offset [which i gonna input them myself] but .. i dont' know how to make it done , now i'm trying to use event structure but it's not working
plz give me some advice thanks ... by the way i'm got to make this thing done by 3 days due to my project schedule ... thank you
also this software is to locate the orientation for robot to grip the object by using CCD camera
Message Edited by NuMetal on 01-04-2010 10:55 AM
Message Edited by NuMetal on 01-04-2010 10:55 AM
Solved!
Go to Solution.
Attachments:
Project1.vi 97 KB
1.jpg 92 KBPlace the Event structure inside a while loop. Have a look at some of the examples that ship with LV, they for sure show this.
Then use the value change event for the ok button (place the button's terminal in that fram to have the latching behaviour set correctly).
You can pass the data of XY to the loop output in the same event frame to read it at the very moment, the ok button is pressed.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml -
I got a new Ipad 2 and I am trying to get it work in vain. I have downloaded the iTunes on my PC, but even after executing the program nothing happens to the IPAD. I still get the image of the USB cable and the iTunes logo. What am I doing wrong?
You know that you have to connect the iPad to your PC with the cable that came with it - and then iTunes should start automatically and it will guide you through the set up process?
If you have already tried to connect the iPad - and you have launched iTunes - and you still have no luck - reboot your PC and then begin the process again. -
Not calling the event S-O-S while executing the program using T-Code
Hi All,
I've a strange problem here in my Quality environment.
Well,
The issue is when a program is getting executed from SA38/SE38, its working perfectly as expected. Whereas while calling the same program using the T-Code attached to that then the program is not getting executed.
While looking at the code through debugger, the start of selection event is getting triggered while executing the program through SA38/SE38 where as the S-O-S event is not getting triggered if its through the T-Code. And this is happening ONLY with Quality environment.(In Dev and in Prod its working perfectly either through T-Code or thru SA38).
I tried activating all the objects again for that program(Including the T-Code) through SE80, Still no luck.
Please thow some light on it to eradicate this error in Quality Env.
Thanks for all your help.
Regards,
-Shankar.Hi Shankar,
please check the transaction definition and make sure you defined a [report transaction|http://help.sap.com/saphelp_nw73/helpdata/en/43/132f9803d76f40e10000000a422035/frameset.htm]
If you noticed a difference between Quality, Dev and and Prod environment, probably the transaction definition or the program is not the same.
Check version history for all objects involved.
Regards,
Clemens -
How to use the same button to control run or stop of the program?
I want to run a program when I press Boolen2, I use switch when press. So when I press it, it will turn "on" stature. There is a loop in the program. I want to stop it, when press the button again, that is when make the button from "on" statue to "off" stature.
But I don't know why it doesn't work in my vi. And is there other good way?
Thank you.
Attachments:
question2.vi 124 KBHi,
Thank you very much.Please download this file and save it under the same path,and change its extern name to dll.
I have tried follow your vi. But this method doesn't work properly in my vi. I don't know why.
Maybe it is because there is a highspeed data acquisition working in the loop. And I have tried to wait 100ms every loop.But it doesn't work.
Thank you for your help.
Hugo Liang.
Attachments:
MP421.txt 237 KB -
How do I close a running .vit using the X button without getting the save VI dialog?
One solution is to save the running .vit instance to disk before the operator is able to use the X button to close the running VI. This is awkward as I don't need another numerically named copy of the .vit on my disk. Adding a "Quit" button to my .vit front panel is also an option but it would be nice to be able to use the X button instead.
If you have LabVIEW 6.1 or higher, you can use the Event Structure to capture the click of the 'X' button, and choose to ignore it and close the panel.
Configure an Event Case to "This VI..Panel Close?" filter event. (note the question mark) On the right side of this new case, there will be a boolean terminal that will let you discard the event. Open a reference to the VIT and pass this out of the main loop, and use a property node on this reference to close the front panel, then close the reference.
It will go away when you hit the 'X' without prompting to save.
A simple example is attached. You'll either need ot make a change or copy everything to a new VI and run that to prove it doesn't prompt for saving changes. This is in 7.1, Let me know if you need it in an earlier version.
EdMessage Edited by Ed Dickens on 03-03-2005 12:58 PM
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Attachments:
Close without Save Prompt.vi 25 KB -
Error while executing the program RIMODAC2.
I am not sure of this program's functionality.
While i execute this program it displays a error message which is displaying a very old Sales Order in the message.
this is the message
Function: /SAPAPO/CIF_SL_DOC_INBOUND
Text: Customer requirement N BM 0100005129 000003 0001:
the number 0100005129 is a Sales order.
Regards,
Kevin.Hi,
It seems that the line raising the exception is:
pstselect=con.prepareStatement(selectQuery,ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
I don't know the odbc bridge so I'm just guessing, but you cant try with:
pstselect=con.prepareStatement(selectQuery);
and see what happens.
I recommend you to use the thin driver, with a single jar you can connect to Oracle without having to configure anything on your machine, just supply a database url, a username and a password.
ciao,
Giovanni
P.S. the code you posted is prone to NullPointerException, if you got an exception you catch it in the the first cathc block, bat after printing the stack trace you are going on even if the variables are null.
Maybe you are looking for
-
I recently upgraded firefox and now whenever I click a mailto link it opens gmail in the current tab rather than in a new window. How can I get it to open email links in a new window.
-
Unable to open PDF output (PDF downloaded from Interactive Report--APEX)
Hi, I'm getting below error while opening a PDF file downloaded from an interactive report (APEX). Adobe reader cound not open "TEST.pdf"because it is either not supportd file or because the file has been damaged. Thanks & Regards, Ramamuni.
-
Is there a way to use css media="print" to print all Spry tabbed panels
By setting up a special style sheet and calling that with media="print" I can control all other content that I want to appear in the printed webpage but since the tabbed panels display="none" or display="block" are controlled by the SpryTabbedPanels.
-
I have Adobe XI and I've suddenly started to get this error sign every time I try to either save or print of PDF. Has this happened to anyone else? Thanks
-
[SOLVED] bash - diff btwn 'normal' environment variables and VAR=x cmd
I always assumed variables passed like this: VAR=value cmd are passed to the program in the same way as environment variables. However; this is not the case; who can explain this? $ svn commit svn: E205007: Commit failed (details follow): svn: E20500