Indicator to trigger Loop
Hello,
I have a VI that has two loops. I have an LED indicator in one loop and when that LED is true I want it to trigger the second loop. How should I go about doing this? I tried using a local variable but the second loop just wouldn't trigger.
Thanks in advance,
Cassidee
Solved!
Go to Solution.
Here. I made a simplified version. The second loop condition is unwired because I do not know how to trigger it. The indicator I want to trigger the second loop is titled System is Draining Valves are Open.
Attachments:
Untitled 1.vi 43 KB
Similar Messages
-
How can I opearate indicator outside while loop?
I do small program, I have many while loops and I want to connect wire (in my application) from each loop to AND gate then to another while loop, but how can I operate these wires to agree with the change of my application inside while loops.
If not clear :
In another words, suppose I want to operate indicator ouside the while loop. How can I operate indicator outside while loop, so when my application become TRUE (inside while loop) the indicator will be ON (outside while loop) and when my application become FALSE(inside while loop) the indicator will be OFF (outside while loop).
Help me if you have any idea please..........................Hi Rammo,
For the wire to carry the boolean condition from the while loop to an 'and' gate outside, the while loop must stop running
If you want the while loop to keep on running and still pass a boolean value to a destination outside the while loop, use any one of these: property nodes, global or local variables.
i am still not clear as to what you intend to say by this sentence
" I want the wire that comes out from the while loop will become TRUE if it in my application is TRUE inside while loop and the opposite is true. Because I want to connect the wire that comes out from while loop to AND gate than to another application"
plz tell me if the first part of this mail of mine answers your doubt or do you need more information?
regards
Dev -
WHEN-VALIDATE-TRIGGER trigger looping so many times
Hi,
Below is the code written in WHEN-VALIDATE-TRIGGER trigger and after raise FORM-TRIGGER_FAILURE
the process is not stopping and the trigger message looping without end when
I tab to the next field or try to save the record. I am not sure why the flow did not stop
after the raise FORM_TRIGGER_FAILURE exception and the trigger looping again and again.
Please help me to know what is wrong in the code. This trigger written in ITEM level.
declare
msg_type varchar2(3);
msg_text varchar2(2000);
continue boolean;
begin
if :pom1_b22.qty < 0 then
message_ppkg.get_msg_from_db('RET','04060',msg_type,msg_text);
message(msg_text || '.');
bell;
raise form_trigger_failure;
else
continue := TRUE;
if :pom1_b22.qty is not null and :pom1_b22a.b22_query = 'FALSE' then
if nvl(:pom1_b22.irt_created,'N') = 'Y' then
if :pom1_b22.qty <> :pom1_b22.save_qty and
:pom1_b22.save_qty is not null then
if check_order_status then
continue := TRUE;
else
continue := FALSE;
message_ppkg.get_msg_from_db('RET','04061',msg_type,msg_text);
message(msg_text);
bell;
:pom1_b22.qty := :pom1_b22.save_qty;
raise form_trigger_failure;
end if;
end if;
end if;
if continue then
if :pom1_b22.save_qty is null then
if :pom1_b22.qty > :pom1_b22a.total_qty then
message_ppkg.get_msg_from_db('RET','04057',msg_type,msg_text);
message(msg_text || to_char(:pom1_b22a.total_qty) || '.');
bell;
raise form_trigger_failure;
end if;
else
if :pom1_b22.qty <> nvl(:pom1_b22.save_qty,0) then
if :pom1_b22.qty > :pom1_b22a.total_qty +
(nvl(:pom1_b22.save_qty,0) -
:pom1_b22.qty) then
message_ppkg.get_msg_from_db('RET','04056',msg_type,msg_text);
message(msg_text || to_char(:pom1_b22a.total_qty +
(nvl(:pom1_b22.save_qty,0) -
:pom1_b22.qty)));
bell;
raise form_trigger_failure;
end if;
end if;
end if;
end if;
end if;
end if;
end;Your Raise form_Trigger_failure Condition is not met hence not stopping the rest trigger body.
-
I apologize if this seems like a duplicate question, but I've read many postings on this topic and nobody seems to have this exact scenario.
During live performance using MainStage, I need to trigger a short audio file (a few seconds long) as an endless loop. I want to hit a key on my keyboard controller, and have the loop start. I want to leave it "running" (looping) forever until I decide to hit a key to stop it. The entire file is the loop, so there's no need to set start and end points, or crossfade, etc. I have no need for adjusting tempo or doing anything sophisticated.
I've tried the AUAudioFilePlayer in a channel strip but that can't be triggered from the controller. I've tried EXS24 but I can't get the file to loop properly. I'd even be OK hitting a key on my laptop to start/stop the loop if necessary. Any suggestions? Thanks!
RichOK, I re-read your post a few times because I wasn't sure what you meant I couldn't figure out from your second post what you meant by a "One Shoot Loop" because those are a little contradictory..a sample either loops or is one shot. However, from reading your first post again, I see what you mean, you want to be able trigger the sample once and have it loop continuously. AIAK, that's not directly possible using what we've mentioned so far. (Note: from my post history it should be evident that I'm new to Mainstage and not an expert)
Two possibilities:
1) Not likely but if the length of the looping is static (same every time you play the song). Then you might be able to use Logic to create a long sample which is your loop played many many times and just use the EXS24 to trigger that long sample. One variation on that to make a sample longer than you will ever play and then trigger it from the EXS24 and have another button to stop the loop
2) Probably more flexible is to look at "SooperLooper" (http://www.essej.net/sooperlooper/) Set up a controller for record/play/etc... have your channel strip feed a Bus that has SooperLooper on it. Set your sample as a One Shot. Trigger it from Mainstage, trigger SooperLooper to record your one shot loop sample and loop it back. You may need to do some clever stuff to get the time right, such as making your sample twice as long with two repetitions of your 'loop' in order to give you time to start the same and then start the loop record, or having SooperLooper set up to listen to record on them same MIDI event that triggers your sample so your sample starts at the same time as your loop record starts
Same Greene has a demo for setting up Mainstage and SooperLooper together. http://www.samgreene.com/drupal_samgreene/node/98 The difference in your case would be that your channel strip would be for the ESX24 sample rather than a live (software) instrument -
Change indicator via trigger (Date/Timestamp)
I have set up triggers on all my tables to update the 'TIME_STAMP' field whenever a change is made to the row. It works flawlessly in sql*plus as well as in TOAD. However,if I insert a record using a ADF client I can view the record and the trigger provided value using sql*plus. If I update it using the ADF client the data becomes corrupted. I get a "ORA-01877: string is too long for internal buffer" when trying to view it with sql*plus or TOAD and if I dump() the column I get "Typ=180 Len=11: 0,0,0,0,0,0,0,0,0,0,0" (note: this is a dump when I had reset the datatype in my table and entity to a DATE).
The xml file for my entity follows:
Any Ideas?????
<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<Entity
Name="WbsUsers"
DBObjectType="synonym"
DBObjectName="WBS_USERS"
AliasName="WbsUsers"
BindingStyle="Oracle"
UseGlueCode="false"
RowClass="wbs.model.entity.WbsUsersImpl"
CollClass="wbs.framework.entity.EntityObjectCollImpl"
MsgBundleClass="wbs.model.entity.common.WbsUsersImplMsgBundle" >
<DesignTime>
<Attr Name="_isCodegen" Value="true" />
<Attr Name="_version" Value="10.1.2.17.96" />
<Attr Name="_codeGenFlag2" Value="Init|Access|Msg" />
<Attr Name="_superClass" Value="wbs.framework.entity.EntityObjectImpl" />
<Attr Name="_collSuperClass" Value="wbs.framework.entity.EntityObjectCollImpl" />
<AttrArray Name="_publishEvents">
</AttrArray>
</DesignTime>
<Attribute
Name="Id"
IsUpdateable="false"
Precision="32"
ColumnName="ID"
Type="java.lang.String"
ColumnType="CHAR"
SQLType="CHAR"
TableName="WBS_USERS"
PrimaryKey="true"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="32" />
</DesignTime>
</Attribute>
<Attribute
Name="Username"
IsNotNull="true"
Precision="30"
ColumnName="USERNAME"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="WBS_USERS"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="30" />
</DesignTime>
</Attribute>
<Attribute
Name="Fname"
IsNotNull="true"
Precision="50"
ColumnName="FNAME"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="WBS_USERS"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="50" />
</DesignTime>
</Attribute>
<Attribute
Name="Lname"
IsNotNull="true"
Precision="50"
ColumnName="LNAME"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="WBS_USERS"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="50" />
</DesignTime>
</Attribute>
<Attribute
Name="WbsRoleId"
IsNotNull="true"
Precision="32"
ColumnName="WBS_ROLE_ID"
Type="java.lang.String"
ColumnType="CHAR"
SQLType="CHAR"
TableName="WBS_USERS"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="32" />
</DesignTime>
</Attribute>
<Attribute
Name="Email"
IsNotNull="true"
Precision="255"
ColumnName="EMAIL"
Domain="wbs.model.entity.emailDomain"
Type="wbs.model.entity.common.emailDomain"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="WBS_USERS"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="100" />
</DesignTime>
</Attribute>
<Attribute
Name="TimeStamp"
IsUpdateable="false"
ColumnName="TIME_STAMP"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
SQLType="TIMESTAMP"
TableName="WBS_USERS"
ChangeIndicator="true"
RetrievedOnUpdate="true"
RetrievedOnInsert="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="11" />
</DesignTime>
</Attribute>
<AccessorAttribute
Name="WbsRoles"
Association="wbs.model.entity.WbsUserRoleFkAssoc"
AssociationEnd="wbs.model.entity.WbsUserRoleFkAssoc.WbsRoles"
AssociationOtherEnd="wbs.model.entity.WbsUserRoleFkAssoc.WbsUsers"
Type="wbs.model.entity.WbsRolesImpl" >
</AccessorAttribute>
<AccessorAttribute
Name="WbsUserPeriods"
Association="wbs.model.entity.WbsUpUFkAssoc"
AssociationEnd="wbs.model.entity.WbsUpUFkAssoc.WbsUserPeriods"
AssociationOtherEnd="wbs.model.entity.WbsUpUFkAssoc.WbsUsers"
Type="oracle.jbo.RowIterator"
IsUpdateable="false" >
</AccessorAttribute>
<Key
Name="SysC0012735" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Id" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012735" />
<Attr Name="_checkCondition" Value=""ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="SysC0012736" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Username" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012736" />
<Attr Name="_checkCondition" Value=""USERNAME" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="SysC0012737" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Fname" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012737" />
<Attr Name="_checkCondition" Value=""FNAME" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="SysC0012738" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Lname" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012738" />
<Attr Name="_checkCondition" Value=""LNAME" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="SysC0012739" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.WbsRoleId" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012739" />
<Attr Name="_checkCondition" Value=""WBS_ROLE_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="SysC0012740" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Email" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012740" />
<Attr Name="_checkCondition" Value=""EMAIL" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="SysC0012741" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.TimeStamp" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C0012741" />
<Attr Name="_checkCondition" Value=""TIME_STAMP" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="WbsUsersEmailCheck" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Email" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="WBS_USERS_EMAIL_CHECK" />
<Attr Name="_checkCondition" Value=""EMAIL" IS NOT NULL" />
<Attr Name="_isNotNull" Value="true" />
<Attr Name="_isCheck" Value="true" />
</DesignTime>
</Key>
<Key
Name="WbsUsersPk" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.Id" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="WBS_USERS_PK" />
<Attr Name="_isPrimary" Value="true" />
<Attr Name="_isDeferrableConstraint" Value="true" />
<Attr Name="_isInitiallyDeferredConstraint" Value="true" />
</DesignTime>
</Key>
<Key
Name="WbsUserRoleFk" >
<AttrArray Name="Attributes">
<Item Value="wbs.model.entity.WbsUsers.WbsRoleId" />
</AttrArray>
<DesignTime>
<Attr Name="_DBObjectName" Value="WBS_USER_ROLE_FK" />
<Attr Name="_referencedKey" Value="WBS_ROLES_PK" />
<Attr Name="_isForeign" Value="true" />
<Attr Name="_isDeferrableConstraint" Value="true" />
<Attr Name="_isInitiallyDeferredConstraint" Value="true" />
</DesignTime>
</Key>
</Entity>Hi all,
I am a dope. I was having so may problems with the TIMESTAMP datatype in ADF and in TOAD I decided to just go with a DATE datatype for a change indicator. I did all the changes in the build scripts and model but forgot to run the build script so the errors I was getting were based on the old datatype.
BTW, Steve Muench had published a workaround to the issue in October that I found after I did all my changes. (http://radio.weblogs.com/0118231/2004/10/07.html#a394) -
How do i get a boolean indicator to trigger a event structure
I have two parallel loops running, and i need to use a boolean value, one that comes out from an OR gate, to trigger an event in the parallel, event structure loop. I've attached a simplified version of the loop. Is there a way to get this done? I've tried using local variables, value(signaling), etc. and they haven't worked
Solved!
Go to Solution.
Attachments:
Parallel Loop Trigger.vi 10 KBHere is a revised version of your VI. I modified the mechanical actino of the stop button so it kept it's value until it was read. In addition, I added a delay to your upper loop. Without a delay it was running too fast to actually see the button press. I modifed the event in the the event structure to trigger on a value change of Boolean.
You don't really need the outer loop since it will only run a single time in all instances. On the first execution of that loop it will be sitting in the turn inner loops. Once you exit the two inner loops your outer loop will always exit. Therefore, it serves no purpose.
Your OR in the upper loop is completely uses. It serves no purpose since the result will always be equal to the value of the Stop button.
There are better ways of triggering events. a preferred method would be to use a user event and simply generate the event at the appropriate time. This has the advantage of not requiring additional controls/indicators simply to cause an event to occur.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Attachments:
Parallel Loop Trigger.vi 12 KB -
Hi guys,
I have 3 (status='Yes') records in 'a_info' table. This trigger only insert 1st one into 'a_save' table not the 3 of them. How can we loop it to all 3 ?
Thanks
create or replace TRIGGER autorec_trg
BEFORE INSERT ON a_info
DECLARE
CURSOR cursor_rec IS
SELECT idnum, email FROM a_info WHERE (status = 'Yes');
rec cursor_rec%ROWTYPE;
BEGIN
OPEN cursor_rec;
LOOP
FETCH cursor_rec INTO rec;
IF ( cursor_rec%notfound ) THEN
EXIT WHEN cursor_rec%notfound;
END IF;
IF ( cursor_rec%found ) THEN
INSERT INTO a_save (idnum, email) VALUES (rec.idnum, rec.email);
EXIT WHEN cursor_rec%found;
END IF;
END LOOP;
CLOSE cursor_rec;
END;Cursor loops are obsolete: TOTALLY OBSOLETE.
And even if they were not this would be an inappropriate use of one.
The syntax you should use is:
INSERT INTO a_save
SELECT ...
FROM a_info
WHERE ...;Never use PL/SQL to do what you can do with SQL.
I should also point out too that your business statement may be fatally flawed.
Suppose you insert records "A", "B", "C", "D", "A", "C".
What is going to happen?
First "A" copies what?
Second "A" copies what?
What will the third "A" copy? -
Refreshing Progress Indicator during calculation loop (WD ABAP)
Hi everybody,
I want to use the ProgressIndicator UI Element on one of my Views. But when setting a new percent value during my calculation this does not lead to a refresh of the indicator on the screen, hence I can only see the 0% and 100% state after finishing the calculation but nothin in between. Is there an elegant way to refresh the view or is the only way to trigger the inbound plug after each calculation step ?
Thanks for any hints & best regards,
MichaelHello.
You must increment the percentage like:
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Searching data ...'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = '0.25'
text = 'Calculating ...'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = '0.50'
text = 'Preparing output ...'.
Until it get's value 1.
However, if it's too fast you cannot see!
Regards.
Valter Oliveira. -
Help with Trigger - looping through SELECT results
How do I loop through a SELECT query within a Custom Trigger? I can
execute the query fine, but the PHP mysql_xxx_xxx() functions don't
appear to work inside a custom trigger. For example:
This ends up empty:
$totalRows_rsRecordset = mysql_num_rows($rsRecordset);
While this returns the correct # of records:
$totalRows_rsRecordset = $rsRecordset->recordCount();
I need to loop through the records like I would with
mysql_fetch_assoc(), but those mysql_xxx_xxx() don't seem to work.
This works great outside a custom trigger, but fails inside a custom
trigger:
do {
array_push($myArray,$row_Recordset['id_usr']);
while ($row_Recordset= mysql_fetch_assoc($Recordset));
What am I missing?
Alec
Adobe Community ExpertAlthough the create trigger documentation does use the word "must", you are quite free to let the trigger fire during a refresh of the materialized view. Generally, you don't want the trigger to fire during a materialized view refresh-- in a multi-master replication environment, for example, you can easily end up with a situation where a change made in A gets replicated to B, the change fired by the trigger in B gets replicated back to A, the change made by the trigger in A gets replicated back to B, in an infinite loop that quickly brings both systems to their knees. But there is nothing that prevents you from letting it run assuming you are confident that you're not going to create any problems for yourself.
You do need to be aware, however, that there is no guarantee that your trigger will fire only for new rows. For example, it is very likely that at some point in the future, you'll need to do a full refresh of the materialized view in which case all the rows will be deleted and re-inserted (thus causing your trigger to fire for every row). And if your materialized view does anything other than a simple "SELECT * FROM table@db_link", it is possible that an incremental refresh will update a row that actually didn't change because Oracle couldn't guarantee that the row would be unchanged.
Justin -
Update a front panel indicator from a loop inside a called vi. Without exiting
I am looking for the best way to update some indicators from within loop within a called .vi.
I need to update the front panle without exiting the loop.
I am able to use functional global vi to update the values of front panel indicators from within my nested loops, but I am looking for the best way that these values can be read to update my indicators.
ThanksOr a cluster of references, that way each reference can be named, and can be different types to match the respective indicator.
There are also methods where you can just send in a VI reference, and in the subVI traverse all the controls and search for the appropriate references by name.
Take a look at this long nugget. -
Markers - Can I trigger looped marker sections via MIDI controller?
This is kind of a multi-part question:
I know that I can set up key commands to toggle between various markers, but can I set up a group of MIDI controller buttons so that each one represents the 1st marker, the 2nd marker, the 3rd marker, etc., etc. of whatever project/song might be loaded?
Pending that answer, is there a way to set up each marker as its own looping section (without manually changing the cycle section)? Logic makes it very inviting to write/record over looped parts, and I would love to be able to toggle between each looped section of a project, via MIDI controller hardware, for a more intuitive way to both write additional parts for each song section, as well as compose more fluid sequences and experiment with different arrangements without having to drag everything around in the arrange window. I figured that using markers would be a way to do this, since I am under the impression that I can already have the 1st, 2nd, 3rd, etc. mapped out to MIDI controller buttons/triggers. I am hopeful that the trick can be accomplished with cycle automatically being associated with each marker section . . .
Thanks for your time, and your assistance/suggestions!You can assign buttons to control key commands by opening the key command set-up window. Navigate to the key commands you wish. You don't need to assign an actual key command for this to work, by the way. Highlight the appropriate key command (go to marker number X in your case). At the bottom left is the 'learn new assignment' button, press it and then press a button on your keyboard. Repeat for all desired key commands.
If you type 'marker' into the search box of the key command window, you will notice a key command a few spaces up from the 'go to markers' that is called 'set locators by marker and enable cycle' - to jump to this cycle just hit play, even if it's already in play it'll jump as long as you have 'play from cycle' selected in your play button options (which it is by default). Then press record and it will be recording.
There are several other key-command strategies that end up with the same result. So explore the options to find out what works for you. Since you can only assign one key command to a button, you do have to press several buttons (select marker, set loc. at marker, play, and then record).
You could rig up a little system in the environment that splits and converts cc messages so that pressing cc24 spits out 24,25,26 which are all assigned to different key commands. So one button kicks out 3 key commands this way. It's not too complicated to set up, but you need to pay attention to what is assigned to what or else you'll end up with a spaghetti pile of confusing assignments. Start with the easy 4 button method to make sure this is actually accomplishing what you want - who knows, maybe you will discover a key command combo that takes a step or two out. Then you can take a look at combining and simplifying. -
Pick up specific indices from for loop
hi guys ,
i have a for loop with N = 60 , i'm trying to make something when the index (i) reachs specific number , the indecies i'm interested in are
1 ,5 , 9,13, 17, 22, 26, ,30,34,38,43,47,51,55,59
the difference is 4 in some of them but it changes to 5 @ 22 and 43 and come back to 4 in between .
can anybody help me pick up these indecies ?
Solved!
Go to Solution.Why would you need a mathematical formula?
What is a "boolean variable"? In the context of LabVIEW, you need to explain in more detains what you mean )
I would just do something similar to the following (The second loop will iterate 60 times):
Note that the parts on the left will be folded into a single boolean array constant at compile time, so there is no overhead during execution.
(You can also do it all in a single loop. try it. )
LabVIEW Champion . Do more with less code and in less time .
Attachments:
IrregularSelection.png 16 KB -
Logc 7.1 drops when triggering MIDI loops?
I have an Akai sampler, and when i trigger loops within logic 7 via midi, at the end of every bar the Logic stops the loop short of the bar?
So if i do a 4 bar loop the re-triggering is fine until it comes around to loop back to the start again?!? where it jumps?
This is fine on my G5 OSX with 4Gb , triggering the loops on ableton or Protools, only with Logic?!
Any ideas?update:
Apple technician told me the way Logic uses cores changes depending on it's application.... ugh -
I am attempting to create a boolean output from a simple boolean datasocket source the VI's is attempting to subscribe too. But for some reason it does not seem to be able to determine the boolean value from the data received. This VI was designed from the standard example DS Reader with Attributes.vi. Although I have tried many other approaches and can't get it to work. I'm not sure if i'm handling the datatype correctly. I'm pretty new to Labview too!
Attachments:
DS_Boolean_Reader.vi 37 KBI finally worked it out myself! Silly me...I just had to put the indicator inside the loop so it was constantly updated I guess! The learning curve can be steep for this no structured text language. I'm still not convinced it is faster than coding the old way. :-)
Attachments:
DS_Boolean_Reader.vi 37 KB -
Possible strange bug with parallel loops in LV2010
I have a specific code which does not execute correctly in parallel, but making almost any small change to the code causes it to work. Even more bizarre, I can change it so that it sometimes works correctly, and somtimes doesn't. Interested? Read on...
I have a relatively simple VI (to compute 2D Wavelet Denoising on planes of a 3D array) with the following block diagram (debugging not allowed):
The parallel loop is set to 8 automatically-partitioned instances, and I've tested this on 2-core and 8-core machines. When the #cores wired into the loop is not one, several of the iterations do not compute (for example 4 out of 24). I can check this by putting a break in the VI called inside the loop and counting how many times it is called.
I can do a number of things to make all iterations run:
- put an indicator inside the loop on the iteration number, or anything else (except the P node)
- wire the iteration number outside the loop to an indicator
- remove the case structure
- remove the loop in the other case (it's at the moment identical except for a call to a different VI which uses Discrete WT instead of Undecimated WT -- if I change the other case to match this one, the other case runs fine but this one still fails)
- change code outside the loop
- turn on debugging!
- change the loop setup to another number of instances other than 8
- change the loop setup to set the number of partitions
I can also do a number of things that do not solve the problem:
- rewriting the loop from scratch
- copying the loop from the other case
- saving for LV2009 (in which everything runs as expected) and then reloading (and presumably recompiling) in 2010
Stranger still, if I replace the called VI with a dummy VI (which simply adds one to the input 2D array so I can tell if it executes), then as long as the other wires are still wired in, it sometimes executes all iterations, and sometimes doesn't (roughly 50% split)!!! Any other changes and it always works fine.
I've managed to replace as much as possible with dummy code and still keep the results the same (i.e. sometimes executing all iterations and sometimes not).
If you want to check it out (on a multicore machine with LV2010), run LoopTest.vi, and the results at the index shown should sometimes be 13 and sometimes 14. Changing #cores to 1 will always give a result of 14, changing WT to DWT always gives 14, even though the code inside both cases is identical!
Hope it's not just me, otherwise I'll be sure that LV hates me!
Attachments:
LoopTest.zip 355 KBOK, here's a new version that exhibits the same behaviour, but is hopefully simpler to understand.
The expected result is to add one to the whole array, however sometimes not all of the parallel iterations are executed. Run ParallelLoopTest.vi from the attached ZIP file on a multi-core machine to verify. This screenshot shows that sometimes it works correctly, and sometimes not:
The code in the other case is identical (created by duplicating the case) but always works correctly.
Attachments:
ParallelLoopTest.zip 63 KB
Maybe you are looking for
-
HELP! I can't shut down (and loads more)
So, for quite some time now, my Macbook Pro (Late 2011) running Mavericks has been acting very strangely. I have run Sophos and found no viruses. It will run fine for maybe an hour, then safari might hang or Mail might. Sometimes I will try and open
-
IPod Touch 4G forgotten password.. STUCK
Haven't used my iPod Touch 4th gen in nearly a year for preference of my Cowon Z2. Turned it on today to realize that I had forgotten the password... I wanna restore it anyways so I held down the correct buttons etc etc to get it into recovery mode a
-
Hi I have a problem in XL Report, when i try to generate a report based on a query made in composer or even when i try to generate through the report organizer. The error that happens is: An error occurred during the process "Report Initialize". Desc
-
When I try to install Adobe Flash Player 11.3.300.257 after I click OK in the User Account Control dialog box , no installation happens, but I can see install_flashplayer 11x32_mssd_aih_d.exe in the processes in Windows Task Manager. I cannot instal
-
Hey all, I'm not expert at acrobat, so I thought I'd pose the questions to the experts! :) I own an Epson C86 and my PC is running Acrobat 7.0. Often, when I print PDF files, I end up receiving a page full of garbage characters. I've updated my print