LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i detect digital signal transitions?

Hi,
I have to monitor several digital signals and i'm not interested in the signals themeseves,but in their transitions because those represents important events in my problem.
I have an E series daq card, so i think that the only way i can do this using digital inputs, is by polling.
My problem is that i cannot loose any transition and i need an accuracy of about 10-20 ms to accomplish this.
Do you think that's possible using polling?
Can i use my daq analog inputs(because in this case my daq card support buffering) instead and try to detect transitions?
Thank you in advance,
Luca Tascedda
0 Kudos
Message 1 of 9
(4,775 Views)
You can use an analog input, but all that is is just really fast polling. You will still only be able to tell when it happened to within one analog sample time (the reciprocal of the sample rate). The most precise way of doing this is with a counter which are also available on E series cards.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(4,775 Views)
Hi,
i know that using counter is the best choice, but unfortunetly i have 9 digital signals to monitor concurrently and only 2 daq cards!
I think analog should work well...
Thanks to you,
Luca
0 Kudos
Message 3 of 9
(4,775 Views)
You might consider our 6533 digital input card which has state change detection and works off a high resolution clock in the order of microseconds. This card is not that expensive - about $1000 - and will give you the results you are looking for.

Where are the digital signals coming from. I am interested in learning more about the unit under test.

Preston Johnson
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 4 of 9
(4,775 Views)
I'm developing an HIL simulator.
The UUT is an ECU that controls an automotive transmission; digital signals, in "real world", are directed to some on-off electrovalves...so when a signal is HIGH, for example, one EV is open...
Obviously i have to simulate some actions when i see that the ECU wants a EV to open/close so i'm interested in events rather than digital states.
Have i explained myself?
Thank you,
Luca Tascedda
0 Kudos
Message 5 of 9
(4,775 Views)
Sorry to all, but i have not explained my problem very well.
When i talked about "accuracy" i meant accuracy in detecting the events, but actually i'm not interested to be very accurate about the time this events happen...
So my only requisite is not to loose any events. In that case, are analog inputs a good choice?
0 Kudos
Message 6 of 9
(4,775 Views)
Thanks for your comments and further explanations. The 6533 DIO board provides you with a 32bit word upon state change. Each bit is one of your digital lines. You can branch in your code based on which line to perform actions. What operating system and processor are you planning to use to execute your code? Depending on the results, you may desire to improve the response time and reliability. Have you considered LabVIEW Real-Time? This version of LabVIEW is widely used for HIL applications.

Sincerely,

Preston Johnson
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 7 of 9
(4,775 Views)
Thanks for your reply.
Is the state detection "event-driven" or i must poll this status register?
As a quick solution before buying tha 6533 board i thought to use analog triggering funcion...if i set my analog inputs to wait for a trigger by setting a suitable level and use the wait for daq occurrence 3 i should be able to detect the transition without polling...do you think this can be done?
As for Labview RT, I've thinked about it, but the problem is that i'm a student doing a thesis work for an automotive industry and so i can't decide very freely how much to invesT! But, said this, i think that i shouldn't have many problems using a standard PC&Labvew, because our real time requirements are not very hard to meet and we're not intere
sted in very precise simulation...our concern is to stay within certain limits not to lock the ECU and the phenomenons i have to simulate aren't that fast!
Luca Tascedda
0 Kudos
Message 8 of 9
(4,775 Views)
I believe the state detection is event-driven. You might take a closer look at the manual for the 6533 (available on-line) and at the example in our developer zone. You can query for
"Change Detection with Time Stamping" or follow this link.

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3DC7956A4E034080020E74861&p_node=DZ52327&p_submitted=N&p_rank=&p_answer=&p_source=External

Alternatively, you can use the analog trigger, though I think this works with just one analog channel at a time.

Good Luck.

Preston Johnson
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 9 of 9
(4,775 Views)