Jump to content
OMRON Forums

Data Logging


dholden
 Share

Recommended Posts

Has anyone needed to do any data logging in the PMAC and then push the data up to a file or better yet a SQL server? I have a process that i need to monitor at low frequencies (~once per second for half a dozen variables) and then push or pull data from the controller.

 

Just wondering how others have done this in the past.

 

Thanks

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I have successfully done something similar using VB.Net and the PCOMM server library.

 

Having a separate PC polling all the time can get a bit tricky though. For example you have issues with if the controller was on or off as well as if it went off unexpectedly, etc.

 

A good suggestion, just wondering what my other options might be.

Link to comment
Share on other sites

The controller is a Turbo PMAC in a rack, and no there is no PC close by. I have considered using a serial-to-ethernet converter to do something like what you are suggesting.

 

I guess all of this is more motivation to learn the Power PMAC as this would be very do-able with it I am sure.

Link to comment
Share on other sites

Instead of setting up a serial to Ethernet converter you can enable the Ethernet Modbus on the Turbo PMAC. I am using Modbus for my control interface. We have a Linux PC running the system and setting up Modbus was easier for our software development team. When I log data I have a ring buffer in the controller simply a block of P-Vars with as many data points as I need to insure are stored. I then have two p vars, which are locations in the array. One is the next point to store a value on the DT side. The other is the last value read over Modbus. I copy the P-Vars to Modbus memory in a single PLC so I know all of them update at the same time for the remote host. On the linux side I simply request the entire Modbus block of data. The data I am looking for is the section of the array between the two indexes. I then update the index value for the last read location over Modbus. From the DT side the Modbus memory is just mapped M-vars.

 

The nice thing about Modbus over Ethernet is that there are a lot of drives to support it.

Link to comment
Share on other sites

Like anything with PMAC there are many ways to perform data logging. For you application it seems we need to know how much time is required between when you machine is running and when you can plug a laptop or pc into the pmac to upload the data.

 

So far, you have not specified that. You can store data into variables but you are limited to 1024 P and 1024 Q variables. If you are storing 6 registers at once per second that limits you to about 5.68 minutes of data assuming you are not using any P or Q variables. You can also define user memory and store to those locations. You can then use simple GetResponses to load the data into data arrays using vb.net.

 

Another way to store data is to use the PMAC Data gather feature. The data gather feature using the unused user memory and is gathered in real time. The amount of user memory can be found by using the SIZE command. Lets say you have 30000 PMAC memory locations available in user memory. That means you have enough memory for 1.38 hours (6samples/sec). The data can then be uploaded using PMAC Plot or you can write your own routines to place the data into arrays to be processed later. PMAC Plot will also export the data tab delimited text files. The more user memory available the more data you can store.

 

CPU End of User memory *Size Command CPU Command

5C0 $107FF 26623 56303

5E0 $1C000 73727 56311

5F0 $23FFF 106495 56321

5x3 $3FFFF 221183 56303, 56311 or 56321 (5DC3, 5E3, or 5F3)

 

* Data shown at factory defaults with no programs. Data represents one X/Y memory location (48-bit or 6 bytes).

Example for 5E0: SIZE =$1C000-$A000 = $11FFF = 73727 decimal

 

I hope this helps.

Link to comment
Share on other sites

Big mistake... Turbo has 8192 P and Q vars so that buys you alittle more time...about 45.51 minutes not 5.68... Sorry.

 

Like anything with PMAC there are many ways to perform data logging. For you application it seems we need to know how much time is required between when you machine is running and when you can plug a laptop or pc into the pmac to upload the data.

 

So far, you have not specified that. You can store data into variables but you are limited to 1024 P and 1024 Q variables. If you are storing 6 registers at once per second that limits you to about 5.68 minutes of data assuming you are not using any P or Q variables. You can also define user memory and store to those locations. You can then use simple GetResponses to load the data into data arrays using vb.net.

 

Another way to store data is to use the PMAC Data gather feature. The data gather feature using the unused user memory and is gathered in real time. The amount of user memory can be found by using the SIZE command. Lets say you have 30000 PMAC memory locations available in user memory. That means you have enough memory for 1.38 hours (6samples/sec). The data can then be uploaded using PMAC Plot or you can write your own routines to place the data into arrays to be processed later. PMAC Plot will also export the data tab delimited text files. The more user memory available the more data you can store.

 

CPU End of User memory *Size Command CPU Command

5C0 $107FF 26623 56303

5E0 $1C000 73727 56311

5F0 $23FFF 106495 56321

5x3 $3FFFF 221183 56303, 56311 or 56321 (5DC3, 5E3, or 5F3)

 

* Data shown at factory defaults with no programs. Data represents one X/Y memory location (48-bit or 6 bytes).

Example for 5E0: SIZE =$1C000-$A000 = $11FFF = 73727 decimal

 

I hope this helps.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...