I am finishing up with my display program for a system that consists of the display communicating over modbus to a single controller. The controller is the MPI-16 ignition system. This is a 16 output system to drive up to 16 coils on a 16 cylinder engine. We also sell the MPI-32 which as the name implies consists of 2 MPI-16 controllers in one enlcosure. It's purpose is to provide 32 outputs for applications that use two coils per cylinder. There is very little difference between them. One difference is that the second controller has its modbus port slave ID set to 2, the first controller has its salve ID set to 1.
So now that I have the MPI-16 complete, albeit we haven't had enough in-house reviews to release it , I want to start working on the -32 version.
My plan initially is to use a high level menu screen to allow the user to select which board he wants to observe or interact with. It seems that I need to have a duplicate set of everything in one program. I may change the page background color to denote which controller is being viewed.
Looking at the modbus mapping it seemed that I needed to change the identity of the base for second board registers. This was easily done in the environment panel. But changing it there does not change all of the references on pages, scripts, variable events and state machines. Is there a way to change the base name and have it change globally? Any thoughts about approaching this task would be appreciated.
Multi slave system
- snussbaum
- Posts: 28
- Joined: Thu Jul 07, 2011 12:17 pm
- snussbaum
- Posts: 28
- Joined: Thu Jul 07, 2011 12:17 pm
Re: Multi slave system
I spent further time looking at what was going on when the base name of the port was changed. I had stated that the system does not change the references in the state machines, pages etc. This is not completely true, it does change the references in the state machines,pages and events, it does not change any variable names in the script files. This is not a major issue. I was able to change the scripts manually in a short time and the scripts compiled successfully and the "create" compiler was successful as well. So now I can develop two identical programs that use a different modbus name and most importantly a different slave ID.
I could still use advice on the best way to merge two files. In the meantime I will simply copy and paste every page, state machine, variable and script into one file.
snussbaum
I could still use advice on the best way to merge two files. In the meantime I will simply copy and paste every page, state machine, variable and script into one file.
snussbaum
- snussbaum
- Posts: 28
- Joined: Thu Jul 07, 2011 12:17 pm
Re: Multi slave system
Taking a different approach, I looked at using the slave id user variable to change the active address and thereby not have to duplicate the entire program for the second board. Initially it didn't work until I added the "Update Port" after changing the salve ID. Seems to work fine.