Dear Ahmed,
Actually, User Guide section 6.9 explains some of this topic. Let me summarize:
Each FreeMASTER's JSON-RPC server listens on a different port. The first instance is 41000 and others then try to increment the port number until they are successful opening the socket. To have this more under control, you can start the FreeMASTER with /rpcs N option as described in section 6.3 of the User Guide.
When each instance runs (and connects to its target board), you can then use one HTML application running either inside of one of the FreeMASTERs or separately in a web browser to connect to both instances.
I assume you will use the freemaster-client.js module for the benefit of having a "PCM" object wrapper around the JSON-RPC communication. Refer to example in "c:\NXP\FreeMASTER 3.2\FreeMASTER\examples\scripting\JavaScript-JSON-RPC\example.htm" for more details. You can easily extend this example by having two PCM object instances, each connected to different FreeMASTER instance:
pcm1 = new PCM("localhost:41000", on_connected1, on_error, on_error);
pcm2 = new PCM("localhost:41001", on_connected2, on_error, on_error);
Now you can call methods like ReadVariable for either of the object instance (pcm1 or pcm2).
Regards,
Michal