Message Boards Message Boards

0
|
6266 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Attempting to understand "booleanExpression" Modelica block.

In SystemModeler, left-hand side, Libraries > Modelica > Blocks > Examples > ShowLogicalSources, we see a diagram with several disconnected blocks:

enter image description here

The booleanExpression block contains an expression, pulse.y and step.y, that implicitly links it to the other blocks -- by "implicitly," I mean "without connectors drawn on the canvas surface." The documentation here states "The (time varying) Boolean output signal of this block can be defined in its parameter menu via variable y," so I go look at (what I think is) the parameter menu for that block, but there are no parameters:

enter image description here

Notice that the block is properly selected in the UI (green outline). Also, I checked that the other blocks have parameters. Here are the parameters for block step, for instance:

enter image description here

What am I doing wrong? Without the ability to inspect and edit the booleanExpression in the block, it's pretty much useless.

EDIT: I should add that I clicked every menu item, every promising-looking icon in the "component browser" on the right-hand side of the screen, and right-clicked every context-menu item looking for some way to open up the instance and change its parameters. I didn't find any way.

POSTED BY: Brian Beckman

Hi Brian!

You can change the expression of the BooleanExpression trough the Modelica Text View. However, since that component only has a connector it won't show up in the parameters nor variables tab.

e.g.

 Modelica.Blocks.Sources.BooleanExpression booleanExpression(y = pulse.y and step.y and time >= 5)

enter image description here

Note also that the examples are read-only but you can create a duplicate to work with, right click on the class in the class browser and choose 'Duplicate'.

POSTED BY: Mikael Forsgren
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract