Invert variable SOLVED

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times

Invert variable SOLVED

Post by dannyvanneijenhoff »

Hello,
I have a PWM dimmer, with potentiometer and a push botton input.
The PWM fet driver is changed (inverted), so i want to change the software.

Is there a (easy) way to invert the 0-255 data, what i send to the PWM variable.
So 001 will be 254, and 200 will be 55, exc.

I did not find any info about this, thanks Danny
Last edited by dannyvanneijenhoff on Thu Jan 06, 2011 11:31 am, edited 3 times in total.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Invert variable

Post by saschech@gmx.de »

Hello

Use a calculation macro,have a look in the function_tab.....
There you show NOT.......
so "pwm_value = NOT pwm_value" convert the pwm_ value from 0 to 255 (if the pwm_value=0)...........

Regards Wolfgang

dannyvanneijenhoff
Posts: 65
Joined: Thu Feb 07, 2008 7:59 am
Has thanked: 17 times
Been thanked: 10 times

Re: Invert variable

Post by dannyvanneijenhoff »

:P , ooooh is that all. Function NOT, ok thanks.

I could not find the explanation of the functions. the easy one i understand, but there are a few, i don't know yet.
In the help file there is only a explanation of the strings.

Post Reply