I am adding an ADD4AD4DA to a new ALLIN1DC install. It is all new setup and there are several things that needed to be added/removed or modified to the PLC program. Everything is going well so far, except I have run into an issue with adding the ADD4AD4DA board.
Rather than explain all the details in this message, I attached the Report file, the modified PLC source code (incomplete), a text file roughly explaining the project and a few images of my questions.
So here is the main questions/issues:
Question #1)
While adding the ADD4AD4DA, I noticed that I need to enable the "MiniPLCBus Checking" (page 38 of the PLC Programming manual).
It says I need to add the following:
;add to constant defines
MINI_PLC_1_FLT_MSG IS (1+256*60); 15361
However in the existing source file there is the line:
MINI_PLC_1_FLT_MSG IS 39169;(1+256*153)
But, in the message file (plcmsg.txt) the error message for this fault is numbered 9153.
So the question I have is: which line above is correct? or... should it be the same as the message # in the text file? Such as:
MINI_PLC_1_FLT_MSG IS 9153;(193+256*35)
Question #2)
In the same section of the manual (page 38) (I also posted a screenshot showing the section) there are the following lines:
;check the first Expansion board
IF 1==1 THEN BITTST SV_PC_MINI_PLC_ONLINE 0 ADD1616ok1_M
IF !ADD1616ok1_M && PLCBus_Oe_M THEN
ErrorCode_W = MINI_PLC_1_FLT_MSG, SET SetErrorStage, SET PLCFault_M
However, there is no variable (memory bit) with the name "ADD1616ok1_M" (or ADD4AD4DAok1_M or anything similar).
But I did find "MiniPLCOk1_M".
So The 2nd question is:
Should I modify the lines to read:
IF 1==1 THEN BITTST SV_PC_MINI_PLC_ONLINE 0 MiniPLCOk1_M
IF !MiniPLCOk1_M && PLCBus_Oe_M THEN
ErrorCode_W = MINI_PLC_1_FLT_MSG, SET SetErrorStage, SET PLCFault_M
That would be my guess, but I am not sure. (It takes a long time to debug my guesses
One last Question (this was the next post I was going to make):
In my attached text file "Change Summary.txt" which describes what I am trying to do, I show the spindle speed memory bits (12 output bits on the ALLIN1DC) being 're-mapped' to the ADD4AD4DA (16-bit) memory bits. I think I can figure out the math for this, but I don't think I have the correct location of where those bits are located. The mpu_info.txt file shows the output bits as Outputs 257-272, 273-288,289-304 and 305-320. You can see in my .src file I have them mapped as Outputs 17-32, 3-48 and 49-64 which I don't think will work. Do I need to use the Outputs listed in the mpu_info.txt file for the Outputs?
I apologize if this seems like a zillion questions
Thanks for your Help!