Jump to content
OMRON Forums

PComServer, PVT data streaming to Geobrick


rhombusvs
 Share

Recommended Posts

Hi I am being a bit Dim here but... This is what I am trying to achieve... I have a host PC running a pcomserver User HMI This application controls the "operational state" of a geobrick with 4K of DPRAM. After running several set up and test applications, the user can put the system in to a "streaming" mode. In this mode the Geobrick waits for upto 6 axes of PVT data to be streamed at it (ABCXYZ) - from a different application on a different PC. I also need to monitor the input demand so that I can clip any outrageous demands The user inteface and the geobrick code for all the utility functions is fine. However I am struggling to find a working method for the streaming. My initial concept was to open a rot buf on the geobrick, set up the PVT and then send data to it using pmacGetResponse from the stream PC. This does not work. I think I need to use the DPRAM and here I show my ignorance as I am not sure how. Ideally I think on the geobrick side I would set up some M variables (2 per axis - P & V) which pointed to the DPRAM. I would then have a motion buffer monitoring for a full set of data in these M vars and parse these values into some q vars which are used as the P & V in the PVT eg in psuedo code Prog 1 clear p1000=1 PVT(10) While p1000=1 if (new Mdata available) QvarPos =clip(MvarPos) QvarVel =clip(MvarVel) X(QvarPos ):(QvarVel ) endif .. End while dwell 0 Close This would mean from the User HMI I can do all my house keeping and then to put it into Streaming mode by running the above program when I set p1000=0 from the user HMI I can drop out of the motion buffer. What I am not clear about is how I put the data into the DPRam from the Pcomserver Streaming application and then make sure I access the correct DPRam space in the Geobrick. I have Read the manual and I am still struggling.
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

First no dim question for sure... only dim or dumb question is the one you don't ask... in fact this is a good one. One way to achieve what I think you want is like this: -setup Binary Rotary Buffer - this uses the DPram for the rotary buffer -on the PMAC side have some PLC that initializes the buffer, opens it and sets the CS to RUN -Now the buffer is OPEN and ready to run, nothing is happening because there is nothing in the buffer -Now on the HMI side you can start to put data in the buffer -as you put each line in the CS will execute the moves -obviously if you put the moves in quicker then it can execute the buffer will fill up, you can watch this and control on your HMI when you add more lines to execute -if the HMI stops sending data... the CS will simply stop at end of last move and wait for more... -this will continue until you tell the CS to Abort running the program and close the buffer .... I have done this exact application on several CNC type machines and it works perfectly... it allows you to stream the data and have in my case NC files that are huge with 100,000's lines to execute Attached is a VS2005 C# sample application that shows how to setup and use the Binary Rotary Buffer, it also shows how to watch the buffer and stop sending when it fills up. Run the example, select the Binary buffer type and select the Large CNC file for example... it has 1000's of lines... from this example you should be able to do as I mentioned above... If you need more help let us know. You can contact me directly at mesposito@deltatau.com
Link to comment
Share on other sites

[quote='Unit101' pid='669' dateline='1282938977'] First no dim question for sure... only dim or dumb question is the one you don't ask... in fact this is a good one. One way to achieve what I think you want is like this: -setup Binary Rotary Buffer - this uses the DPram for the rotary buffer -on the PMAC side have some PLC that initializes the buffer, opens it and sets the CS to RUN -Now the buffer is OPEN and ready to run, nothing is happening because there is nothing in the buffer -Now on the HMI side you can start to put data in the buffer -as you put each line in the CS will execute the moves -obviously if you put the moves in quicker then it can execute the buffer will fill up, you can watch this and control on your HMI when you add more lines to execute -if the HMI stops sending data... the CS will simply stop at end of last move and wait for more... -this will continue until you tell the CS to Abort running the program and close the buffer .... I have done this exact application on several CNC type machines and it works perfectly... it allows you to stream the data and have in my case NC files that are huge with 100,000's lines to execute Attached is a VS2005 C# sample application that shows how to setup and use the Binary Rotary Buffer, it also shows how to watch the buffer and stop sending when it fills up. Run the example, select the Binary buffer type and select the Large CNC file for example... it has 1000's of lines... from this example you should be able to do as I mentioned above... If you need more help let us know. You can contact me directly at mesposito@deltatau.com [/quote] Thanks Unit101 This gives me loads of info. A perfect example of how to use the DPRAM I'm not going to use the binary buffer but this has helped me understand how to set the Mvars up and send both floats and bit data to and from the DPRAM Graeme
Link to comment
Share on other sites

[quote='Unit101' pid='676' dateline='1283353135'] Great... you are very welcome. Let us know if need more ideas or support. Cheers... [/quote] Why is life never simple! I now totally get how to talk to the DPRam but I'm now getting an issue with the program I'm trying to get it to process. To see it it was how I've implemented it, I modified the PComm2 Application so that instead of loading an NC file I create a sinusoid for one of my axes and loaded this into the ncCodeArray, I am using a binary rot buffer... string myString = "PVT(20)"; ncCodeArray.Add(myString); do { myString = " "; pdApos = (Math.Sin(piAngle * Math.PI / 180) * 5); pdAvel = (Math.Cos(piAngle * Math.PI / 180) * 0.1); psApos = pdApos.ToString("0.00"); psAvel = pdAvel.ToString("0.00"); myString = myString + "A" + psApos + ":" +psAvel; myString = myString + "B0:0"; myString = myString + "C0:0"; myString = myString + "X0:0"; myString = myString + "Y0:0"; myString = myString + "Z0:0"; BufferTextBox.Items.Add(myString); ncCodeArray.Add(myString); piAngle++; } while (piAngle < 361); Effectively my A axis is a Roll goniometer, I also have a pitch and yaw axis plus XYZ linear. What I am seeing is a continuous judder in the motion, instead of a nice smooth sinusoid. The Judder appears to be a result of the axis stopping at the end of each move rather than moving seemlesly into the next PVT move in the buffer. If I increase the max speed of the move from 0.1 to 0.5 I can see the axis backing up to give itself room to get up to the end speed I have specified for the PVT move. I also obsever that after sin(90) i.e. the the axis starts its first return towards 0, I get a status=1 reply from Pmac.DPRAsciiStrToRotEx() which never clears. Any Ideas?
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...