06-08-2016 12:17 PM
i am making application in which ultrasonic sensor and camera is used.i am using myrio board.i have interfacing code for both ultrasonic and camera which i attached below.i need your help to build we can say logic.i want to capture the image using camera when distance measured by ulrasonic sensor is particular for example 10 inch.please help me..its very necessary for me.
06-08-2016 03:31 PM - edited 06-08-2016 03:35 PM
Hi sagar,
create a main VI executing (pseudo-)code like this:
WHILE IF distance measured by sensor == 10±x inch THEN capture image using camera ENDIF WEND
Suggestion:
Your subVIs should not run "forever" (as "ultrasonic sensor" does at the moment) - or you need to think about data exchange between parallel running loops in different VIs…
06-09-2016 01:01 AM
hello GerdW,
i am in the learning phase of labview.so currently i dont know how to write psuedo code.can u please explain in detail.how to map pseudo code to original?
06-09-2016 01:13 AM
Hi sagar,
you need to use suitable LabVIEW structures/functions.
- WHILE/WEND is just a WHILE loop (I guess you figured this as well)
- IF/THEN/ELSE is a CASE structure
- the rest of the pseudocode suggestion are just your two subVIs…
06-09-2016 05:28 AM
hello Gerdw,
sorry but i cant understand.whether i have to draw structure or write pseudo code?please explain with one example whole thing.thanks in advance.
06-09-2016 10:39 AM
Hi sagar,
whether i have to draw structure or write pseudo code?
Pseudocode is a way to describe an algorithm without using a "real" programming language!
You need to code the sketched algorithm in LabVIEW!
Btw. you don't "draw" in LabVIEW, you "code"/"program"…