02-06-2013 02:09 PM
Hi
I wonder if someone could clarify something with regards to Registers using a Custom Control data type, and Arbitration.
I am trying to create a real-time clock that is continuously updated in one FPGA continuous loop, that is then read in another FPGA continuous loop. There is more details to this but are irrelevant to this question.
To represent the clock I decided to use a Register, which would store days, hours, minutes, seconds, milliseconds, microseconds fields as a custom control data type (a cluster). The problem is I do not trust the time values I am getting out.
One thing I am not clear about is the role of Register Arbitration.
Does arbitration of a custom control register prevent writing and reading occurring at the same time for all fields of the multi-field data type, or not? That is, if writing of a new time value occurs at the same time as reading, is the read or write blocked until update of ALL fields of the custom control register has completed? Or is the write/read piece-meal on a field-by-field basis? Is it possible for me to get a mix of an old and new time field values when relying on Register Arbitration to prevent the race condition?
Thanks for any help you can give. I have tried reading the help-file but there is a "Note" in it about custom-control typed Registers which utterly confuses me.
I am using LabVIEW 2012.
Solved! Go to Solution.
02-06-2013 04:22 PM
If you are storing the value in the control as a cluster, then the entire block of data is read or written atomically. The arbitration only applies if you have multiple readers or multiple writers to the same register.
02-07-2013 04:38 AM
Thanks for that answer. Just what I needed!