Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Register access in Register level programming(RPL)

I am using RLP for E series card. There is a class for DAQ-STC called 'tSTC' which provides access to individual registers and bitfields. The access is avaiable as setRegister and writeRegister. Can anyone explain the difference between the two and when are they used?
0 Kudos
Message 1 of 7
(9,614 Views)
The setRegister method updates only the softcopy of the register stored in the tSTC class. It does not update the registers on the card. To write the updated softcopy from memory to the hardware, you need to call the flush method. The writeRegister method combines the setRegister and flush methods into one call.
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 2 of 7
(9,600 Views)
Hi Christian,thanks for the information. This would mean that setRegister and writeRegister may be used interchangeably without any difference in functionality. Apart from this there are 2 methods each for write and set, for eg. writeAI_STOP_Sync() and writeRegister() and I understand that one is for each bit of register and one for the complete register. Is this correct?
0 Kudos
Message 3 of 7
(9,591 Views)
setRegister and writeRegister differ in that setRegister requires you to use the Flush method before anything is written to the register. So the are not interchangeable.

There are two different groups of methods to address each register. writeRegister addresses the whole register as one value, while methods like writeAI_STOP_Sync address one of the bit fields in a register. A bit field represents one logical value and may be one or more bits or a whole byte or word in a register.
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 4 of 7
(9,577 Views)
Thanks again Christian,

Comparing set and write methods, I meant that set() method followed by flush() is the same as single write() method call. Is this true? If it is then what is the reason behind presenting the same functionality in two forms. Otherwise what is the difference then?
Is there any document which lists the description of the methods exposed by various classes ?

pankaj
0 Kudos
Message 5 of 7
(9,558 Views)
In the case of applying these functions to the whole register there is no difference. The Set and Flsh functions are normally used only with the bitfield specific functions. To update multiple bitfields in a register, use the Set function for each bitfield and then flush all changes to the HW register ot once, rather than making multiple write operations to the HW register.

There is no specific reference document, but the list of methods per class is available in the header file.
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 6 of 7
(9,550 Views)
Hi Christian,
I am writing an RTX driver for 6229 M series card using Chip Object. Can you provide me with the register map of 6229 card to do the same?
Thanks
Pankaj
Message 7 of 7
(9,510 Views)