Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.natinst.com Inside LabVIEW Steve Rogers LabVIEW Software Engineer Wed, 10:15a, 12:45p, and 3:30p Mulberry (10B) Steve Rogers LabVIEW Software Engineer.

Similar presentations


Presentation on theme: "Www.natinst.com Inside LabVIEW Steve Rogers LabVIEW Software Engineer Wed, 10:15a, 12:45p, and 3:30p Mulberry (10B) Steve Rogers LabVIEW Software Engineer."— Presentation transcript:

1 www.natinst.com Inside LabVIEW Steve Rogers LabVIEW Software Engineer Wed, 10:15a, 12:45p, and 3:30p Mulberry (10B) Steve Rogers LabVIEW Software Engineer Wed, 10:15a, 12:45p, and 3:30p Mulberry (10B)

2 www.natinst.com Inside LabVIEW – Topics  Virtual instrument organization  How VIs are compiled  LabVIEWs Execution system  Single-threaded LabVIEW  Multithreaded LabVIEW  LabVIEW RTs remote execution system  What happens when indicators display  What happens when a subVI is called  Virtual instrument organization  How VIs are compiled  LabVIEWs Execution system  Single-threaded LabVIEW  Multithreaded LabVIEW  LabVIEW RTs remote execution system  What happens when indicators display  What happens when a subVI is called

3 www.natinst.com VI FrontPanelBlockDiagram DataSpaceCompiledCode Always present in memory Loaded when used The Parts of a VI

4 www.natinst.com VIs are compiled An Example Diagram

5 www.natinst.com Start of diagram Read controlsRead controls Read constantsRead constants Schedule Clumps 1 & 2 (for loops)Schedule Clumps 1 & 2 (for loops) Sleep...Sleep... Completion of diagram Execute divide nodesExecute divide nodes Display indicatorsDisplay indicators Exit VIExit VI Top for loop Update indicatorUpdate indicator Schedule Clump 0Schedule Clump 0 Sleep...Sleep... Bottom for loop Updated indicatorUpdated indicator Schedule Clump 0Schedule Clump 0 Sleep...Sleep... Clump 0 Clump 1 Clump 2 VIs are compiled – “Clumps”

6 www.natinst.com The Execution System QElementDSPC QElementDSPC QElementDSPC QElementDSPC “RunQ”headtail prioritized “curElem” QElement DS PC VI Data Space VI Code ebp (ds register) instructioninstructioninstruction

7 www.natinst.com curElem = Dequeue(runQ) ebp = curElem DS res = call curElem PC if(res) curElem PC = res Enqueue(runQ, curElem) curElem = NULL Exec() is a Loop Sleeps on runQ when multithreaded Cooperatively returns when in UI thread “Rotates” the runQ cooperative multitasking

8 www.natinst.com Computer Thread User Interface Loop Exec( ) Co-Routines Single-Threaded LabVIEW

9 www.natinst.com Exec( ) Thread Computer UI Loop co-routines co-routinesExec() Thread Exec( ) Thread Thread Thread Messages Multithreaded LabVIEW

10 www.natinst.com Exec( ) Thread RT Computer CommunicationLoop Co-routines Co-routinesExec() Thread Exec( ) Thread Thread Thread Messages TCP/IP LabVIEW RT – Target System

11 www.natinst.com Host LabVIEW RT Computer LabVIEW RT Target Computer Thread Exec() Thread Exec() Thread Exec() Thread Exec() Thread Communi cation to host or client Exec() Thread User Interface Loop Communication to target possibly Exec() TCP/IP -shared memory memory-Ethernet-other LabVIEW RT – Development System

12 www.natinst.com Client LabVIEW Computer LabVIEW RT Target Computer Thread Exec() Thread Exec() Thread Exec() Thread Exec() Thread Communi cation to host or client Exec() TCP/IP -Shared memory memory-Ethernet-Other Thread Exec() Thread Exec() Thread Exec() Thread Exec() UI Loop andComm-unicationsExec() Thread LabVIEW RT – Deployed System

13 www.natinst.com Display to an Indicator (Single Thread) Operate/ Display Data Execution Data Running code copies execution data to the operate/display, and calls the display function for the indicator.

14 www.natinst.com Display to an Indicator (Multithread) Operate/ Display Data Execution Data Running code acquires mutex. Copies execution data to transfer data, releases mutex, and posts message to UI thread. Transfer Data: Mutex “dirty flag” “update flag” UI thread receives message, acquires mutex, copies transfer data to operate/ display data, releases mutex, and displays indicator. Message queue Execution Thread UI Thread

15 www.natinst.com SubVI Calls (SubVI Not Busy) Caller Data Space Callee Data Space QElementDSPCparamPtr Params param0 param0 param1 param1 “top level” QElementDSPC Mutex curElem: NULL waitQ: empty Execution System curElem Execution System – curElem

16 www.natinst.com SubVI Calls (SubVI Running Caller) Caller data space Callee data space QElementDSPCparamPtr Params param0 param0 param1 param1 “top level” QElementDSPC MutexcurElem waitQ: empty Execution System – curElem

17 www.natinst.com SubVI Calls (SubVI is Busy) Caller data space Callee data space QElementDSPCparamPtr Params param0 param0 param1 param1 “top level” QElementDSPC MutexcurElemwaitQ Execution System – curElem other caller


Download ppt "Www.natinst.com Inside LabVIEW Steve Rogers LabVIEW Software Engineer Wed, 10:15a, 12:45p, and 3:30p Mulberry (10B) Steve Rogers LabVIEW Software Engineer."

Similar presentations


Ads by Google