Jump to content
OMRON Forums

PLC and PLCC disabled flags


engunneer

Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Unlike PLCs in PMAC, PLCCs do not have a simple way to query the status with a communications window. PLCs have specific memory bits that will are allocated to show if there is a PLC loaded and if it is enabled or not. In the non-turbo memory, the base address is stored at Y: $0F00 – Y: $0F1F, 0, 16 (for all 32 PLC starting addresses). Also, for non-turbo PMACs the enable/disable bit is located at Y: $0F00 – Y: $0F1, 22, 1. For a Turbo PMAC the beginning addresses are stored at Y: $003100 – Y: $00311F, 0, 16. The enable/disable bits are stored at Y: $003100 – Y: $00311F, 22. In all cases, the PLC is enabled if the enable/disable bit is low (0 value). To query PLCCs the memory does not have specific bits assigned for status. The storage memory must be called and analyzed to find the status of the PLCCs. In a non-turbo PMAC, the base address is stored at P: $8000 – P: $801F. For a Turbo PMAC the base address is stored at P: $50000 – P: $5001F. Therefore, to query the base addresses for all 32 PLCCs, the user can send the following command: RHP: $8000, 32 or RHP: $50000, 32. The returned string will contain the 32 starting addresses for the PLCCs. The first address will be for PLCC0 extending out to PLCC31. If the 24th bit of the address is returned high ($800000) then there is a loaded PLCC. Once it is established which PLCC is loaded, the next query would be if the PLCC is enabled. Before examining the PLCCs individually, PMAC should be checked to verify if it would allow the scanning of foreground and/or background PLC/PLCCs. This is easily done by verifying the value of I5. For values of 1 and 3 the foreground PLC/PLCC (PLC0 and PLCC0) will be scanned. For values of 2 and 3 the background PLC/PLCCs (PLC/PLCC 1 – 31) will be scanned. If I5 is 0 none-of the PLC/PLCCs will be scanned. Just because the PLC/PLCCs can be scanned does not mean there are enabled. It is possible for a PLC/PLCC to be enabled and not be ACTIVE. To be ACTIVE both the PLC/PLCC and the value of I5 must be satisfied. Finally, to verify enable/disable status of a PLCC, the “Temporary Starting” address of each PLCC must be analyzed. The “Temporary Starting” address is the base address + $x20. For example, a “Temporary Starting” address for non-turbo PLCC0 is P: $8020. Therefore to find what state the PLCC is in the string of the “Temporary Starting” addresses should be called form PMAC. The command given for a non-turbo PMAC is RHP: $8020, 64 and for a Turbo PMAC, RHP: $50020, 64. The reason there are twice as many words being queried as there are PLCCs is because there is a “jump word” before each “Temporary Starting” address. The “jump word” is $0AF080. The 65th word is $00000C; this is a return word. Once the 64-word(s) string has been queried, every other word, starting with the second, will be the “Temporary Starting” address. There are a total of three possibilities. First, if the word ends with $x60 then the PLCC is not downloaded, and therefore it is NOT enabled. Second, if the address stores the location of that specific address + 1, then the PLCC resides in memory, but it is disabled. Lastly, if the word is anything other than already stated, the PLCC resides in memory, and it is enabled. Furthermore, the specific address displayed is the specific position in memory at which that PLCC is being executed. The following are two examples consisting of only the first six PLCCs (due to simplicity) each. (NON-TURBO) [command] RHP: $8000, 6 [returned] 8060 808062 808075 808088 80809B 8060 [command] RHP: $8020, 12 [returned] 0AF080 008060 0AF080 008024 0AF080 008026 0AF080 008088 0AF080 00809B 0AF080 008060 [analysis] The first response informs the user that there are no PLCCs at locations 0 and 6 (the 24th bit is low) and that PLCCs 1, 2, 3, & 4 are loaded (24th bit is high). The first part of the second response starts with the “jump word” and is followed by a “return word” (008060), so PLCC0 is NOT enabled due to not being loaded. Following this is another “jump word” followed by a “pass word” (at location $008023 the word “$008024” is stored), so PLCC1 is loaded but is NOT enabled. The third part of the second response starts with a “jump word” followed by a “password word” ($008026), so PLCC2 is loaded but is NOT enabled. The fourth part of the second response starts with a “jump word” followed by “$008088,” so PLCC3 is loaded, IS enabled, and is currently at the location $8088. The fifth part of the second response starts with a “jump word” followed by “$00809B, so PLCC4 is loaded, IS enabled, and is currently at location $809B. The last part of the second response starts with a “jump word” followed by a “return word,” so PLCC5 is not enabled due to not being loaded. (TURBO) [command] RHP: $50000, 6 [returned] 50060 850062 850075 850088 85009B 50060 [command] RHP: $50020, 12 [returned] 0AF080 050060 0AF080 050024 0AF080 050026 0AF080 050088 0AF080 05009B 0AF080 050060 [analysis] The first response informs the user that there are no PLCCs at locations 0 and 6 (the 24th bit is low) and that PLCCs 1, 2, 3, & 4 are loaded (24th bit is high). The first part of the second response starts with the “jump word” and is followed by a “return word” (050060), so PLCC0 is NOT enabled due to not being loaded. Following this is another “jump word” followed by a “pass word” (at location $050023 the word “$050024” is stored), so PLCC1 is loaded but is NOT enabled. The third part of the second response starts with a “jump word” followed by a “password word” ($050026), so PLCC2 is loaded but is NOT enabled. The fourth part of the second response starts with a “jump word” followed by “$050088,” so PLCC3 is loaded, IS enabled, and is currently at the location $50088. The fifth part of the second response starts with a “jump word” followed by “$005009B, so PLCC4 is loaded, IS enabled, and is currently at location $5009B. The last part of the second response starts with a “jump word” followed by a “return word,” so PLCC5 is not enabled due to not being loaded. What has been described above is meant for a terminal window diagnostics. This same procedure can be done with a user code routine, however if the PCOMM library is being used there is an existing function called “PmacGetPlcStatus” that has been created to perform the task of the PLC/PLCC status verification. Please use this function, when available, to decrease the difficulty of a program.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...