Jump to content
OMRON Forums

BoneSkier

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by BoneSkier

  1. I actually need this to be at location 249 due to compatibility issues with our HMI. I also have other variables at fixed locations.
  2. 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
  3. 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?
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. Were you able to get this working?
  9. 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
  10. 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.
  11. Sina looked at this with me. We found that the Soft Watchdog had errored (Sys.WDTFault=1). Suspect that something in my CPLC could have caused this. Did "reboot" from terminal to reboot LINUX. Everything came up normally.
  12. I have saved it in the broken state for you if you want to look at it this time. I do compile Background C programs, but otherwise it is just PLC programs that would be running (which also don't seem to be doing anything). I am also now running a MONO program, compiled with Visual Studio.
  13. 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.
  14. If it ever happens again....yes, I can check more things like GPASCII.
  15. 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.
  16. In the Power PMAC IDE, right click on a project folder. Select "Exclude From Project". The project disappears (I expected it to just be grayed-out), and then there is no mechanism for including the project again.
  17. I just excluded a project from the IDE. When I did so, the project completely disappeared from the IDE, and there is no apparent way to Add Existing Project. So, now, how do I get my project back?
  18. 1. Is there a mechanism for sending a message (like SEND or CfromScript) from a PMAC SCRIPT program to a MONO program (C#)? 2. Is there a mechanism for sending a message from a PMAC PLC to a MONO program?
  19. Thanks for the tips KEJR. I am brand new to MONO, and a bit rusty on C# (I usually do VB.NET). So, pardon my ignorance, but where do MessageBox.Show statements go to in your PMAC class? Do you need to include a system DLL for this? Is it just System.Windows.Forms that I need? And, where does it display?
  20. It looks like the import statements are not trivial. Has anyone done imports of other methods besides the 3 Brad has here?
×
×
  • Create New...