kash Posted January 28, 2015 Share Posted January 28, 2015 Is it possible to read/write the value of an address directly through the Pcommserver.exe? Now, I have a C# program where I am doing something like string plcDisabledBitAddress = "Y:$0031" + plc + ",22"; pmacDevice.GetResponseEx(0, "m8008->" + plcDisabledBitAddress, false, out answer, out status); pmacDevice.GetResponseEx(0, "m8008", false, out response, out status); return response == "0"; which is not optimal for a number of reasons, mainly because m8008 could be used by the user without my program knowing. Link to comment Share on other sites More sharing options...
Omron Forums Support Posted January 29, 2015 Share Posted January 29, 2015 Yes, use the RY or RX commands in a string in a GetResponse command to read and W{Address} to write. See the entry on page 403 of the Turbo Software Reference Manual. Here's the excerpt pasted roughly: W{address} Function: Write values to a specified address(es). Scope: Global Syntax: W{address},{value} [,{value}...] where: {address} consists of a letter X, Y, or L; an option colon (:); and an integer value from , $000000 to $FFFFFF (0 to 16,777,215); specifying the starting Turbo PMAC memory or I/O address to be read; {constant} is an integer, specified in decimal or hexadecimal, specifying the value to be written to the specified address; further {constants} specify integer values to be written into subsequent consecutive higher addresses This command causes Turbo PMAC to write the specified {constant} value to the specified memory word address, or if a series of {constant} values is specified, to write them to consecutive memory locations starting at the specified address (it is essentially a memory POKE command). The command can specify either short (24-bit) words in Turbo PMAC’s X-memory, short (24-bit) words in Turbo PMAC's Y-memory, or long (48-bit) words covering both X and Y memory (X-word more significant). This choice is controlled by the use of the X, Y, or L address prefix in the command, respectively. Example: WY:$078002,4194304 ; This should put 5V on DAC2 ; (provided I200=0 so servo does not overwrite) WY$003501,$078000,$078004,$078008,$07800C ; This writes the first four entries to the ; encoder conversion table See Also: On-line command R[H]{address} Memory and I/O Map Link to comment Share on other sites More sharing options...
kash Posted February 19, 2015 Author Share Posted February 19, 2015 Thanks. I also took the opportunity to update my manual from 2012. Link to comment Share on other sites More sharing options...
Recommended Posts