Home AMX User Forum AMX General Discussion

Pentair Module Declaration

I have a Master to Master system with a NXF(ME-260/64), NI-3100 and NI-3000 and I am controlling a Pentair Pool/Spa controller with AMX module 1.4v. I have the Pentair system connected to the NXF, a total of 14 touch panels will interface with the Pentair (10/NXF, 2/NI-3100 and 2/NI-3000). Which approach is the best?

1) Declare the Pentair module on each AMX controller and use the Virtual Pentair device on the 2 NIs.

or

2) Declare the Pentair module only on the master that it is connected to (NXF) and add the Touch Panel declarations from the other 2 AMX masters in the touch panel array that communicates with the Pentair.

I am looking for simplicity and efficiency on communicating with the Pentair and feedback handling. Any ideas? Which approach works better and why?

Thanks,

Ricardo

Comments

  • viningvining Posts: 4,368
    I normally do M2M by having 1 master basically running all the programming and the others act as glorified Serial/IR/IO/Relay servers. The module would go in my main master and I would simply send to the master dev port (if not a local dev) that serves the device who would in turn send replies back to the main master in a data event for that dev port even though it's not a local device port to the main master.

    Since in essence I only have one master all my TPs belong to this master and that's where all the code runs. I might do some oddball stuff in the other masters but that's about it.

    At least that's how think I do it.
  • ericmedleyericmedley Posts: 4,177
    You'd only want the module on one master. I have a rig where I'm doing the same basic thing. I have the pool's controller plugged into the serial port of an NI-700 in the guest house (which sits next to the pool - lucky guests...)

    Here's what the code looks like. BTW: This is an example of where I actually used the included UI module. It seems to work okay.
    define_device
    
    dvPentair = 5001:2:4    // Real device resides on RS232 port 1
    
    vdvPentair = 41331:1:0  // Virtual device. 
    
    dvTP_Pool_01      = 10001:2:0   //
    dvTP_Pool_02      = 10002:2:0   //
    dvTP_Pool_03      = 10003:2:0   //
    dvTP_Pool_04      = 10004:2:0   //
    dvTP_Pool_05      = 10005:2:0   //
    dvTP_Pool_06      = 10006:2:0   //
    dvTP_Pool_07      = 10007:2:0   //
    
    
    
    define_variable
    
    volatile dev Pool_TPs[]=
    {
    dvTP_Pool_01
    ,dvTP_Pool_02
    ,dvTP_Pool_03
    ,dvTP_Pool_04
    ,dvTP_Pool_05
    ,dvTP_Pool_06
    ,dvTP_Pool_07
    }
    
    volatile integer Pool_nButtons[]=
    {
    	1, //1 - Air Temp. text box
      2, //2 - not used	
    	3, //3 - Pool Mode button 
    	4, //4 - Spa Mode button
    	5, //5 - Fountain Mode button 
    	6, //6 - Online indicator 
    	7, //7 - Initialized indicator
    	8, //8 - Desired Pool Temp. Up button 
    	9, //9 - Desired Pool Temp. Down button 
     10, //10- Desire Pool Temp. text box 
     11, //11- Pool Temp. text box
     12, //12- Pool Heater button 
     13, //13- Desired Spa Temp. Up button
     14, //14- Desired Spa Temp. Down button
     15, //15- Desired Spa Temp. text box 
     16, //16- Spa Temp. text box
     17, //17- Spa Heater button 
     18, //18- All lights 
     19, //19- Swim lights 
     20, //20- Color lights 
     21, //21- Sync lights 
     22, //22- Cleaner button 
     23, //23- Aux 1 button 
     24, //24- Aux 2 button
     25, //25- Aux 3 button
     26, //26- Aux 4 button
     27, //27- Aux 5 button
     28, //28- Aux 6 button
     29, //29- Aux 7 button
     30  //30- Aux 8 button 
    }
    
    
    
    
    define_mutually_exclusive
    
    
    define_start
    
    DEFINE_MODULE 'PentairIntelliTouch_UI'  mdlPentairUI (vdvPentair, Pool_TPs, Pool_nButtons)
    DEFINE_MODULE 'PentairIntelliTouch_Comm_dr1_0_0'  mdlPentairComm (vdvPentair, dvPentair)
    
    
    
  • Thanks guys. I think it makes more sense to define the module on only one master. I tried both ways and it worked, but since the Pentair hardware is connected to only one master physically, it is still dependent on it. I just refer the other touch panels located on the other masters via:

    10014:10:2
    10015:10:3

    Thanks again for the insight!
Sign In or Register to comment.