The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Submitted by yogeshnand on Thu, 03/17/2016 - 15:22
vissim embedded 9.0
i want to calculate time like for ultrasonic sensor.the time between transmitter( triggering) and receiver(Echo). how do i use it.please tell me
Submitted by Sreeram_Mohan_Altair on Fri, 03/18/2016 - 16:14.
Hi Yogesh,
Could you provide more details of the sensor that you are talking about ?
If you just want to send out an IO pulse high and wait for IO on the other and clock it you should atleast start looking at : 1) Setup a GPIO to be high or any pattern according to the transmitter requirement. 2) Configure the GPIO read to be on an interrupt and this interrupt can be used on a compound and perform any operation needed.
I would recommend you send us more details and may be we can understand better on what is needed !
--sreeram
Sreeram Mohan
Submitted by yogeshnand on Sat, 03/19/2016 - 11:39.
i am using ultrasonic sensor HC-sr402 for object detection.so i will give 10usec pulse for triggering(input to sensor) if there is object then echo will receive on GPIO(output of sensor) . i want to calculate the time between triggering and Echo(High) received. thanking you...
Submitted by Sreeram_Mohan_Altair on Sun, 03/20/2016 - 02:26.
Hi yogesh,
A simple way I suggest you could achieve this is through using a cross detect block and a pulse counter. Please find attached a simple diagram that does the same on an input square wave. Please replace the square wave with the input signal and you should be able to count the number of pulses and in turn derive the distance.
Hope this is helpful.
-sreeram
Unable to find an attachment - read this blog
Submitted by Sreeram_Mohan_Altair on Fri, 03/18/2016 - 16:14. Hi Yogesh, Could you provide more details of the sensor that you are talking about ? If you just want to send out an IO pulse high and wait for IO on the other and clock it you should atleast start looking at : 1) Setup a GPIO to be high or any pattern according to the transmitter requirement. 2) Configure the GPIO read to be on an interrupt and this interrupt can be used on a compound and perform any operation needed. I would recommend you send us more details and may be we can understand better on what is needed ! --sreeram Sreeram Mohan
Submitted by Sreeram_Mohan_Altair on Sun, 03/20/2016 - 02:26. Hi yogesh, A simple way I suggest you could achieve this is through using a cross detect block and a pulse counter. Please find attached a simple diagram that does the same on an input square wave. Please replace the square wave with the input signal and you should be able to count the number of pulses and in turn derive the distance. Hope this is helpful. -sreeram
HI SIR ,
i want to reset this counter afetrer some interval of time. i tried it . but it reset but again it not start from zero value . please look over the attached program.
thanking you
yogesh
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…