Jump to content
OMRON Forums

fahmad

Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

fahmad's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. In Pro2 library, PcommServer is the core engine and has all the required functions for data transfer between PMAC and host computer. Pcomm32W.dll contains few functions such as Open(), close and GetResponse() etc and provides support for only some legacy applications. No new applications should be developed using Pcomm32W.dll. This is why there is no documentation and no example programs available for Pcomm32W.dll. Pcommserver based software development kit supports all modes of communication and provides plenty of sample programs for VB, C# and C++ environments. Please refer to PcommServer manual for attaching to GetMem() and SetMem() methods for data transfer between PMAC controller and host computer.
  2. After I posted the response I noticed that this text box ate all my control characters Correct sequence of response with I3=2 is (I removed <> around the control characters) With I3=2: P1..3 CR ...... ; Valid command requiring data response 25 CR 50 CR 75 CR ACK ; PMAC responds with requested data
  3. After I posted the response I noticed that this text box ate all my control characters Correct sequence of response with I3=2 is (I removed <> around the control characters) With I3=2: P1..3 CR ...... ; Valid command requiring data response 25 CR 50 CR 75 CR ACK ; PMAC responds with requested data
  4. PMAC's handshake control variable I3 controls handshake characters that come back from PMAC along with the response. For I3=2 (Pewin32Pro2 default), response to multiple queries are as follows: With I3=2: P1..3...... ; Valid command requiring data response 255075 #1J+........ ; Valid command not requiring data response ....... ; Acknowledging character UUU .......... ; Invalid command ............. ; PMAC reports error It is responsibility of caller to handle all control characters. TextBox does not add line with . In GetResponseEx() if you pass the bAddlf flag as TRUE then it will replace with . See the code bellow from PcommServer getResponseEx() function. rret = GetLineEx( dwDevice, str, 255); cc = COMM_CHARS(rret); if(cc > 0) { // Change '\r' or add linefeed if requested if(bAddLF && str[cc - 1] == '\r') str[cc - 1] = '\n'; ret += cc; answer += str; }
  5. PMAC's handshake control variable I3 controls handshake characters that come back from PMAC along with the response. For I3=2 (Pewin32Pro2 default), response to multiple queries are as follows: With I3=2: P1..3...... ; Valid command requiring data response 255075 #1J+........ ; Valid command not requiring data response ....... ; Acknowledging character UUU .......... ; Invalid command ............. ; PMAC reports error It is responsibility of caller to handle all control characters. TextBox does not add line with . In GetResponseEx() if you pass the bAddlf flag as TRUE then it will replace with . See the code bellow from PcommServer getResponseEx() function. rret = GetLineEx( dwDevice, str, 255); cc = COMM_CHARS(rret); if(cc > 0) { // Change '\r' or add linefeed if requested if(bAddLF && str[cc - 1] == '\r') str[cc - 1] = '\n'; ret += cc; answer += str; }
  6. The best way to communicate with Turbo PMAC while having Pewin32Pro2 active is to use PcommServer.exe (Pcomm32Pro2 library). Pcommserver.exe is a COM Interface. It does have wrapper dll (Pcomm32W.dll). The wrapper dll has some (not all) core functions exposed for external applications. Pcommserver.exe (Pcomm32Pro2 library) is a purchasable product with Delta Tau part number 3A0-9PPRO2-35x. I comes with multiple examples in Microsoft C++, C#, VB, and CBuilder along with complete documentation. I have attached a sample template for PcommServer based example using C++ for your reference. Farooq BinRotLoad.zip
  7. The best way to communicate with Turbo PMAC while having Pewin32Pro2 active is to use PcommServer.exe (Pcomm32Pro2 library). Pcommserver.exe is a COM Interface. It does have wrapper dll (Pcomm32W.dll). The wrapper dll has some (not all) core functions exposed for external applications. Pcommserver.exe (Pcomm32Pro2 library) is a purchasable product with Delta Tau part number 3A0-9PPRO2-35x. I comes with multiple examples in Microsoft C++, C#, VB, and CBuilder along with complete documentation. I have attached a sample template for PcommServer based example using C++ for your reference. Farooq
  8. Gilles, There are several timeout values for socket timeouts. #define FLUSH_SOCKTO 250 #define SENDLINE_SOCKTO 500 #define GETBUFFER_SOCKTO 2000 //(This is a 2 second wait time while receiving data from PMAC before you get an error message) #define GETSETMEM_SOCKTO 500 #define SENDCHAR_SOCKTO 250 #define INPORT_SOCKTO 500 #define FLUSH_TIMEOUT 10 Can you also tell me what version of Pcomm32 library ( Pro or Pro2) are you using? Farooq
  9. Gilles, The socket timeout message pops up if the communication is lost and is not re-configurable unless we recompile Pcomm32. What needs to be investigated is why the communication is lost in the first place. Farooq
  10. "getsends" has been replaced with new process "sendgetsends". This process can send and receive messages on 8 ports Port0 - Port7. Latest PowerPMAC IDE (due to be released withing this month) supports all 8 ports. From within the IDE, Port0 is enabled by default for debug messages and all other ports are disabled at startup. These ports port1-port7 are available for users' messages. Further, if the port is in use then user gets a port-busy error message and will not be able to connect to it until previous client has closed the connection. Although "sendgetsends" is an independent process, I will update everyone after talking to Ed Lay regarding load issue.
  11. Scott, During your installation a vital library "msflxgrd.ocx" failed to register. There could be two reasons for for this error. Either Pewin32PRo2 Suite installation was done as normal user and NOT as and administrator or Computer did not restart properly after installation before launching Pewin32PRo2 executable To resolve the problem do the following: 1. Remove previous installation and re-install Pewin32PRo2 Suite with administrative privileges and restart the computer, if the problem does not go away then 2. Launch command Window with administrative privileges and issue the command regsvr32 C:\Windows\System32\msflxgrd.ocx (32-bit Windows) or regsvr32 C:\Windows\SysWow64\msflxgrd.ocx (64-bit Windows) This should resolve the issue. Farooq
  12. Raghav, The latest Installation of Pewin32PRO2 is true for 32-bit as well as 64-bit operating systems. It is available on Delta Tau's website under software downlaods at following URL. http://www.deltatau.com/DT_Products/SoftwareDetails.aspx?CatID=500-PMAC%20EXECUTIVE%20PRO2%20SUITE Also, look at the 64-Bit update NOTE. http://www.deltatau.com/Common/Product%20Bulletins/Updates/PMAC%20Executive%2064-Bit%20Drivers%20upgrade.pdf
  13. Error4 comes back from PMAC if you send some (erroneous) binary number on the socket. Please check your code and make sure that no such number is being transmitted to PMAC. Also look at the following sequence for correct method to connect to a socket and use the VR_PMAC_GETRESPONSE call. typedef struct tagEthernetCmd { u_int8_t RequestType; u_int8_t Request; u_int16_t wValue; u_int16_t wIndex; u_int16_t wLength; u_int8_t bData[1492]; } ETHERNETCMD,*PETHERNETCMD; #define ETHERNETCMDSIZE 8 #define VR_PMAC_GETRESPONSE 0xBF #define VR_UPLOAD 0xC0 #define VR_DOWNLOAD 0x40 int result,sock,length; struct sockaddr_in client; ETHERNETCMD EthCmd; char cCommand[256],cResponse[2048]; printf("PMAC Ethernet communication test\n"); sock = socket (PF_INET,SOCK_STREAM, 0); client.sin_addr.s_addr = inet_addr("192.6.94.5"); client.sin_family = PF_INET; client.sin_port = htons(1025); length = sizeof(client); result = connect (sock,(__CONST_SOCKADDR_ARG)&client, (socklen_t)length); if(result ==0) printf("connect successful\n"); else printf("connect failed with result = %d\n",result); EthCmd.RequestType = VR_DOWNLOAD; EthCmd.Request = VR_PMAC_GETRESPONSE; EthCmd.wValue = 0; EthCmd.wIndex = 0; strcpy(cCommand,"RHX$0"); EthCmd.wLength = htons((u_int16_t)strlen((const char*)cCommand)); strncpy(&EthCmd.bData[0],cCommand,strlen(cCommand)); printf("Attempting Get Response\n"); send(sock,&EthCmd,ETHERNETCMDSIZE + strlen(cCommand),0); recv(sock,cResponse,1400,0);
  14. This message appears when serious communication error occurs due to following reasons 1. Unplug or other wire breaks Sol: Make sure that all wires are good and connections are tidy. Also, you can eliminate any switch or hub issue by replacing the extra hardware by a single crossover cable. 2. Pmac is non-responsive due to watchdog tripping or excessive servo load Sol: Check the status of watchdog LED (red) when problem occurs. Normal mode is OFF. Also, try to turn off PLCs and run your test again. You can achieve it by simply setting I5=0 I hope it helps Farooq
  15. Unsolicited Event is an Async Event. To launch the application user must specify which port to listen to. User can specify any or all of the available ports (0 thru 4). Once the applications is running, Power PMAC Firmware will scan the connected ports every millisecond and send messages to the user immediately. There is no delay at this point. PowerPMACIDE can be used as benchmark test for reliability and speed of these messages.
×
×
  • Create New...