Jump to content

Recommended Posts

Posted

Hello,

 

I am designing a rig for a very fast, time sensitive experiment. The end result is to have a plot with pressure change versus time, so it needs to measure on the order of miliiseconds.

 

I have a Vision 570, and the newest software. I already am able to take ~10 ms increment data and store it into a data table. Is there any way to record the RTC in milliseconds and store that in the data table as well? The system Integers don't seem to have that precision. Note: I do NOT want the scan time resolution, I want the actual time the data point is being taken, so I will need either a timer or real time clock that has this precision.
 

Thanks in advance!!

Posted

Hello,

 

The RTC does not include a time resolution in milliseconds, but as you mentioned this should be possible with the use of a timer. You can utilize the Load Timer Current function to reference a timer and store the value into a ML. Please note that the value being stored is in units of 10ms. For example if 250ms have elapsed the value being stored into the ML will read as 25. This can be easily corrected by multiplying the value by 10.

 

Also important is that the timer that you are running is synced to the RTC. You don't want it running ahead or behind the current RTC value in seconds. One solution to solve this is to start the timer only when the current RTC value is seconds is 0 and reset it once the timer is complete. Logic used to write the RTC date, time, and current value in milliseconds is shown below.

 

10ms Resolution Data Table

Posted

Thank you, this helped a lot!!

 

One more quick question that came up, is there a way to write an instruction in the code itself to reset every possible MB bit to 0, like you would if you initialized the PLC in info mode?

Posted

Hello,

 

If you wish to reset and initialize the whole controller, you could set SB 24 and reset it off of the power-up bit (SB 2).  If you only wish to reset the MBs, you could perform a vector store from MB 0 for 8192 MBs(or 4095 MBs depending on your controller) storing a value of SB 0 (always 0).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.