Jump to content
OMRON Forums

BoneSkier

Members
  • Posts

    47
  • Joined

  • Last visited

Posts posted by BoneSkier

  1. I am pretty sure this is a bug. I have defined a variable as follows:

     

    #define AxesEnabled P249

     

    When I type "AxesEnabled" in the terminal or from "GPASCII -2" from Telnet, I get the proper expected response:

     

    P249=1

     

    However, when I enter this same command in GetResponse from within my VB.NET program running with MONO, I get this:

     

    "error #20: ILLEGAL CMD: AxesEnabled"

     

    The results I am getting are the same as when I do the command using GPASCII (without the -2).

     

    "error #20: ILLEGAL CMD: AxesEnabled"

     

    So, when InitLibrary is done in my MONO program, is it starting GPASCII with -2?

     

    Additionally, I tried doing another command (Coord[1].AmpEna, whichi si defined by Delta Tau) from GetResponse in my MONO program, and it works just fine:

     

    Coord[1].AmpEna=1

     

     

     

     

     

  2. I really actually just need to get the address of the P-variable. I send the address along with the value of a P-variable to my HMI to notify of memory changes.

     

    The results I am getting are the same as when I do the command using GPASCII (without the -2).

     

    "error #20: ILLEGAL CMD: AxesEnabled"

     

    So, when InitLibrary is done in my MONO program, is it starting GPASCII with -2?

  3. Yes, I think that a "world class" motion control company would be able to come up with a standard command for such a standard operation. Otherwise, the workarounds are just that --- work arounds. Handling the special exceptions that can occur when you are doing this special work around are where "the devil is in the details".

     

    Like you say, using ABORT to stop the motion has other implications. For me, it means that I am jumping back to the start of a part program. This would not be a good thing.

     

     

     

  4. I have asked for this for the past few years, but I am going to post it now too.

     

    I need to be able to start and stop motion for an axis (not a motor). My users will need to be able to do this in their part programs, so I am looking for a one-line command. I say "not a motor", because this motion needs to take into account kinematics too.

     

    MoveAxis X, 25, 1; // move X axis in positive direction with speed of 25ipm

    MoveAxis Y, 5, -1; // move Y axis in negative direction with speed of 5ipm

    DO OTHER STUFF.....

    StopAxis X; // stop moving the X axis

    StopAxix Y; // stop moving the Y axis

     

    The MoveAxis command need to be ASYNCHRONOUS --- meaning, I need to start an axis moving, then do other things, and then some time later come back and stop its motion. StopAxis should probably be SYNCHRONOUS.

     

    "MoveAxis" and "StopAxis" are just suggested names.

     

     

     

  5. So far, I have found that my turn-around time for trying things is about 5 times faster using VB.NET and MONO than when I was using CPLC background programs. The compile time is much quicker and it is nice to not have to recompile/download the entire IDE project each time. I have not noticed any performance issues, but I suppose MONO is slower than running a CPLC. A debugger, agreed, would be great.
  6. I will give this a try --- where do I find the parameters for this method?

     

    BTW --- since you just showed me another method available, where do I get a list of all the methods available?

     

    If you or anyone has the DLLImport statements for these in C, that would work for me. I can convert to VB.

  7. I am doing the following for my definition --- it has to be at this location for compatibility reasons:

     

    #define AxesEnabled P249

     

    The code (in a VB.NET program running on MONO) I have is this:

     

    _

    Private Shared Function GetResponse(<[in](), MarshalAs(UnmanagedType.LPStr)> ByVal q As String, ByVal a As StringBuilder, ByVal maxlen As Int32, ByVal echomode As Byte) As Integer

    End Function

     

     

    Public Function GetPVarAddress(ByVal sVariableName As String) As Integer

    Try

    Dim sResponse As New StringBuilder("A", 4096)

    Dim sResponse2 As String

    Dim sResult() As String

    Dim sAddress As String

     

    Dim iResult As Integer

    iResult = GetResponse(sVariableName, sResponse, 512, 0)

    sResponse2 = sResponse.ToString()

    sResult = sResponse2.Split(New Char() {"="c})

    sAddress = Mid(sResult(1), 1)

    Return Integer.Parse(sAddress)

    Catch ex As Exception

    Console.Write("GetPVarAddress Error: " & ex.Message & vbCrLf)

    End Try

    End Function

     

     

  8. Wow --- funny that you should asking last week the very question that I have today.

    It appears that you are looking for addresses in a background C program where you have access to the pp_proj.h file.

     

    I am trying to do get the address of a P variable in a MONO vb program. GetResponse doesn't seem to return "PXXX=YY" for me.

     

    For instance, I have a variable called "AxesEnabled" which is at P249.

    If I pass "AxesEnabled" into GetResponse, I am getting the following:

    error #20: ILLEGAL CMD: AxesEnabled

     

    This same "AxesEnabled" returns P249=XX just fine in the Terminal Window and in GPASCII from the command line in Linux.

     

  9. It just happened again.

     

    I tried doing a $$$ reset from the terminal, but it came back with "PowerPMAC reset failed".

     

    At this point, my Terminal window from the IDE works fine, but I don't seem to be able to connect with Watch window, Motor Status window, etc.

     

    I can also TELNET into the Power PMAC just fine. But, GPASCII does not seem to work properly from the command line. I can type commands or queries, but I get no responses, and the commands don't seem to do anything.

     

     

     

  10. I am just logging this to see if it ever occurs for anyone else. Somehow I got in a state where the IDE terminal, watch window, compiler would not connect. At the same time, however, I could connect with TELNET from a "Windows Command Prompt", and I was able to successfully login from there. When I tried the Compile/Download, it said it could not connect to GPASCII.

     

    To get out of this condition, I had to reboot the Power PMAC (POWER OFF). I would have tried "$$$", but I had no terminal to use.

     

     

×
×
  • Create New...