dougm52

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About dougm52

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. Perhaps the question wasn't clear.  Let's say I find STI isn't supported in the emulator but is in hardware.  Then I could call STI_INT program 5 as a subroutine with JSR in the emulator, but when hardware is present, let the STI call it as an interrupt.   There should be something in the PLC I can query that will be different between emulation and hardware.  I'll study the docs more to see what I can find.
  2. I JSR to file 5, the STI_INT routine and it works OK.  Using file 5 in the STS command or merely initing the STI to use file 5 in the IDE does not work.  So unless one of the PLC experts on here has used STI from the emulator with success, I'll have to assume STI doesn't work and that fact was not clearly indicated in the docs. Is there a way to determine if the program is running in the emulator?  A status bit I can read or something?
  3. I tried -1 because it seemed it would be a truly bogus value.  Sure enough the emulator didn't know how to handle it and it crashed.  That told me that at least something looks at the program file number for the RTI.  But what that magic mystery number is at this point is elusive. I'll retry program 5, but I didn't get 5 to work last time.  It seems like if my RTI_INT program 5 rung has a SUS in it, and it runs 5, I should see an obvious program break there.  How would you test entry to 5?  I've tried incrementing an integer or toggling a bit and nothing happens. BTW, have you run an STI on the emulator sans hardware?
  4. Micrologix 1000 fixes STI_INT at program file 5.  I have a a rung that simply does "INT SUS 5".  I have tried other instructions in place of the SUS like toggling an I/O or incrementing a work in N memory.  I call in MAIN_PROG " XIC B3:0/1 STS 5 50 ".  B3:0/1 is set to a 1.  Before the program runs I clear the STI enable, file and interval in S2, S30, S31.  When I run the program in the emulator and view the STI settings they seem OK, ie: the STS call seems to have worked.  Yet I never seem to get the STI interrupt to fire and call STI_INT service routine. Interestingly enough if I set the STI file to -1, as soon as I run the program it faults with an invalid call on the first rung of MAIN_PROG.  It makes me think that the problem is simply that I am not putting the proper file number in the STI S31 file, ie: it expects something other than the program file number there. The emulator help docs seems to imply STI is supported. I must be missing something simple.  Any ideas?