Boolean problem in a counter

hello, i am working in a counter,to know the falling edges of a digital signal but i have a problem at the input of the main case structure(the code is attached)
when the boolean control is false the code isn´t executed OK!
(*) when the boolean control is true,the code is exectued. OK! and the indicators 'contador'(counter) and 'tiempo ejecucuion del bucle'(time which the code is running) start to 0. OK!
but when the code is running, i want to stop the program to know the value of the indicators when the execution time is 60seg, but it doens´t happen because the code start to execute again with the inicators from value equal to 0, therefore i can´t to know the values of the indicators at time equal to 60seg
later i want to execute the code again like in (*).
The counter works perfect.
I need the boolean control because later i will have another code being executed continuously with this counter code(executed about the state of the boolean control)
could somebody help me with this? i hope that all is clear explained
thanks!
Attachments:
COUNTER.vi ‏31 KB

 set mechanical action of your button to switch until release, if you want yor increment is every click is increment by 1
Thank you & Best regards
syrpimp
=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
Attachments:
Counter.vi ‏14 KB

Similar Messages

  • Problem in Segment count

    Hi guys,
    I have a problem with segment count.
    I.e. I want to count the customer , on the RESPONSE fact table, with a response by MAIL channel and response date >03/11/2009.
    On the segmentation module i create a segment:
    start with RESPONSE_METOD='EMAIL' (count 107 customer)
    Keep RESPONSE DATE > 03/11/2009 ( count 12 customer)
    TOTAL COUNT OF SEGMENT 12 customer. It's wrong because the correct answer is 7 customer.
    instead
    if i create a single "level of segmentation", as follow, it's work:
    Start with RESPONSE_METOD='EMAIL' and RESPONSE DATE > 03/11/2009 (TOTAL COUNT 7 customer)
    How is possible? I try to generate log file to look query but i receive the error "no log found" ( in rpd file i set log level at 2 for the user)
    Best reguards for some suggestion
    Bye

    Hello User -
    Try setting the log level = 7 for the user in the RPD, then save the RPD, clear cache in both RPD and presentation services, and re-run the request. This should allow you access to see the log in "Settings > Administration > Manage Sessions".
    Once you do this, maybe you can paste the log in your next post and we can better attack the issue?
    I hope this helps, and please give points if you found this useful!
    Regards,
    Jason

  • Problem with message count

    hello ,
    I have problem with message count, in my inbox there are more than 0 messages but i got result of
    Folder inbox = store.getFolder("Inbox")
    int c =inbox.getMessageCount()
    of c is 0
    i.e i got c as zero rather than 5.

    I am seeing the same thing and I agree with MathiasF's observation.  My count seems to increase when I do a search for mail on the server.  This has happened previously (iOS 5.x) but ending the Mail app always fixed it.  The only way I can correct the count now is if I turn off sync for Mail on the Exchange account and re-enable.  This clears my mail and causes my phone to go out and redownload.  Rebooting and resetting the iPhone has not helped.
    I'm on Sprint - 32GB White iPhone 4S running iOS 6.0 (10A403)

  • Problem with multiple counter plan containing running hrs and no of months

    Hey gurus,
    In my project the preventive maintenance of compressor is such that it is performed after 500 hrs or 6 months whichever comes first. Now i ve created a cycle set cosisting of 500 hrs and 6 months. In the multiple counter plan i ve assigned a counter to the plan for calculating 500 hrs and chosen the link as OR. I scheduled the plan and given the start date as 01.05.09. Now I am facing the following problem:
    Suppose my counter value reaches the 500 mark on 01.08.09. Now a maintenance order is generated. My client now wants that the next order should be generated after the counter reading reaches 1000 or the date reaches 01.02.10, ie, the order should be generated for next 500hrs or NEXT 6 MONTHS from
    the date of completion of first cycle, whichever comes first.
    Pls help....
    Regards,
    Abhishek

    Hi
    If u have scheduled ur plan according to cycle set. It will take the Point of contact as 6 months.
    OK
    Ex : Cycle set : 500 hrs and 6 months, maintained OR functions
    i have entered the measurement reading as 500.. thats why, it gives the call for todays date...
    see the next date will be after 6 months... If u update the measuring point only, it will open a order... otherwise.. once u have scheduled it for 6 months.. once in 6 months it will give a order...
    1     11.05.2009               0     New start  Save to call
    2     07.11.2009     07.11.2009          0     Scheduled  Hold
    3     06.05.2010     06.05.2010          0     Scheduled  Hold
    4     02.11.2010     02.11.2010          0     Scheduled  Hold
    5     01.05.2011     01.05.2011          0     Scheduled  Hold
    6     28.10.2011     28.10.2011          0     Scheduled  Hold
    7     25.04.2012     25.04.2012          0     Scheduled  Hold
    Schedule for a long period.. u will be able to understand the scenario...
    - Pithan

  • Server problems with a counter

    My clients are given jobs by a server thread, the clients create a thread to work on the problem, once the client is finished it makes a call to the giveResult(String result,int resultIndex) method. This method will put the results(there are 100 hundred of them) into an array that size at the given index (that was passed into the method), it will then increment (resultIndex++). This works fine when it`s getting a reasonable amount of requests, but if i test it with request every .001secs it sometimes forgets to increment the counter. This causes it to hang (while resultIndex <100). This i would have put down to synchronisation but when i tried to implement it with a vector array and made the break condition (array.size() < 100),
    it works fine, and it is putting all the client reults in the right place, it just seems that sometimes it forgets to increment...any ideas?
    a simplified version.....
    void giveResult(String result, int ResultIndex)
    boolean writing = True;
    resultArray[resultIndex] = result;
    System.out.println("successfully outputted: "+result+" at array index:"+resultIndex);
    resultIndex=resultIndex+1;
    writing = false;

    You probably have a synchronization problem in incrementing the index. My best guess is that
    process a grabs the index value - say 0.
    process b grabs the index value - also zero
    process a completes the increment - 1
    process b completes the increment - 1 // No fun - should be 2!
    Synchronize the whole upfdate method.

  • Yosemite 10.10.1: Finder/CIFS mount problem: wrong folder count/folders not shown @samba shares

    Hello to all,
    we have several MacBook Pro (15" MBP Retina 2012/13"MBP Retina 2014) running. After upgrading to Yosemite 10.10.1 we had one nightmare after the other.
    Most problems could be solved with 3rd party software upgrades but there are several problems with the operating system itselve which can not really  be called a professional productive system at the moment...
    Ok., one thing after the other...here is one of our biggest problems:
    After upgrading from Mavericks or Mountain Lion to Yosemite 10.10.1 the CIFS/SMB mounts to our samba 3.x servers, running on Ubuntu Linux LTS 12.04 makes trouble. We could mount the server shares but after browsing with the Finder the beach ball occures and the Finder hangs forever. Sometimes we could not refresh the Finder, killing the process ended in a complete hang-up of the system which ended in a switch off death blow. This is not amusing because we have 30Tb of customer data there, which has to be worked out.
    We heard about the SMB3 protocol which will be used per default in Yosemite and so we decided after some testings to upgrate our Ubuntu servers to the latest LSF 14.04. release with samba 4.1.6 installed. There was no message from Apple for this SMB protocol release upgrade, never heard something related to Yosemite (Why?).
    Ok, after these server upgrades and disabling most of the Spotlight functions the performance to the CIFS shares was a little bit better as before but now we have another problem with the Finder...if you browse to the shares there are folders missing which have lots of files in it. For example there is a folder with 60 subfolders and 3562 files on the first level in it, the Finder shows 220 files and 15 folders. The Terminal shows a different count with "find . -maxdepth 1 -type d | wc -l" or "find . -maxdepth 1 -type f | wc -l" but there is also a difference to the original file and folder count. It doesn`t matter if the clients are connected via WiFi or Gigabit Ethernet. We have no access problems. We have the same behavior if we set the files and folders to 0777 permissions on the servers. The deletion of the preferences files of the users on the MacBooks does not solve the problem. If we use the "Go To Folder" option and type the path to a folder which is not shown in the Finder you get an result or not. But it is also possible that the result is not correct and there are also still files or subfolders missing.
    In my opinion this is a timeout problem and a "special SMB3 protocol interpretation" which is buggy. We have one hint found in /var/log/system.log:
    "Jan 23 14:35:49 wsosx33.clients.getcom.de KernelEventAgent[69]: tid 54485244 type 'smbfs', mounted on '/Volumes/customersdata2015', from '//x144067:@srvlxp013.servers.getcom.de/customersdata2015', not responding"
    We had no problems with Mavericks at all, we still have no problems with Windows 7 Pro/Ultimate, Windows 2008R2 (native or virtual) or Linux Mint 17/17.1 clients, neither with samba 3.x nor with our actual environment and different newer samba releases.
    We believe that this is a big bug in Yosemite, but we cannot go back to Mavericks because of incompatible TimeCapsule backups. Our workarround at the moment is that we have installed Linux Mint on our MacBooks to get 80% of our daily jobs done, rest has to be done with Windows 7 installed over virtualbox @Linux.
    We have no clue at the moment how to solve this problem, the samba logs do not give any hint. The access from other operating systems is perfect and very fast, but not with Yosemite. We checked different tips found in the internet but nothing helped.
    Does anybody has another idea to get Yosemite working or should we keep Linux Mint until Apple will provide a CIFS/SMB patch and going on with our workaround solution, which is productive at the moment ??? Our staff is not amused and wants one solution and not this workaround with two operating system. We have to decide wether we wait until Apple will get this fixed or we have to switch to Microsoft Windows (which is a No Go for me, but I will not be asked...).
    Thanks in advance
    C.

    Hi William,
    thank you for your response.
    As you can read in my post I talked about CIFS/SMB.
    It makes no difference if we mount the share over CIFS or SMB.
    Folders with lots of files will not be shown even if we use SMB3 or an older protocol.
    As mentioned I believe this is a timeout problem.
    Does anybody know how the CIFS/SMB timeout setting in Yosemite could be changed?
    Kind regards
    C.

  • Problem with syncing count of plays with itunes

    Hi everybody,
    Recently I lost my laptop (it has been stolen). Also i lost all data on harddrive including itunes libary. Thing is, all my music was on iPhone. Some of albums I bought in iTunes store, some of them imported from cd's. There was lots of stuff. When I bought another laptop, and connected my iPhone it says all data will be deleted from iPhone and replaced with data from itunes library. So I didn't want to do this, because i don't want to loose my count of plays, my playlists, etc, btw it would take ages to import all this music again, not mentioned about albums from itunes store!
    So i found this program - SHAREPOD - it helped me to copy all this data back to the computer, I copied that to iTunes Media folder and everything is in iTunes, so that's fine (apart from couple missing album artworks). But now, when I try to sync my iPhone with iTunes, it says the same message - all your data will be repleaced with itunes library. But I don't want it to repleace that, I just want to sync iPhone with that library. I really want to keep my count of plays for every song.
    Btw. the same problem is with programs, it wants to repleace that with itunes library, I've got more than 100 apps, most of them paid and i don't want to loose them, but I want it to work exactly the same as it worked previously.
    For me it's a really huge issue, that basically sync works only one way...
    Please help.

    You will have to sync and with any luck it won't try to re-sync all your music. In iTunes if you right click on your phone under the devices list you can select "transfer purchases" and that will move all your apps to iTunes.
    TuneUp companion is a great program that runs along side of iTunes that will fix all your track info and put the album artwork in the info.

  • Boolean Problems

    I have made a GUI using Javax Jframe etc and on it i have a JCheckbox.
    My problem is that when i try to save the values of the textbboxes on the JFrame and the checkbox, i cant get the value of the checkbox to save. I dont know how to get the value of the checkbox and save is as either true or false.
    private class AddVideoListener implements ActionListener {
              public void actionPerformed(ActionEvent arg0) {
                   Item I = new Item(mVidTitle.getText(), Integer.parseInt(mVidAge.getText()),
                             mVidType.getText(), Boolean.valueOf(mVidAvailable));
                   mConfig.getCustomerRecords().addClient(mCustID.getText(),c);mVidAvailable is the checkbox

    no that doesnt work lolI sincerely doubt that.
    kind regards,
    JosOr the OP is mixing awt and swing (not a good idea OP!) so it could possibly be a java.awt.Checkbox instead of a javax.swing.JCheckBox
    @OP: try boolean checked = mVidAvailable.getState();http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Checkbox.html
    But I recommend not mixing swing and awt, but just using swing components.

  • How to use boolean operator to get count

    Hi All,
    In my query i need to add a field Count which shows number.
    Meaning,
    Column A   ColumnB ColumnC  Count
    100               50            0            2
    55                60             76         3
    79                0               0           1
    meaning from all three column only two has values then Count should show 2. etc....
    any suggestion how to use boolean expression here ?
    or anyother way to display Count ?
    thanks,
    KS

    Hi thanks for idea.
    boolean didnt work here. the formulau sugested worked...
    But i wrote formula for the Count --> COUNT("overtime") and for the Count property I selected Calculate Result As --> Summation fo Rounded Values
    so the output is as follows:
    i had data for 3 payperiods
    Count  (1st 3 columns)                    overall result(last Column)
    200801     200802     200803           
    1                 0             1                         2
    1                1              1                         3
    0                1             0                         1
    Now the out put i wanted is in the last column -Result column.
    I dont want Count column to be display like this. it is showing values instead of total. any this i should change for this?
    thanks,
    KS

  • Problem with read count

    I am trying to receive 2500bytes via serial port and plot it on a chart, after sending character "S" to the sender device.
    I have set the "read count" to 2500 so it is supposed to receive 2500 byte then wait for another "S" but it just receives 101 bytes and then goes to next program iteration. how can i solve this problem?
    The VI have been attached.
    Attachments:
    2500.vi ‏21 KB

    First, you've posted to the wrong board. Your question has nothing to do with NI digital I/O devices.
    You seem to not understand how a VISA Read works. A read will terminate when the byte count is reached, or the timeout is reached, or the termination character is detected. Disable the termination character or set up multiple reads in order to get multi-line strings. For example, keep reading until the available bytes is zero. With a loop, shift register, and a concatenate string, this is easy to do.

  • Problem resetting play count

    Hi all,
    I've been trying to reset the play count of all my tracks in iTunes. I've been doing this by selecting all tracks (2,862 tracks) and then control clicking the mouse to reset the play count. It asks me whether I'm sure and then I just get the beachball until I have to Force Quit. I've tried doing this with twenty tracks and I have the same problem. Does anyone have any ideas what might be going wrong ?
    Thanks,
    Ben

    Command (Apple) key A.
    Or select the first one then Shift click the last one.

  • Problem with record count...

    Hi,
    I try to solve one problem with count. This problem occurs when I getting multi records that I need to count. Take a look on the following query:
    SELECT INVOICE,COUNT(INVOICE)
    FROM TABLE WHERE ADDR =
    (SELECT ADDR FROM TABLE
    WHERE DELEVERY = 'DD'
    GROUP BY ADDR||POSTDT
    HAVING COUNT(DISTINCT ADDR||POSTDT) > 1)
    GROUP BY INVOICE;
    I expected to see each invoice with total count invoices that have been delivered to the same address and date. But it's give me only invoice and count 1(itself), regardless if two or more invoices have been delivered to the same address and the same date. I think, that I just lost myself in this query. Hopefully I gave enough information.
    Thanks in advance,
    Alex

    Hi Alex,
    there are a couple ways to code this. Just two of them:
    SELECT t1.INVOICE,
           t2.total
    FROM   TABLE t1,
           (SELECT   ADDR,
                     POSTDT,
                     count(*) total
            FROM     TABLE t2
            WHERE    DELEVERY = 'DD'
            GROUP BY ADDR,
                     POSTDT
            HAVING   COUNT(*) > 1
    WHERE  t1.ADDR   = t2.ADDR
    AND    t1.POSTDT = t2.POSTDT
    SELECT t1.INVOICE,
           (SELECT   count(*)
            FROM     TABLE t2
            WHERE    DELEVERY = 'DD'
                     t2.ADDR   = t1.ADDR
                     t2.POSTDT = t1.POSTDT
            GROUP BY ADDR,
                     POSTDT
            HAVING   COUNT(*) > 1
           )  total
    FROM   TABLE t1

  • Using a true Boolean to increment a counter

    Hi everyone,
    I would like to make a simple counter that just waits until a true boolean is passed and then counts 1, then waits until it is passed again and goes up to 2, and so on. Just a single increment everytime a true is passed. I'm sure this is pretty simple but I have had no luck so far.
    Solved!
    Go to Solution.

    Why is the signal coming from another loop?  You might want to describe your system.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Boolean to increment a counter

    I want a VI that would increment a counter every time a boolean gives a true value. In other words, every time a switch is pressed, the counter should increment to the next whole number and so on.
    Solved!
    Go to Solution.

     set mechanical action of your button to switch until release, if you want yor increment is every click is increment by 1
    Thank you & Best regards
    syrpimp
    =======================================================
    “You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
    Attachments:
    Counter.vi ‏14 KB

  • PXI 6220 - problems with the counter

    Hello all,
    I try to make a buffered counting with counter0 of my PXI card 6220, to count the speed of a motor through a photocell and a sticker over the pulley of the motor.
    I have wired my photocell at PFI8 (source) and I generate a pulse train that I have wired in PFI9.
    The input to the counter is a pulse train 5V high level - 0V low level.
    The problem is that the counter counts sometimes more than 1 pulse for every turn of the motor. However, apparently the pulse train looks ok.
    I don´t know what´s the problem.
    The rising slope of the pulses looks very nice so, I think I could discard it.
    I can suppose that in between pulses there are some glitches at a very high frequency that I cannot see (I have sampled this signal only at 800kHz and at this frequency there are no glitches), but maybe the counter yes, because it works at 20MHz.
    Somebody has experienced this problem. Sometimes ago, using a PCI6221, I solved a similar problem by activating the digital filtering, but it seems it is not possible to activate for this cards. Could somebody confirm it?
    Any ideas will be appreciated.
    Thank you very much in advance!!

    Pete;
    I agree that is a little strange.We don't have such problem reported on our Data Bases.
    A workaround you can try is to make a sinle pulse goes to the source, before start the buffered acquisition, and see if that makes the counter keeps reporting a 1 value.
    You can also try the same thing on another counter of the board to see if that problem is related to the counter you are using.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Please help!! "Can't open the illustration. This artwork contains a very large image that can not...

    Hi all, I am subscribing Illustrator CS6 16.0.0 and using it on Windows 7. Few days ago I was working with one file, I saved it successfully and now when I'm trying to open it an error message occures "Can't open the illustration. This artwork contai

  • Configuring TP-Link TL-WR2543ND

    Can anyone help with configuring a TP-Link TL-WR2543ND Wifi Cable Router?   My BT hub has to go because it does not support Apple AirPlay. Issues I have are:  According to BT, the connection type should be PPPoA with VCI set to 38. But the router con

  • Front Panel compatibil

    Hey there, for a while I've been using my Audigy 2 xs with wonderous results to my sound, I never bought it with the front panel, but later on I bought one seperately, I installed it and works perfect, all the front ports operate, but one problem rem

  • TS3682 how to transfere my apps from my old i-pad to the new one using PC

    how to transfere my apps from old i-pad to my new one using the PC ?

  • PCD Eventing

    Hi, Is it possible for the PCD low level API's of create / modify / delete to send out events, that can be subscribed to, for instance using a portal service? Alternatively is it possible to listen to any change in the PCD? I need to run a few report