BoneSkier Posted November 14, 2011 Posted November 14, 2011 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
KEJR Posted November 14, 2011 Posted November 14, 2011 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: Can you auto define the variable using the "global" keyword, or do you need the variable explicitly defined to P249? I've used global extensively with Mono without problems. The fact that it behaves "differently" with the #define is interesting. Maybe some under the hood glue that is not present in the C environment, (which is what you are accessing when you do dllimport in the MONO environment). KEJR
BoneSkier Posted November 14, 2011 Author Posted November 14, 2011 I actually need this to be at location 249 due to compatibility issues with our HMI. I also have other variables at fixed locations.
Omron Forums Support Posted November 16, 2011 Posted November 16, 2011 Are you running the program on PowerPMAC ? What do mean "running with MONO"? Are you using mono tools from the IDE and using option Run in Mono? Or are you uploading the .Net app on PowerPMAC and then use Mono to run the App on PowerPMAC? we tested ...#Define the variable "Test" in project and then downloaded to PowerPMAC. In HMI called getresponse and read the variable "Test" and got correct value of Test. HMI uses communication library. Then the App is uploaded to PowerPMAC and then run the app using Mono and it still read the "Test". Thanks, Atul
BoneSkier Posted November 29, 2011 Author Posted November 29, 2011 I am running the app on the Power PMAC using MONO. Did you define your variable like this? #define EnclosureInterlocksOK P10
Recommended Posts