Jump to content
OMRON Forums

Need to setup a variable to acquire motion program info via DPRAM


Recommended Posts

Hello all,


I want to add a variable that acquires variable information from a motion program via DPRAM. I am reading the DPRAM manual, but I am not making much progress in terms of comprehension.


Here is an example variable that I hope to replicate once I understand the underlying architecture. I want to create a variable that resolves like "RunningLeftProgram". I attached the associated .cfg file (renamed extension as .txt in order to attach).


RunningLeftProgram BOOLEAN:

Public Const LeftProgramRunningStatus As Integer = 8


If PMACstatusWord And LeftProgramRunningStatus Then

RunningLeftProgram = True



pmac.DPRGetLong(dwDevice, &H1438, FatStatus1, status) 'get FatStatus1 DP:$06050E



ClampFaultStatus = Int(FatStatus1 / &H100000) 'get M5004 clamp fault status

FatStatus1 = FatStatus1 - ClampFaultStatus * &H100000

programStatus = Int(FatStatus1 / &H10000) 'get M4012 program status (4-bit max)

PMACstatusWord = FatStatus1 - programStatus * &H10000 'M5000 combination status word


Thanks for any replies!! I think if I stare at this for a month, it will sink in, but hopefully someone can speed up the process for me.


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

This topic is now closed to further replies.

  • Create New...