User`s manual

Writing Custom Applications
EEProm Access
Each PMC module contains an IDROM region that can be used to read or write information associated with the module. In
the next line of code we make a call to Malibu method IdRom(), which returns an object that acts as interface to that region.
We further can query the ROM for its contents. Additional methods can be used to get more specific information.
//---------------------------------------------------------------
// System::Void LoadFromRomButton_Click()
//---------------------------------------------------------------
private: System::Void LoadFromRomButton_Click(System::Object^ sender, System::EventArgs^ e)
{
Io->ReadRom();
// Then test the information.
...
}
//---------------------------------------------------------------------------
// ApplicationIo::ReadRom() -- Read rom using relevant settings
//---------------------------------------------------------------------------
void ApplicationIo::ReadRom()
{
Module.IdRom().LoadFromRom();
Settings.ModuleName = Module.IdRom().Name();
Settings.ModuleRevision = Module.IdRom().Revision();
for (int ch = 0; ch < Channels(); ++ch)
{
Settings.AdcGain[ch] = Module.Input().Gain(ch);
Settings.AdcOffset[ch] = Module.Input().Offset(ch);
}
Settings.Calibrated = Module.Input().Calibrated();
}
There is also a mechanism to write to the on-board EEPROM.
//---------------------------------------------------------------------------
// ApplicationIo::WriteRom() -- Write rom using relevant settings
//---------------------------------------------------------------------------
void ApplicationIo::WriteRom()
{
Module.IdRom().Name(Settings.ModuleName);
Module.IdRom().Revision(Settings.ModuleRevision);
for (int ch = 0; ch < Channels(); ++ch)
{
Module.Input().Gain(ch, Settings.AdcGain[ch]);
Module.Input().Offset(ch, Settings.AdcOffset[ch]);
}
X5-GSPS User's Manual 57