The basic *form* of your code looks about right in terms of how to configure a task to either control or react to PFI lines as part of its run-time behavior.
I can't comment on the full *content* as I haven't implemented handshake-based DIO tasks before and am not familiar with the conventions. I'm a little surprised that pretty much all the same properties are being set for the Input task as for the Output task. I'd have expected there to be more output-only or input-only properties to configure. But that's not really based on anything.
Hopefully someone else with more familiarity will join in...
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).