daveSetBit function
Status: Beta
Brought to you by:
lettoz
hi,
how does daveSetBit works?
i've used them in this way:
daveSetBit(PLC_Node.dConn, daveDB, DB, DBW, byteAdr, bitAdr)
ex: daveSetBit(PLC_Node.dConn, daveDB, 10, 20, 0, 0) and in this way after function calls the DB10.DBW20 int value is 256!!! but i want to set only bit 0!
i think that:
Start binary value DB10.DBW20: 00000000 00000000
After function: 00000000 11111111
but i would have: 00000000 00000001
any suggest?
thanks
Mirko
256 is 00000001 00000000 and not 00000000 11111111 which is 255.
If I'm correct you need to swap the bytes...