Is TriStatePort suppose to work?

Hi,

Does anyone know if TriStatePort is supported? I got an exception when i change the property TriStatePort.Active;
I suppose this property needs to be changed (set/reset) depending on the port direction in order to do a read or write.

Thanks!

First check f the TristatePort is already active.



Conversely, check to see if it is not active when changing to inactive.
1 Like

@ scardinale - Thanks for your reply… Sorry i don’t get it :-[ If already active why to set active? if active i want to set it as inactive (change from input to output… or vise versa

Sorry, its early here and I’m not quite awake.

It should be


if (!_tristatePort.Active) _tristatePort.Active = true;

2 Likes

@ scardinale - ahhh… now i discovered that it’s not allowed to set/reset the Active property to the value that it already holds…
This will generate an exception…

Thanks!!