Your initial question appears to indicate that you want to write to "output" ports, but the vi you reference is an "input" one. As to using a U32 when you only have 24 output pins, only the lower 24 bits would be used, so you should be ok.
PutnamCertified LabVIEW Developer
Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5
LabVIEW Champion