User`s guide
7 Creating Custom Drivers Using the xPC Target™ D river Authoring Tool
• Size — E nter the maximum size number of storage locations to be
allocated f or the parameter. If you wa nt this number to be a variable one,
enter a value of 0. This setting means that you can pass an additional
function argument that contains the size into the start, output, and/or
terminate functions along with the port/parameter variable.
• Type — From the list, select the data type for the input port.
• Output — This check box is always selected. It ensures that the input
portvaluewillbepassedintotheS-function
mdlOutputs callback
method.
6 If you have output ports for the block, click the Output Ports tab.
The Output Ports tab is displayed.
7 Click the Add button. Enter your output port information in the following
fields. Repeat as nece ssary fo r your defined output ports.
• Variable — E nter the name of the output. For example,
speed.
• Size — E nter the maximum size number of storage locations to be
allocated for the size.
• Type — From the list, select the data type for the output port.
• Output — This check box is always selected. It ensures that the output
portvaluewillbepassedintotheS-function
mdlOutputs callback
method.
8 If you have p arameters for the block, click the Parameters tab.
The Parameters tab is displayed.
9 Click the Add button. Enter your pa r ameter informa t ion in the follow in g
fields. Repe at as necessary for your defined parameters.
• Variable —Enterthenameoftheparameter.Forexample,
speed.
• Type — From the list, select the data type for the parameter.
• Size — E nter the maximum size number of storage locations to be
allocated for the parameter. If you want this number to b e a variable
one, enter a v alue of 0. This m eans that you can pass an additional
7-6