Hi,
the usage of Siul2_Dio_Ip_WritePin is wrong. You should have

or if pin labels are defined in Pins tool you can use

If you are connecting just logic analyzer, then the termination (e.g. Drone Can term) is needed otherwise no CAN message will be seen. Moreover as logic analyzer does not ACK message it will be sent repeatedly and you never pass while statement for checking transfer. Also with TX polling mode used you need to call FlexCAN_Ip_MainFunctionWrite repeatedly. It can be used as

Finally, do not use FIRC as CAN protocol clock, rather select FXOSC or system clock.
With above changes and terminated bus I see this one using analyzer

BR, Petr