Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - Português


set_io

Set or update Xcos block inputs and outputs

Syntax

[model, graphics, ok] = set_io(model, graphics, list(in, it), list(out, ot))
[model, graphics, ok] = set_io(model, graphics, list(in, it), list(out, ot), clkin, clkout)
[model, graphics, ok] = set_io(model, graphics, list(in, it), list(out, ot), clkin, clkout, in_implicit, out_implicit)

Arguments

model

Block scicos_model representing information passed to the simulation.

graphics

Block scicos_graphics with graphical information used to display it.

list(in, it)

define input port properties, where N is the input port count:

in: N-by-2 matrix, dimensions of the N-th input port.

it: N vector, Scilab type of the N-th input port.

list(out, ot)

define output port properties, where N is the output port count:

out: N-by-2 matrix, dimensions of the N-th output port.

ot: N vector, type of the N-th output port.

clkin

N vector where N is the clock input port count, index of each clock

clkout

N vector where N is the clock output port count, index of each clock

in_implicit

N vector where N is the input port count, "I" for implicit port, "E" for explicit port.

out_implicit

N vector where N is the output port count, "I" for implicit port, "E" for explicit port.

Description

Create or update block ports (through the model and graphics fields) with specified types, sizes. This function can be used to update all the port related properties of a block at once.

Example

blk = scicos_block(gui="MyBlock");

// set inputs to :
//  1. double 2x2 matrix 
//  2. int32 scalar
// set outputs to :
//  1. double 2x1 vector
[model, graphics, ok] = set_io(blk.model, blk.graphics, list([2 2 ; 1 1], [1 3]), list([2 1], 1))

blk.model = model;
blk.graphics = graphics;
blk
Report an issue
<< scicosDiagramToScilab scilab_utilities_functions standard_define >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 24 11:16:57 CEST 2024