Last I remember the start number for PGNO is the lowest bit for PGNO. That is, in your case, if PGNO=IN[33..40] that IN=1 and all others 0 means PGNO=1.
Thanks for the clarification. Any idea why I get the message "Wait for not input 33"? Should I pulse the PGNO i.e. make IN go HIGH and then LOW?