Switch polarity appears to be inverted...?

Moderator: Benj

Post Reply
User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times

Switch polarity appears to be inverted...?

Post by petesmart »

Hi all,

Has any one come across an issue with v5 with the active state being inverted,ie active low is active high and vice versa..have not had a chance to investigate to any depth yet. Had to complete a project that I was having difficulty with the switch inputs not working as they should ie +ve for active.. Switched to active low and the swicth behaved as active high....confirmed with switch eblock

All the best

Pete
sorry about that Chief!

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Switch polarity appears to be inverted...?

Post by JonnyW »

Hi. We haven't seen any unusual behavior like this here. Could you post any sample or tell us what steps to reproduce this (and your setup) and we'll take a look.

Cheers,

Jonny

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times

Re: Switch polarity appears to be inverted...?

Post by petesmart »

Thanks Jonny,

The config is a ECIO40p with a MM switch eblock. Using read switch macro, read state. The flowchart simulated as it should, however when compiled the active state of the switch is inverted, ie active high was actually active low. Checked the pin and the pulldown resistor on the eblock was as expected.

What I was expecting was a logic one when the switch is closed..ie 5 volts on the input pin...instead the chip was expecting an active low state, which when using the eblock meant that the switch was always on via the pulldown resistor...

Changing the active state in the switch config window to active low sorted the issue

This of course could be me doing something stupid, it's happened before..or am I going mad?

All the best

Pete
sorry about that Chief!

Post Reply