08-13-2012 12:09 PM
Hi all,
I want to count the number of digital inputs I am getting.
I found the “Toggleincrement” function (see attatchement) that is counting inputs controlled by a Boolean Control using an Event Structure.
Now, when I change the Boolean Control for my digital input the Event Structure does not work anymore.
Could somebody help me please?
Thanks!
Carola
08-14-2012 03:46 AM
Hi Carola,
If I understand your problem you want to use the example you post with another type of boolean control?
I think your problem is that events are linked to a specific control, so if you try to change it the event looses this link. Have you try to right click on the control and choose "replace"?
I post an enhanced version of your example. But don't forget LabVIEW help if you have troubles with strucute event: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/cfgevents/
I hope this can help you,
Regards
Audrey_P
National Instruments France
08-14-2012 08:43 AM
Thank you everybody for your replies. I am new with that and I am a little bit lost...
Yes Audrey, it is exactly what it happens to me: if I try to change the specific control, the event looses the link..but what I want is to change the boolean of the example NOT with another type of boolean but I want to control it directly with my digital input (coming from a photodetector). Something like what I post.
Have tried to right click on the control and choose "replace" but I can only do so to change to other type of boolean or similar things...nothing happens when I try to replace the boolean with input.
Thank you!
Caroal
08-16-2012 02:07 AM
Hi Carola,
Unfortunately, events can not be used in this case. Which PXI board are you using? does it have counters?
Because, what you want to do can be easily done using the count digital events LabVIEW/DAQmx example:
https://decibel.ni.com/content/docs/DOC-11412
Regards,
Audrey_P
National Instruments France
08-16-2012 09:08 AM
Thanks for your answer Audrey.
My PXI board is a PXI-6254 M series. I tryed what you are proposing me but I could not find the right channel to use as a counter...
Carola
08-16-2012 09:53 AM
Carola,
you just need to wire your digital signal on the counter source (PFI 8 for counter 0, see http://zone.ni.com/reference/en-XX/help/370466V-01/device_pinouts/6254_pinout/ ), and then choose the the rigth counter as input of your DAQmx create task VI (PXI1Slot2/ctr0 for counter 0).
You can find here a video tutorial about using counter:
http://www.ni.com/academic/students/learnlabview/digital.htm
Regards,
Audrey_P
National Instruments France
08-19-2012 11:35 AM
Thank you reply Audrey!!! It is working now!
The thing is that I still cannot use it because it is counting the photodetection events way too fast. Alternatively I wrote something it is working more or less OK.
Thank you very much for your help!
Carola