Arduino XBEE Manual Parameter Change

Hello,

I have 7 Xbee S2's and 7 Arduinos with their Xbee Shields. I wish to know how I may be able to set NI, CH and other parameters in my Xbee's through Arduino Code.

The reason for this is because I am running an experiment in which I wish Xbee's to switch from one PAN to another given the circumstances in which they are.

Thanks. :)

P.S: I have played around with XCTU for more than a year and know of it. I have already tried through DIGI's guide and several tutorials on YouTube.

X-CTU sends AT commands to the XBee, to set PAN ID, MY, DH, DL, etc. When you hover over each option, it shows you the command. Send AT by itself. The XBee will respond OK. Send the command to change the option that you want to change, followed by the new value.

The last command to send is the one to save the modified configuration.