NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
BobPizzi
Posts: 17
0 Kudos

signal trace script

I was helping out another customer and thought the result might be useful to others.
 
I wrote an SBA script which can trace a block signal to all of the blocks that connect to it, including tracing through a superblock reference. That way, you can see the direct uses of a particular signal.
 
The script contains some docs, it's simple to use, but the output is cryptic, but all of the trace information you'd want is presented. (It's gets tough when a signal traces through a superblock)
 
Here's a sample:  (tracesignal(98,1)) (using the discrete cruise system example model from cruise_d.cat)
 
Discrete Cruise System::continuous automobile.98 (1){auto speed}->
     Ext.Out (3) 
Discrete Cruise System::continuous automobile.98 (1){auto speed}->Cruise Control System.33::(5){auto speed}->
Discrete Cruise System::continuous automobile.98 (1){auto speed}->Cruise Control System.33::(5){auto speed}->Set Speed.13::(2){auto speed}->
     External Input Buffer.46(1)
Discrete Cruise System::continuous automobile.98 (1){auto speed}->Cruise Control System.33::(5){auto speed}->Controller Logic.57::(2){auto speed}->
    speed error.32(1)

ans (a scalar) = 3
 
Hope you can use it!
 
Regards,
 
Bob Pizzi
MATRIXx R&D
 
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page