Example of how to pack variables using FB in safety program of Sysmacstudio / SL5500
This to use less tag sets
Attached files
Example program and Safety FB
SL5500

FB used

FB_IntTo_5Bits
Takes bit 0 to bit 4 in an INTEGER (1-31) and moves to internal bits.
If value is over 31 it generates error and ErrOut activates

FB_BoolsToDInt
Convert 32 internal bits to DINT

Global variables
![]()
Exposed variabels
Value exposed to NX-CSG320


NX-CSG320
Global variabels

IO Map

NJ
Unions

Global variables

EIP setup between NJ and CSG320
NJ



CSG320



Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article