ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

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
 
0 Kudos
Message 1 of 1
(8,089 Views)