QSI Corporation

Manufacturer of Mobile Data and Operator Interface Terminals

Skip to content

Bit Level Logic Example

Code samples demonstrating aspects of the Qlarity language.

Moderators: Jeremy, QSI Software Support

Bit Level Logic Example

Postby Ron L. on Mon Nov 16, 2009 4:05 pm

Code: Select all
init commobj := modbuscomm
init parent := default
init register := 1
init vartype := mb_uint16

'example code in MBVirtualRegisterV2
func ValueChanged()
    dim u as unibyte

    u := intvalue

    if (u and unibyte(0x01)) <> 0 then

    else

    endif
    if (u and unibyte(0x02)) <> 0 then

    else

    endif
    '...
    if (u and unibyte(0x80)) <> 0 then

    else

    endif
endfunc
User avatar
Ron L.
 
Posts: 352
Joined: Thu Mar 02, 2006 2:12 pm
Location: Salt Lake City, Utah

Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest

cron