Home
PowerDNA API Reference Manual
Contents
1. DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels uint32 eel pointer to channel list uint32 bData pointer to raw data received from device double fData pointer to store converted voltage data NULL if not required Output uint32 bData raw data received from device double fData converted voltage data Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 211 DQ_BAD_PARAMETER CLSize isnot between and DO_MAXCLSIZE bData is NULL or a channel number in c1 is too high DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it according to the channel list supplied This function uses a fixed CL update frequency 1953Hz Thus the user cannot perform this function call when the layer is involved in any streaming or data mapping operations If the user spe
2. Note None 4 4 2 DgAdv208SetControl Syntax int DgAdv208SetControl int hd int devn uint32 control uint32 value uint32 data Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 control what to set uint32 value value to write uint32 data pointer to output data pass NULL if you don t need it For DOL_IOCTL208 SET Ra and DQL_IOCTL208_SET_Rb to switch shunt calibration on set data to TRUE Output uint32 data output data generally the value written or undefined data Return DO NO MEMORY error allocating buffer DQ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 208 DQ_BAD_PARAMETER control isnot one of the valid DOL IOCTL208_SET constants DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description 124 PowerDNA API Reference Manual Release 4 0 This function allows setting up different internal parameters The following sub functions are available selected by control Note Set data to TRUI DOL TOCTL208 SI S DQL_IOCTL208_S
3. define DQ _NOERROR 0 no error encountered define DQ SUCCESS 1 success define DQ_ILLEGAL_ENTRY 1 illegal entry in parameters define DQ_ILLEGAL_HANDLE 2 illegal IOM handle index define DQ_SOCK_LIB_ERROR 3 socket error define DQ_TIMEOUT_ERROR 4 command returns upon timeout define DQ _SEND_ERROR 5 packet sending error define DQ_RECV_ERROR 6 packet receiving error define DQ _IOM_ERROR 7 IOM reports an unrecoverable error define DQ _PKT_TOOLONG 8 too much data to fit a packet define DQ_ILLEGAL_PKTSIZE 9 packet size too small or too large define DQ_INIT_ERROR 10 IOM initialization error define DQ_BAD_ PARAMETER 11 Invalid parameter passed define DQ _BAD_DEV 12 incorrect DEVN define DQ_NOT_IMPLEMENTED 13 bad luck not implemented yet define DQ NO MEMORY 14 not enough memory define DQ _NOT_ENOUGH_ROOM 15 not enough room in the packet structure define DQ _DEVICE_BUSY 16 somebody else uses this device define DQ _EVENT_ERROR 17 event handling error define DQ BAD CONFIG 18 bad configuration reported by DOQCMD_RDSTS define DQ_DATA_ERROR 19 layer returned invalid data define DQ_DEVICE_NOTREADY 20 device is not ready define DQ_CALIBRATION_ERROR 21 error while performing calibration define DQ_WRONG_DMAP 22 reques
4. Note The ADC data passes through FIRO first and FIR1 second FIRO may be set to use a maximum of 96 coefficients taps FIRT may be set to use a maximum of 416 taps The decimation setting of FIRO must always be set in the range of 3 to 7 4 7 6 DgAdv224SetNullLevel Syntax int DgAdv224SetNullLevel int hd int devn uint32 channel double level Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 channel which channel to set values O thru 3 double level desired null level in volts 10V max Output none Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 224 DQ_BAD_ PARAMETER channel is not in range 0 3 level is greater than 10 0 or less than 10 0 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets the nulling voltage and will null at gains up to 40 Note that the voltage measured on S S will move in the opposite direction from a change in null voltage Thus you need to raise the null voltage if the measured S S volta
5. Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AO 358 DO DAD PARAMETER channel number in channel list is not a valid AO 385 channel number DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function is used to write either floating point or raw values to the AO 358 This function works using an underlying DgCmdIoct1 It uses aDQCMD_IOCTL command with a DOIOCTL_CVTCHNL function under the hood When this function is called for the first time the firmware stops any ongoing operation on the device Then the firmware parses the channel list and writes the passed values one by one accordingly Note None 4 12 3 DqAdv358ReadADC Syntax int DgAdv358ReadADC int hd int devn int CLSize uint32 cl uint32 bdata double fdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize channel list size uint32 cl1 0 channel list channel numbers Output uint32 bdata array
6. double scaledBuffer int bufferSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP to read from int dev ID of the device where the channels are located int bufferSize Number of elements in scaledBuffer Output double scaledBuffer The buffer containing the scaled data Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Read and scale data stored in the input map for the specified device Note The data read is the data transferred by the last call to DgRtDmapRefresh This function should only be used with devices that acquire analog input data such as the AI 2xx series layers 3 4 8 DgRtDmapReadRawData16 Syntax int DgqRtDmapReadRawDatal6 int handle int dmapid int dev unsigned short rawBuffer int bufferSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP to read from 70 PowerDNA API Reference Manual Release 4 0 int dev ID of the device where the channels are located int bufferSize Number of elements in rawBuffer Output unsigned short rawBuffer The buffer containing the raw data Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there
7. Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 sync_line DQ_EXT_INTO IS lt NIS sync 0 DO EXT TINTI IS lt NIS sync 1 uint32 signal DQ_EXT_START_TRIG Start trigger clock output when started DQ_EXT_STOP_TRIG Start trigger clock output when started DQ_EXT_CLIN Input channel list clock data from ZS DQ_EXT_CLOUT Output channel list clock data to ZS DQ_EXT_CVIN Input conversion clock data from ZS DQ_EXT_CVOUT Output conversion clock data to IS DQ_EXT_TSTD Time stamp timebase DQ_EXT_CLOCK TMRO DQ_EXT_BURST TMRI DQ EXT_SYNCO SYNCx line DQ_EXT_SYNC1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DO DAD PARAMETER sync_line or signal has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function selects the direction and signal assignment for the ISO line Note See the layer hardware description for a full description of the channel list implementations 4 33 5 DqgAdvAssignSyncx Syntax int DgqAdvAssi
8. Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 channel Channel to apply mode to uint32 mode Mode of operation uint32 flags Flags defining valid parameters pDO254SetExt params Parameters Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 254 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function allows setting up additional parameters for AI 254 layer It is not necessarily to call this function if you would like to rely on default settings Three parameters can be changed as defined in the following structure typedef struct uint32 PositionAvg Set moving average window size 0 1 8 256 uint32 MinMax Avg Set min max window size 0 1 8 256 uint32 ZeroCrossing JI Set zero crossing window 0 1 6 64 DQ254SetExt pDQ254SetExt lt flags gt define valid parameters If a flag is set then parameter is valid and used if not set it is ignored DQ_AI254_MODE_SETAVG Set position calculation moving average 0 1
9. DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOUSUCCESS successful completion Other negative values low level IOM error Description This function selects the direction and signal assignment for external D O line Note This function gives control on the direction state and routing of the D O lines on the isolated side This function can be used alone to select the digital line state and the direction or together with DqgAdvAssignIsoSync lines to assign signals to the JNTx lines on the non isolated side The default signal allocation depends on the number of external DIO lines available as shown in the following table Number of lines available on the Clock In Trig In DIO1 Clock Out Trig Out DIO3 layer 4 AI 205 D 3 AL 201 AI 225 ad es 2 AO 302 DIO 403 1 AL 208 Lon IL The EXTO and EXT lines are always assigned to DIOO and DIO1 If you select any of these DIO lines as an input signal from DIOO it will be translated to EXTO and so on 4 33 4 DqAdvAssignisoSync Syntax 373 PowerDNA API Reference Manual Release 4 0 int DgAdvAssignIsoSync int hd int devn uint32 sync_line uint32 signal
10. Command DQE Input PDQE pDge pointer to the previously created instance of DQE int iom handle to IOM received from DgOpenIOM uint32 devn layer inside the IOM uint32 ss subsystem of layer pDOBCB pBcb pointer for BCB structure Output pDOBCB pBcb newly allocated BCB structure Return DQ_NO_MEMORY memory allocation error DO DAD PARAMETER NULL or 0 as a parameter DQ_BAD_DEVN no device at given index or device does not support ACB mode DQ_ILLEGAL_HANDLE invalid non NULL value for iom DQ_DEVICE_BUSY layer already taken BO SUCCESS successful completion Description This function allocates a new ACB type BCB structure and links it with DQEngine and the IOM specified Note None 3 2 2 DgAcbDestroy Syntax int DgAcbDestroy pBCB pBcb Command DQE Input pDOBCB pBcb pointer to a previously allocated ACB Output None Return DQ_ILLEGAL_HANDLE pBcb is NULL ace PowerDNA API Reference Manual Release 4 0 DO DAD PARAM DQ_SUCCESS ET ER memory deallocation error successful completion Description This function destroys a previously allocated ACB Note None 3 2 3 Dq
11. Syntax int DgAdvSetNetworkBuffers int hd int dev int ss int nbufs Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem e g DO_SSOIN int nbufs Number of IOM network buffers must be at least 2 Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_PARAMETER nbufs is less than 2 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function alters the number of network buffers allocated to each subsystem on the IOM During high speed low latency operations it may be necessary to increase the number of network buffers to prevent data loss This function cannot be called when the layer is involved in any streaming or data mapping operations Note This function is only needed if the scans per packet have been altered via DqAdvSetScansPerPkt 377 PowerDNA API Reference Manual Release 4 0 378
12. Input int Iom Handle to the IOM returned by DqgOpenIOM uint32 MinPktSize minimum size of UDP packet to send uint32 MaxPktSize maximum size of UDP packet to send Output None Return DQ_ILLEGAL_HANDLE invalid Descriptor DQ_ILLEGAL_PKTSIZE invalid value for MinPkt Size or MaxPktSize DQ_NO_MEMORY error allocating buffer DQ_SUCCESS successful completion Description The function sets up the minimum and maximum allowed sizes of UDP DaqBIOS packets Note The maximum size of a DaqBIOS packet including the DQPKT header is limited to 530 bytes 2 2 10 DgSetTimeout Syntax int DgqSetTimeout int Iom pDQE pDgqe int Timeoutms Input int Iom Handle to the IOM pDQE pDge DQ Engine pointer or NULL if not using DQE int Timeoutms timeout value in milliseconds Output None Return DQ_ILLEGAL_HANDLE invalid Descriptor DQ_BAD_PARAMETER Timeoutms is negative DQ_SUCCESS command processed successfully Description Changes the maximum allowed wait time for a reply packet IOM must be open Note If Dqe NULL the function sets the total timeout for every DQ command handled by DQE To calculate reply timeout the total timeout is divided by number of retries allowed If pDqe is not specified the function sets the timeout that applies only to the specified IOM 2 2 11 DqReadSrec Syntax int DqReadSrec char filename int relative uint32 size char but fer uint32
13. Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 clock DQ_EXT_CLOUT command output CL start DQ_EXT_CVOUT command output CV start DQ_EXT_CLIN command input CL start DQ_EXT_CVIN command input CV start uint32 source DQ_EXT_CLKIN EXTO DIOO default setting DO ENT ESO EXTO line source needs to be selected DO ENT EST EXTI line source needs to be selected DQ_EXT_SYNCO SYNCx interface line DQ_EXT_SYNC1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 uint32 edge DQ_EDGE_RISING DQ_EDGE_FALLING Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_ PARAMETER clock source or edge has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function selects the external clock source for the CL or CV clock Note The external clock shall be selected in the configuration If EX7x lines are used you have to select the source signal for the lines by calling DgAdvAssignIsoDio By default EXTO is assigned to DIOO and EXT is assigned to DIO1 4 33 2 DqAdvSetTriggerSou
14. Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int actions Enable 1 or Disable 0 Output Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ_BAD_PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function enables or disables 1553 operations for both channels 4 25 27 DqAdv553ReadRAM DqAdv553WriteRAM A DNx 1553 553 board has 16MB of SRAM located on the base board of the layer assembly This memory is used to store remote terminal and bus controller data The following two functions are service functionsthat allow you to access device memory directly int DAQLIB DgAdv553ReadRAM int hd int devn int channel uint32 memtype uint32 rt uint32 sa uint32 block uint32 size uint32 data int DAQLIB DgAdv553WriteRAM int hd int devn int channel uint32 memtype uint32 rt uint32 sa uint32 block uint32 size uint32 data The memory can be addressed either by using RT SA and block or by using direct addressing
15. In this example you want to receive messages with ID s 18FEEE0O 8FEF100 and OCF00400 and receive as few other messages as possible Ox18FEEE0O0 1000 1111 O 1110 1110 0000 0000 lay out the bits Ox18FEF100 000 11 1110 1111 0001 0000 0000 0x0CF00400 O 1100 0000 0000 0100 0000 0000 00 0 01 0111 0000 0000 Oxxx shift groupings left pad 7 SC 00 0 0 000 1000 0000 Oxxx 0110 0111 1000 0000 0010 0000 0000 Oxxx x1x0 01 xxx Oxxx xxxx x000 0000 Oxxx find what s common to all else x 0100 O 000 0000 0000 0000 0000 0000 make code take common Bie SCG Ses 10 478000 00 convert code to hex code is 0x47800000 1010 0000 0111 0111 1111 1000 0000 0111 make mask x s become 1 s L else 0 AO7 7 F 807 convert mask to hex 242 PowerDNA API Reference Manual Release 4 0 mask is 0xAO77F807 4 22 6 DqAdv503SetChannelCig Syntax int DgAdv503SetChannelCfg int hd int devn int chnl uint32 config Input int hd Handle to the IOM received from DqOpenIOM int devn int chnl Layer inside the IOM Channel to configure uint32 config Configuration flags Output None Return DQ_NO_MEMORY error allocating buffer DO _ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn d
16. DQ_ILLEGAL_HANDLE illegal pBcb DQ_IOM_ERROR IOM reports command execution error DQ_SEND_ERROR cannot send packet DQ_TIMEOUT_ERROR IOM reply wasn t received within timeout period DQ_NO_MEMORY memory allocation error DQ_INIT_ERROR error processing PowerDNA cube parameters DO_SUCCESS successful completion Description This function must be called when setting of DMap entries is complete to finalize it and configure the layer involved DqDmapInitOps parses the transfer list calculates parameters for configuration channel list trigger mode and clocks Then it sequentially calls DOCMD_SETCFG DOCMD_SETCL DOCMD_SETCLK and finally DOCMD_SETTRL Note None 3 3 3 DqDmapDestroy Syntax int DqDmapDestroy PBCB pBcb Command DQE Input pDOBCB pBcb pointer to a previously allocated DMap structure Output None Return DQ_ILLEGAL_HANDLE invalid pBcb DQ_BAD_ PARAMETER nothing to destroy or pBcb not a DMAP DQ_SUCCESS successful completion Description This function destroys all memory structures allocated with DgaDmapCreate and stops any ongoing DMap operations associated with this pBcb Note It is safe to call this function while DMap operation is running say in exception handler 3 3 4 Dg
17. Input int Iom Handle to the IOM returned by DqgOpenIOM Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR cannot send packet DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description Resets the device specified After this command a device considers itself initialized and switches to Init mode Note This command cannot be called in Operation mode A device does not return from reset immediately Device becomes unavailable for network operations until reboot approximately 5 10 seconds 2 2 17 DqCmdHwReset Syntax int DqCmdHwReset int Iom Command DQCMD_RST 0x110 Reset Device Input int Iom Handle to the IOM returned by DqOpenIOM Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR cannot send packet DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description Performs full hardware reset on the IOM specified After this command the IOM considers itself initialized and switches to Init mode Note This command cannot be called in Operation mode A device does not return from reset immediately A device becomes unavailable for network operation until reboot occurs approximately 5 10 seconds 3
18. DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_TOM_ERRO DQ_SUCCESS Other negative values Description ve illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a DIO 416 limitid is not in the range of 31 0 or current limit is above below DQ_L416_MAXCURRENT DQ_L416_MINURRENT unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function should be used to program the circuit breaker over and or under current limit on the DIO 416 layer Note The current limits should be set individually for the over and under current conditions on every channel Thus up to 32 calls of the DgAdv416SetLimit may be required to program the layer 4 17DNA DIO 432 433 layers 4 17 1 DqAdv432GetAll Syntax int DgAdv416GetAll int hd int devn pDQDIO432DATAIN data pDQDIO432CVTID fdata Command DQE Input int hd int devn Output PpDQDIO432DATAIN data pDQDIO432CVTD fdata Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERRO DQ_SUCCESS Other negative values Description ve Handle to the IOM received from
19. DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function is used to enable or disable the wireless interface installed on a CAR 550 Note None 4 24 DNA 429 566 512 ARINC 429 layers 4 24 1 DqAdv566BuildPacket DqAdv566ParsePacket Syntax uint32 DgqAdv566BuildPacket uint32 data uint32 label uint32 sdi uint32 ssm uint32 parity void DqAdv566ParsePacket uint32 packet uint32 data uint8 label uint8 sdi uint8 ssm uint8 parity Command None Input uint32 data Data 19 bit uint32 label Label 8 bit uint32 sdi SDI field 2 bit uint32 ssm SSM field 2 bit uint32 parity Parity 1 bit Output Assembled packet converted to ARINC 429 Holt3282 bit order DqAdv566BuildPacket Fields of parsed received packet DqAdv566ParsePacket Description These paired functions assemble an ARINC message out of individual fields for transmission and split a received packet into individual fields The function takes care of converting normal ARINC 429 data into the representation required by Holt3282 chip on DNA 429 566 layer Note None 246 PowerDNA API Reference Manual Release 4 0 4 24 2 DqAdv566BuildFilterEntry Syntax uint32 DgAdv566Build
20. Lob op wo OP w R H CH The following table summarizes the required connections between an AI 254 layer and an LVDT Wiring 4 wires 5 6 wires AOut Aln AOut Aln Input internal P1 and P1 S1 and S1 P1 and P1 S1 and S1 excitation connected to the connected to Vout connected to the connected to Va primary primary S2 and S2 156 PowerDNA API Reference Manual Release 4 0 connected to Vb Input external N C S1 and S1 N C S1 and S1 excitation connected to connected to Va Vout S2 and S2 connected to Vb S2 and S2 connected to external excitation Simulator P1 and P1 S1 and S1 Pl1 and P1 S1 and S1 external connected to connected to connected to connected to excitation InA and InA of Exc and Exc of InA and InA of Exc and Exc of the device the device the device P2 and P2 connected to InB and InB of the device the device Mode Internal excitation 4 5 6 wire LVDR RVDT DQ_AI254_MODE_INT 5 lt 5 6 wires DQ_A1I254_MODE_INT 4 lt 4 wires exc_rate 2600 exc_level 22 0 adc_rate 0 ret exc_level 11 8 0 DEVN CHANNEL exc_level _EXC_A lt specified excitation frequency lt specified excitation voltage from the datasheet gt returns actual sampling rate DgAdv254SetExcitation hd0 DQ_AT25
21. Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int32 line DQ_EXT_SYNCO DQ_EXT_SYNC2 DQ_EXT_INTO trigger source 0 to release Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_PARAMETER line has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function routes one of the SyncX lines as a Trigger Input for the layer or selects external trigger Note 4 32 11 DqAdvRouteTrigOut Syntax int DgAdvRouteTrigOut int hd int devn int line Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM intz Line all DQ_EXT_SYNC2 trigger destination layers 0 to release int line DQ_EXT_SYNCx counter timer 0 to release Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_PARAMETER line has a value other than the appropriate constants listed above DQ_SEND_ERROR una
22. module specific settings define DQ _LNCL_NEXT LUL lt lt 31 channel list has next entry define DQ _LNCL_INOUT 1UL lt lt 30 reserved for future use define DQ NCL Sol 1UL lt lt 29 reserved for future use define DQ _LNCL_SSO 1UL lt lt 28 reserved for future use define DQ_LNCL_IRQ 1LUL lt lt 27 reserved for future use define DQ_LNCL_NOWAIT 1UL lt lt 26 reserved for future use define DQ _LNCL_SKIP 1UL lt lt 25 reserved for future use define DQ_LNCL_CLK 1LUL lt lt 24 reserved for future use define DQ _LNCL_CTR 1UL lt lt 23 reserved for future use define DQ_LNCL_WRITE 1UL lt lt 22 write to the channel but not update define DQ_LNCL_UPDALL 1UL lt lt 21 update all written channels define DQ _LNCL_TSRQ 1UL lt lt 20 reserved for future use define DQ _LNCL_SLOW LUL lt lt 19 slow down operation define DQ _LNCL_DIO 1UL lt lt 18 write read DIO define DQ_LNCL_RSVD1 LUL lt lt 17 reserved for future use define DQ _LNCL_RSVDO 1UL lt lt 16 reserved for future use define DQ_LNCL_DIFF 1UL lt lt 15 differential mode define DQ_LNCL_GAIN G IG amp Oxf lt lt 8 set gain define DQ_LNCL_TIMESTAMP Oxff timestamp entry when used as a channel pAcbCfg Allocate and pass pointer to ACB structure Fields samplesz scansz framesize frames dir ACB description typed
23. Handle to the IOM received from DgOpenIOM Desired sampling rate Sync line to assign signal actual sample rate Required decimation factor for AI 211 layer requested sample rate is too high or too low unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error Description The PLL clock circuit on the CPU layer will be programmed and routed by this function The PLL may be routed by way of the sync 1 or sync 3 lines by using the DQ_EXT_SYNC1 or DQ_EXT_SYNC3 constants for the line parameter The AI 211 uses clock rates that are higher than the sampling rate and also uses decimation to reduce the effective sampling rate This function will calculate the correct clock and decimation factor for the AI 211 The returned decimation factor should be sent to the AI 211 layers using the DqgAdv211SetCfgLayer function as follows DOCFGLAYER 211 ldata DgqAdv211SetCfghayer hd0 D ldata mask DQAI211_DECFACTORSET DQAI211_FIR_BY_DECFACTOR ldata dec_factor uint16 decm factor EVN amp ldata The Config word used by the second parameter of DgAcbInitOps must enable the PLL clock by specifying the DQ_LN_CVCKSRC1 constant For example define CFG211 DQ_LN_ENABLED DQ _LN_ACTIVE DQ_LN_GETRAW DQ LN TIBOEN DQ_LN_CVCK
24. Command Enable or disable events on per layer basis Input int handle Handle to the IOM received from DgAsyncOpenIOM uint32 flags Flags define cube behavior uint32 enable_mask Which layers are enabled 1 in that bit positions and which are disabled 0 Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function enables or disables handling of events on per layer basis It must be called before receiving any events 3 11 6 DqRtAsyncAssignEvent Syntax int DAQLIB DgqRtAsyncAssignEvent int haneld int devn uint32 flags int handler uint32 flags pDOPKT buf int size tUeiPalObject event 109 PowerDNA API Reference Manual Release 4 0 Assign callback or handler to handle events from a certain device Command Input int handle int devn uint32 flags handler uint32 flags pDOPKT buf int size tUeiPalObject event Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Descrip
25. Note None 4 11 2 DqgAdv333ReadADC Syntax int DgAdv333ReadADC int hd int devn int CLSize uint32 cl uint32 bdata double fdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize channel list size uint32 cl channel list channel numbers Output uint32 bdata array of raw binary ADC data double fdata array of float point voltages Return DQ_NO_MEMORY error allocating buffer DO _ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AO 333 DQ_BAD_PARAMETER channel number in channel list is not a valid AO 333 channel number DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function requests conversion results for each channel specified in the channel list and stores them alongside converted data It will take a little under 3 seconds for the AO 333 to make all 32 readings If this function is called at a rate that does not allow enough time for conversion to occur then old or invalid data may be returned New data for any channel is indicated by the presence of a 1 in the least significant bit of the bdata for that channel 191
26. Bits 2 0 are an error counter that counts number of retry attempts if number of retries is above th value specified in the control block an error bit is set Successful execution of the 1553 command sequence clears this counter lt mn_frame gt minor frame number from 0 to 15 lt mn_block gt minor frame block number Each minor frame has two parts containing 128 descriptors each This organization was selected for the ability to read or replace data in the currently inactive part of each frame and then swap them simultaneously You can select to write to both blocks simultaneously When BC operation becomes enabled it uses part zero of each frame until told to swap 1t define SL553_MNF_BLOCK1 IpI Block 1 of a minor frame define SL553_MNF_BLOCKO 1L lt lt Gi ditto block 0 lt index gt index of the minor frame descriptor to start writing a lt size gt of descriptors in the supplied array 4 25 19 DqAdv553ReadMNDescriptors Syntax int DAQLIB DgqAdv553ReadMNDescriptors int hd int devn int channel uint32 mn_frame uint32 mn_block uint32 index int size uint32 descriptors uint32 mj_position uint32 mn_position Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 mn_frame Frame number 0 15 uint32 mn_block Block number 0 or 1 or both to store data uint32 index
27. DQE Input int iom Handle to IOM received from DqOpenIOM uint32 devn layer inside the IOM uint32 ss subsystem of layer int supported pointer to receive result Output int supported returns TRUE if the IOM device subsystem supports DMap operation FALSE if not Return DQ_ILLEGAL HANDLE invalid iom handle DQ_SUCCESS successful completion other negative values other error Description This function verifies that the IOM device subsystem supports DMap operation Note None 3 1 3 DqVmaplsSupported Syntax int DqVmapIsSupported int iom uint32 devn uint32 ss int supported Command DQE Input int iom Handle to IOM received from DqOpenIOM uint32 devn layer inside the IOM uint32 ss subsystem of layer int supported pointer to receive result Output int supported returns TRUE if the IOM device subsystem supports VMap operation FALSE if not Return DQ_ILLEGAL_HANDLE invalid IOM handle DQ_SUCCESS successful completion other negative values other error Description This function verifies that the IOM device subsystem supports VMap operation Note None 3 1 4 DqMsglsSupported Syntax int DgMsgIsSupported int iom uint32 devn uint32 ss int supported 49 PowerDNA API Reference Manual Release 4 0 Command DQE Input int iom Handle to IOM received from DqOpenIOM uint32 devn layer inside the IOM uint32 ss
28. DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ _IOM_ERROR DQ_SUCCESS Other negative values Description Input debouncing gate register value Input debouncing clock register value TRUE to turn on pre inversion of the input pin TRUE to turn on pre inversion of the gate pin TRUE to use external clock TRUE to use trigger TRUE to use external trigger source only w a triggered mode TRUE to use auto clear at the end of the count only w a triggered mode TRUE gate line as hardware gate on the prescaler enabled when high or gie inverts TRUE to enable re load continuous operation One of the DO EM XXX end mode constants Load register value Output parameter that receives the configuration value the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up the configuration for a counter in a 601 layer for getting the number of counts during a specified timeframe Read the register for an immediate measurement For an extended parameter description see DgAdv6
29. Input int hd Handle to the IOM received from DqOpenIOM int devn Device number int channel Channel 0 or 1 uint32 todo Action item int32 major_idx Major frame index uint32 minor_idx Minor frame index Output int current_major_d Current major frame descriptor int current_minor_d Current minor frame descriptor uint32 bc status Bus controller status Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO DAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function is used for debugging Bus Controller operations After setting up bus controller tables one must call this function instead of DgAdv553Enable to perform step by step execution of the loaded tables 297 PowerDNA API Reference Manual Release 4 0 lt todo gt specifies the action to perform define DQ
30. Note None 4 2 2 DqAdv205LoadCoeff Syntax int DgAdv205LoadCoeff int hd int devn int fir int channel int decrat int tapsize double data Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int fir fir stage number int channel channel number int decrat decimation ration 0 no decimation int tapsize number of taps in the filter 0 pass thru mode double data filter taps data Output None Return DQ_BAD_ PARAMETER fir channel decrat or tapsize is negative or 119 PowerDNA API Reference Manual Release 4 0 DQ_NO_MEMORY DQ_BAD_DEVN DQ_ LL EGAL HANI DQ_SUCCESS DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR Other negative values Description exceeds maximum possible value error allocating memory illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 205 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function loads the coefficient table Note Filter taps should be converted into double precision format in 1 0 1 0 range DqAdv205LoadCoe ff can be used in ACB mode only 4 2 3 DqAdv205SetFilterMode Syntax
31. DQCMD_WRCHNL typedef struct uint8 dev uint8 ss uint8 chnl uint32 data Ve PowerDNA API Reference Manual Release 4 0 DQWRCHNL pDQWRCHNL Note Use dev DQ_LASTDEV to indicate the last device in the list A channel may be a relative position in the programmed channel list but not an actual channel number depending on the hardware Since DMap mode is provided there is only marginal use for this function 2 2 25 _DqCmdReadChannel Syntax d int DqCmdReadChannel int Iom pPpDQRDCHNL pDQChannelData void Data uint32 DataBufLen Command DQCMD_RDCHNL 0x130 Set Channel List Input int Iom Handle to the IOM returned by DqOpenIOM pDORDCHNL Array of structures that defines device and channel DQOChannelData void Data pointer to buffer to store received data uint32 size of the data buffer bytes DataBufLen Output void Data received data uint32 returned size of the data in buffer bytes DataBufLen Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Timeout duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative v
32. DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description The function writes an angle or special data for selected channels It writes data separately into four special channels defined as DQ AI255_GAIN_A 0x00 gain of A excitation channel DQ AI255_GAIN_B 0x04 gain of B excitation channel DQ_AI255_GAIN_C 0x08 gain of C excitation channel DQ AI255_GAIN_D Ox0C gain of D excitation channel NNO OO 0x10 phase of A excitation channel DQ_AI255 PHASE A DQ_AT255_ PHASE D 0x14 phase of B excitation channel DQ_AI255_PHASE_C 0x18 phase of C excitation channel DQ AI255_ PHASE D Ox1C phase of D excitation channel Gain should be in the range of 0x0 0x8000 Phase should be in the range of 0 thru Oxff or in general the number of points minus one in the generated sinewave which can be obtained using DgAdv255GetExcitation call You will need to use the following macro to pack parameters for the phase setting define DQ_AO255_PHASE_SET PHASE DELAY PHASE lt lt 18 DELAY amp 0x3ffff PHASE is an offset from which sinewave is output and DELAY specifies a delay in uS for fine tune of phase control no
33. Output parameter that receives the configuration value the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error Note None 4 26 14 DqAdv601CfgForBinCounter Syntax int DgAdv601CfgForBinCounter int hd int devn int counter int startmode int ps int GD ant crl int tbr int dbg int dbc int iie int gie int extclk int trig int trs int enc int gated int re int end_mode int Ilr int cfg Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 7 int startmode DQ_PL601_SM const int ps Prescaler register value ine cro Compare register 0 value ine cri Compare register 1 value int tbr Interval divider for timebase register 328 PowerDNA API Reference Manual Release 4 0 int dbg int dbc int iie int gie int extclk int trig int trs int enc int gated int re int end_mode int lr int cfg Output int cfg Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DO DAD PARAMETER
34. H O Description int devn uint32 dout uint32 din Handle to the IOM received from DgOpenIOM Layer inside the IOM Digital output value Digital input value error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 255 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error The function writes available digital outputs and reads back auxiliary digital inputs 189 PowerDNA API Reference Manual Release 4 0 Notes 4 11 DNA AO 302 308 332 333 layers 4 11 1 DqAdv3xxWrite Syntax int DgAdv3xxWrite int hd int devn uint32 CLSize uint32 cl int takeraw uintl6 data double fdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize channel list size uUbnts2 xel channel list channel numbers int takeraw use raw data instead of float uintl6 data array of data should be of CL size or NULL if takeraw is FALSE double fdata array of float point voltages or NULL if takeraw is TRUE Output None Return DO NO MEMORY
35. Handle to the IOM received from DqgOpenIOM Layer inside the IOM Counter number 0 7 DQ_PL601_SM const Prescaler register value Compare register 0 value Compare register value Input debouncing gate register value Input debouncing clock register value RUE to turn on pre inversion of the input pin RUE to turn on pre inversion of the gate pin RUE to turn on post inversion of the output pin RUE to use external clock R R UE to use trigger UE to use external trigger source only w a triggered mode TRUE to use auto clear at the end of the count only w a triggered mode TRUE gate line as hardware gate on the prescaler enabled when high or gie inverts TRUE to enable re load continuous operation One of the DO EM SN end mode constants Load register value K IERE Ba 327 Output E int cf E int cf Return DQ_TLLEGAL_ HANDLE PowerDNA API Reference Manual Release 4 0 g g BAD DO D EVN DO DA D GA RAME TE DQ_SENI ERRO DQ_TIM EO UT_ERROR DQ_IOM_ RROR CG Pi DQ_SUCCESS Other negative values Description This function sets up the configuration for a counter in a 601 layer for general counting without period counting or timebase division For an extended parameter description see DqAdv601ConfigCounter
36. Other negative values Description This function modifies multiple parameters on the fly Oe while 553 is enabled It can change TX block bus to use etc lt flags gt specifies parameters to control Currently two parameters can be controlled 1 Select with block to use for Tx 0 or 1 per RT To set block of memory for transmission user needs to specify DQ_L553_SET_TX_BLOCK in lt flags gt field and block number in the member lt rx_block gt of DQ553Control structure 2 Enable and disable remote terminals while application is running To perform an enable disable remote terminal function a user needs to specify DQ_L553_SET_RT_ENABLE in lt flags gt and set 1 in the bit field lt rt_enabled gt of DQ553Control structure 4 25 4 DqAdv553ConfigBM Syntax int DAQLIB DgAdv553ConfigBM int hd int devn int channel uint32 busmode uint32 rt_size uint32 rtsa_list uint32 trig_list Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 busmode What to monitor bus A bus B or both buses uint32 rt_size Size of the following RT SA and trigger lists uint32 rtsa_list Array of RT SA to monitor NULL to monitor all RTs uint32 trig_list List of trigger conditions to match rts_list or NULL Output Returns DQ_NO_MEMORY error allocating buffer DQ_TLLEGAL_ HANDLE
37. illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_TOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error 267 PowerDNA API Reference Manual Release 4 0 Description This function defines what a Bus Monitor should actually monitor lt busmode gt defines what bus to listen at define DQ_L553_BM LSTN_A define DQ_L553_BM_LSTN_B 1L lt lt 1 listen bus B define DQ_L553_BM TX_A 1L lt lt 2 enable transmission on bus A 1L lt lt 6 define DQ_L553_BM TX B 1L lt lt 3 enable transmission on bus B listen bus A define DQ L553 _STORE_TS 1L lt lt 17 Store timestamp information define DQ_L553_STORE_FLAGS 1L lt lt 18 Store bus flags status information define DQ_L553_BM_LIST_ADD Lia lt 21 add to RISA List lt busmode gt allows you to monitor either bus A or B or both This field also allows adding to the current RTSA lists in multiple calls using a DQ_L553_BM_L1IST_apD flag To clear
38. Size Written N Remains N Size Read 0 Remains 0 Size Read N Remains N Data Read 0 Syntax g int DgqRtVmapAddOutputChannelData int handle int vmapid int trl index uint32 channel uint32 data size int act_size uint8 data Input int handle Handle to the IOM int vmapid Identifier of the VMAP to write to int trl_index Index of the VMAP entry to update uint32 channel Channel to output data to int data_Size Size of the data buffer in bytes uint8 data Data to send to the VMAP Output int act_size Number of bytes actually sent to the VMAP 84 PowerDNA API Reference Manual Release 4 0 Return DQ_ILLEGAL HANDLE invalid IOM handle DO BAD DEVN there is no device with the specified number D SUCCESS command processed successfully Description Copies channel information and data into the output packet and returns number of bytes left in the packet 3 6 2 DgRtVmapRq nputChannelDataSz Syntax int DgRtVmapRqInputChannelDataSz int handle int vmapid int trl_index uint32 channel uint32 ro size int act_size uint8 indataptr Input int handle Handle to the IOM int vmapid Identifier of the VMAP to read from int trl_index Index of the VMAP e
39. error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion 257 PowerDNA API Reference Manual Release 4 0 Other negative values Description low level IOM error This function retrieves messages from the Rx FIFO Note The function returns after data is received on the interface If a timestamp was enabled for that channel the function returns two uint32s per packet one for the packet and one for the timestamp 4 24 16 DqAdv566ReadWriteFifo Syntax int DgAdv566ReadWriteFifo int hd int devn int chanwr int chanrd int writesz uint32 wrdata int written int available int readsz uint32 rddata int read int remains Command DQCMD_WRRDFIFO Input int hd int devn int chanwr int chanrd int writesz uint32 wrdata int written int available int rdsize uint32 rddata int read int remains Output None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ SUCCESS Other negative values Description Handle to IOM received from DqOpenIOM Layer inside the IOM Channel to write to Channel to rea
40. t Iom pD pD ul Output pD pD ul Return DQ DQ DQ DQ DQ QSETCOMM QSetComm nt32 CRC QSETCOMM QSetComm nt32 CRC ILLEGAL HANDLE SEND_ERROR _ TIMEOUT_ ERROR _IOM_ERRO SUCCESS R Other negative values Description This function sets device communication parameters Ethernet serial UDP and startup a PowerDNA cube DQCMD_SI ETCOMM typedef struct uint8 uints8 uint32 uint32 uint32 uint32 uint32 uint16 todo MAC 6 netip gateway netmask startup baudrate udpport DqCmdSetCommParameters int Iom pPpDQSETCOMM pDQSetComm uint32 CRC DQCMD_SETCOMM 0x164 Set Communication Parameters Handle to the IOM returned by DqOpenIOM communication parameters pointer to uninitialized CRC unused pass in NULL current parameter values if value of passed in pDQSetComm gt todo field was DO_READCOMM CRC of data actually written unused always returns 0 if not NULL illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command if the Command is processed successfully low level IOM error DOCMD_SETCOMM uses the following structure to set or retrieve communication parameters of function to
41. Address of the FLAGSO word in the BC control block Address of the FLAGS1 word in the BC control block First 1553 command word Second 1553 command word OR mask for the first status word AND mask for the first status word Compare VALUE for the first status word OR mask for the second status word AND mask for the second status word Compare VALUE for the second status word uintl6 rx_data_tmin 32 RX data or minimum compare values for TX 290 PowerDNA API Reference Manual Release 4 0 uintl6 tmax 32 maximum compare values for TX 80 uintl 6s total BCCB_Control pBCCB_Control lt rx_data_tmin gt contains actual data to be sent by the bus controller Use DqAdv553BCWriteRXData if you would like to store this data without the need to transfer the whole BCCB_Control structure Fields lt flagsO gt and lt flags1 gt define how to execute a 1553 command lt flagsO gt define BC1553_BCB_FLAGSO_IRQO 1L lt lt 15 1 if interrupt should be requested immediately upon completion of the execution define BC1553_BCB_FLAGSO_BEN 1L lt lt 14 1 enable communication with RTs on Bus B define BC1553_BCB_FLAGSO_AEN 1L lt lt 13 1 enable communication with RTs on Bus A define BC1553_BCB_FLAGSO_EXW 1L lt lt 12 1 allow extended wait for response from RT double maximum response time 1L lt lt 11 Reserved 1L lt lt 10 Reserved 1L lt lt 9
42. PowerDNA API Reference Manual Release 4 0 Because the ADC readings are started when a changed channel list is presented the data from a first read with a new channel list must be discarded 4 12DNA AO 358 layer 4 12 1 DqAdv358ExCalAccess Syntax int DgAdv358ExCalAccess int hd int devn uint32 cmd uint32 len uint32 addr uint8 data Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 cmd access command constant see below uint32 len length of read or write 1Kb max read 256 max write uint32 addr Address of data to read or write used by the DQ_A0358_EFE_RD_ID_ADDR and DQ_A0358_EFE_WR_OPEN commands ignored by all other commands uint8 data array of data in or out Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AO 358 DQ_BAD_PARAMETER cmd is not one of the defined constants below or len is less than or equal to zero or greater than 1024 for read or greater than 256 for write DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative va
43. TIM Ze ta ta S RROR HANI DqAdv462ReadAdc int hd double END_E HOUT DO OM_ERRO SUCCESS R ERROR Other negative values Description DLE DqAdv462ReadAdc int devn fdata uint32 CLSize uint32 cl Handle to the IOM received from DqOpenIOM Layer inside the IOM Channel list size Channel list Raw data from A D converter Array to store measured values from the specified channels illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a DIO 462 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function requests conversion results for each channel specified in the channel list and stores them alongside converted data There are 12 relay channels on the DIO 462 with 5 measurements or subchannels possible for each channel This makes a maximum of 60 entries in the channel list The subchannels are defined as follows DQ_DI0462_SUBCH_V_NO DQ_DI0462_SUBCH_I_AC DQ_DI0462_SUBCH_I_DC DQ_DI0462_SUBCH_V_NC DQ_DI0462_SUBCH_THERM Vno DC voltage on normally open contact Tac AC current on common Idc DC current on common Vne DC voltage on normally closed contact temperature C 215 PowerDNA
44. Note 149 PowerDNA API Reference Manual Release 4 0 4 7 4 DqAdv224SetExcitation Syntax int DgAdv224SetExcitation int hd int devn uint32 channel uint32 config double exc_rate double exc_level double calc_rate Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 channel Channel to program 0 3 uint32 config Configuration word double exc_rate desired sinewave rate Hz AC excitation only double exc_level desired excitation level in Volts 10V max AC peak to peak sinewave voltage is twice this value Output double calc_rate actual AC sinewave rate Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 224 DQ_BAD_PARAMETER illegal exc_level config or channel value DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command D SUCCESS successful completion Other negative values low level IOM error Description Sets excitation voltage for any channel Maximum voltage swing on either excitation output is 10V This applies to both AC and DC settings When AC excitation is selected all channels with AC excitation will be set to
45. Ss Q ei He Ea define BC1553_BCB_TT_BRTRT_3B Broadcast RI RT define BC1553_BCB_TT D_1B define BC1553_BCB_TT DRX_1D 1 Broadcast MODE W O Data TX Broadcast MODE W Data TX Most of the transfer types require only one command to be sent and one status to be received RT RT regular Bc1553_BCB_TT_RTRT_3a and broadcast 8c1553_BCB_TT_BRTRT_3B commands are exclusions from this list To execute one of these commands a bus controller issues a receive command to one remote terminal following a transmit command to another terminal Then the transmitting terminal replies with the status followed by the data words and the receiving terminal confirms reception by issuing a status word only in 8c1553_BCB_TT_RTRT_3A Case When these commands are used both of the lt cmd1 gt and lt cmd2 gt fields need to be filled with the proper commands The received status can be checked using lt stsl_or gt lt stsl_and gt and lt sts1_val gt fields First the received status is OR ed with lt sts1_or gt then AND ed with lt sts1_ana gt and then 291 PowerDNA API Reference Manual Release 4 0 compared with the lt sts1_vai gt value If the values do not match error status BC1553_BCB_ERRSTSO_SIF is set up in the lt err_sts1 gt field of BCCB_Status structure see DgAdv553BCReadBCCB The same logic applies to the RT RT situation when the second command second compare conditions and second
46. uint32 mn_frame Minor frame number 0 15 uint32 mn_block Minor frame block number 0 or 1 or both to store data uint32 index Descriptor index in the minor frame table uint32 size Number of descriptors to write pBCCB_Control descriptor Array of BCCB descriptors Output Returns DQ_NO_MEMORY error allocating buffer om LL EGAL HANDL Ka illegal IOM Descriptor or communication wasn t established BAD_DEVN device indicated by devn does not exist or is not an 1553 553 BAD_ PARAMETER Configuration parameters are incorrect SEND_ERROR unable to send the Command to IOM Q_ HU om om TIMEOUT_ERROR nothing is heard from the IOM for Time out duration Q _TOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function stores BCCB descriptors for the minor frame and slot selected A BCCB descriptor has the following structure typedef struct uintl6 flags0 uintl6 flagsl uintl6 rsv2 uintl6 rsv3 uintl6 cmdl uintl6 cmd2 uintl6 stsl_or uintl6 stsl_and uintl6 stsl_val uintl6 sts2_or uintl6 sts2_and uintl6 sts2_val uintl6 rsvl2 uintl1l6 rsvl13 uintl1l6 rsvl14 uintl6 rsvl15
47. uint32 mode Command DQE Input int hd int devn int fir int channel uint32 mode Output None Return DO DAD PARAM ETER DQ_NO_MEMORY DQ_BAD_DEVN DQ_TLLEGAL_ HANDLE DQ_SUCCESS DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR Other negative values Description DqAdv205SetFilterMode int hd int devn int fir int channel Handle to the IOM received from DqOpenIOM Layer inside the IOM fir stage number channel number mode of operation fir channel or mode is invalid error allocating memory illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 205 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets the FIR mode of a particular channel Note The following FIR modes are defined define AI205_FIR_DISABLI define AI205_FIR_DEFAU define AI205_FIR_DECRAT ED 0 filter disabled iT d set default parameters ONLY 2 program decimation ratio only 120 PowerDNA API Reference Manual Release 4 0 define AI205_FIR_PROGRAMMED 6 program filter and decimation 4 3 DNA AI 207 layer 4 3 1 DgAdv207Read Syntax int DgAdv207Read int hd int devn int CL
48. If set data overfolw was detected at the decoder A sticky auto cleared after read DQ_L553_RT_RX_SYNC RT retrieve last SYNC command upper 16 bits of 32 bit word and last transmitter shutdown override command lower 16 bits DQ_L553_RT_RX_MODE RT retrieve last MODE command lower 16 bits lt data gt is an array of the pointers to 16 bit arrays of data allocated for each subsystem This approach allows a user to allocate memory for each sub address in use and then change data in the memory instead of re assembling data every time he needs to update sub address data 4 25 15 DqAdv553ReadStatusRT Syntax int DAQLIB DgqAdv553ReadStatusRT int hd int devn int channel uint32 rt Size uint32 rtsa_list uint32 data Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_size Size of the following RT SA list uint32 rtsa_list Array of RT SA to read from and what to read 280 PowerDNA API Reference Manual Release 4 0 uint32 data Status data received from RT Output Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ BAD PARAME
49. RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle int device Device number uint32 channel Channel number Output int available Amount of data available in the FIFO after VMap operation Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_TLLEGAL_HANDLE invalid non NULL value for iom DQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero or positive successful completion Description This function returns amount of room additionally available in the output FIFO after VMap operation is completed in bytes Note If the request data size is zero but user still wants to see the amount of data it must use DQ_VMAP_FIFO_RQSIZE flag when channel is added Otherwise if the requested size is zero then the request to calculate amount of data available in the FIFO is ignored by the firmware 9 PowerDNA API Reference Manual Release 4 0 02s PowerDNA API Reference Manual Release 4 0 3 8 Messaging Msg Functions These are functions specific to Msg mechanisms 3 8 1 DqMsgCreate Syntax int DgqMsgCreate pDQE pDqe int iom uint32 devn uint32 ss uint32 dir uint32 config uint32 queueSize pDQBCB pBcb Command DQE
50. Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 401 DIO 402 DIO 404 DIO 405 or DIO 462 DQ_BAD_PARAMETER data is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function writes a 24 bit word to a DI 401 layer or a 12 bit word to a DIO 405 or DIO 462 layer using DOCMD_WRCHNL Note None 4 13 2 DqAdv40xRead Syntax int DgAdv40xRead int hd int devn uint32 data Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 data pointer to buffer for read data Output uint32 data data read Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 401 DIO 404 6 DIO 405 DIO 448 DIO 462 DO DAD PARAMETER data is NULL DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completi
51. char dmapin buffer for memory location of allocated plain input part of DMap allocated by the function char dmapout buffer for memory location of allocated plain output part of DMap allocated by the function Output PDQBCB pBcb return pointer to allocated DMap structure char dmapin memory location of allocated plain input part of DMap char dmapout memory location of allocated plain output part of DMap Return DQ_BAD_PARAMETER NULL or 0 as a parameter DQ_DEVICE_BUSY DQE busy DQ_ILLEGAL_HANDLE invalid non NULL value for iom DQ_NO_MEMORY memory allocation error DO_SUCCESS successful completion Description This function associates DQE with an IOM and creates internal structures required to handle DMap operations The function returns a pointer to BCB to use for all other calls to this DMap and a pointer to memory allocated for input and output DMap buffers Note One application can have multiple DMaps created and operated at different update rates For example one DMap with control data can be updated every 10ms while diagnostics data can be updated every ten seconds Use lt period gt parameter to control the relative update rate 3 3 2 DqDmap InitOps Syntax int DqDmapInitOps PBCB pBcb Command DQE Input pDOBCB pBcb pointer to a previously allocated DMap structure Output None Return 63 PowerDNA API Reference Manual Release 4 0
52. int action one or a combination of DQL_IOCTLS501_CHANGE_FINCLEAR and DQL_IOCTLS501_CHANGE_FOUTCLEAR Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 508 DQ BAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function clears input and or output FIFOs on 501 508 layers Note Function can be applied to more than one channel on the layer by OR ing channel mask with 1L lt lt channel_number A user doesn t have to call this function during normal operations because DqAdv501Enable does cleaning for you This function is for operation mode only For example when SL 501 layer operates in VMap mode and input FIFO needs to be cleared of received data before resynchronization with external device 4 21 17 DqAdv501RecvMessage Syntax int DgAdv501RecvMessage int hd int devn int chan uint8 data uintl6 size int success uint8 errorcode int avail Command DQE Input int hd handle to the IOM rec
53. low level IOM error For use with layers AI 201 AI 202 AI 225 AO 308 and DIO 403 This function is used to provide access to the dio pins on db connector Configuration The config value enables the DIO lines and sets their direction in or out Set config by logically ORing the following defines define DQ_ACCESS_DIO_DIO0_ENB 0x1 define DQ ACCESS_DIO_ define DQ ACCESS_DIO_ define DQ ACCESS_DIO_ define DQ _ACCESS_DIO_ define DQ ACCESS_DIO_ define DQ ACCESS_DIO_ define DQ ACCESS_DIO_ define DQ _ACCESS_DIO_ define DQ ACCESS_DIO_ define DO _ACCESS_DIO_ define DQ ACCESS_DIO_ h Fh h En DIO1_ENB 0x2 DIO2_ENB 0x4 DIO3_ENB 0x8 DIOO_OUT 0x10 DIOO_IN 0 lt default setting DIO1_OUT 0x20 DIO1_IN 0 lt default setting DIO2_OUT 0x40 lt default setting DIO2_IN 0 DIO3_OUT 0x80 DIO3_IN 0 lt default setting Sending data The data is sent using d out BitO contains value for dot but contains value for diol etc Receiving data The d_in value is always returned BitO contains value for drot bit contains value for diol etc 370 PowerDNA API Reference Manual Release 4 0 4 33 PowerDNA layer signaling 4 33 1 DgAavSetClockSource Syntax int DgAdvSetClockSource int hd int devn uint32 clock uint32 source uint32 edge
54. mode to switch IOM layers into what layers to switch mask illegal IOM Descriptor or communication wasn t 38 PowerDNA API Reference Manual Release 4 0 established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description The function switches IOM layers between operation configuration shutdown and other modes The valid Mode settings are define DO IO E_INIT device is being initialized OD TE define DQ_IOMODE_CFG 2L device in configuration mode define DQ_IOMODE_OPS 4L device in operation mode define DQ_IOMODE_SD 8L device in shutdown mode Power management modes define DQ_IOMODE_SLEEP 0x10 sleep mode define DQ_IOMODE_PWRDN 0x20 power down device define DQ_IOMODE_PWRUP 0x40 switch device power on The following extended modes are intended for multi master IOMs define DQ_IOMODE_GETCTRBUS 0x100 become a master on the bus define DQ_IOMODE_GIVEUPBUS 0x200 become a slave on the bus Current implementation of IOM does not have power management modes When the PowerDNA cube is powered up and configuration is set to normal it loads firmware and goes into initialization mode In initialization mode it sets all output to pre defined values and initializes hardware and softwa
55. size of the data buffer accessible by the pointer in scans minimum size of the data to copy to the user buffer in scans If the DQACB buffer doesn t have minimal amount of data to copy the function doesn t copy any data buffer for the number of scans actually copied buffer for the number of scans of data remaining in the buffer after data was removed the number of scans actually copied the number of scans of data remaining in the buffer after data was removed data is NULL or pBcb is NULL or is not an ACB successful completion This function copies a number of scans from the ACB buffer and stores the data in the user supplied data buffer removing the data from the ACB buffer If the ACB buffer doesn t have rqsizemin scans of data to copy the function doesn t copy any data The function returns the number of scans copied in returned avail returns the total number of scans worth of data remaining in the buffer This function is intended to be called every time upon receiving a DQ_eF rameDone event Alternatively the user can call this function periodically to retrieve scans Note If the ACB buffer doesn t have the minimal amount of data to copy the function doesn t copy any data 3 2 5 DgAcbGetScans Syntax int rgqsizemin Command DQE Input DgAcbGetScans pl uint32 returned PDQBCB p Bcb char xdata uint32 size uint32 rgqsizemin uint32 returned uint32 av
56. 1 2 8 256 DQ_AT254_MODE_SETMMAVG Set min max moving average 0 1 1 2 8 256 DQ_AI254 MODE_SETZEROC Set zero crossing window 0 1 6 64 samples DQ_AT254_MODE_USE_SX4 Use Sx averaging instead of Min Max average for 4 wire scheme Notes DQ_AI254_MODE_USE_sx4 flag does not require any parameters Instead it switches averaging for 4 wire scheme from calculating signal amplitude to calculating position 4 9 3 DqAdv254SetExcitation Syntax 160 PowerDNA API Reference Manual Release 4 0 int DqAdv254SetExcitation int hd int devn uint32 channel uint32 config double exc_rate double exc_level double calc_rate Command IOCTL Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 channel Channel to apply mode to uint32 config Configuration DQ_AI254_ENABLE_EXC_A to enable output P1 and DQ_AI254_ENABLE_EXC_B to enable output P2 double exc_rate Desired excitation rate in Hz double exc_level Desired excitation level in V Output double calc_rate Actual D A rate limited by the abilities of D A converter timebase error and number of points per period For informational purposes only Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn do
57. 3 8 1 Eet Ee e 93 3 82 ODMS OPS cece ee Eeer 93 Se DCIS CDSS saat at ial E E ant ratio ea 94 3 8 4 Eelere cect E ee 94 3 8 5 DEMS SOM GSS E 95 xo elen ee ok Ss Ee T 96 3 9 Mapped Messaging Mode M3 Functions No longer supported in 3 8 0 QVC ASS E 96 3 9 1 IER 96 See CINTA OS re ae eae ee 97 3 939 DAMM OSIO y a a r aar a aa E A EA T E ERTA EE 97 TES E Mem a YLST a A ete ee E Preemie Pee eer cee rrp Rey eee 98 3 9 5 3 9 6 3 9 7 3 9 8 3 10 3 10 1 w ua D ho 3 10 3 LA wesch oO IN oh ok wech OMNDAOROD a sch sch sch vk sch h sech sch sch sch sch sch _ 3 11 12 3 11 13 3 11 14 4 1 4 1 1 4 2 4 2 1 4 2 2 4 2 3 4 3 1 4 3 2 4 4 4 4 1 4 4 3 4 4 4 4 4 5 4 4 6 4 4 7 4 5 1 4 5 2 4 5 3 4 5 4 4 5 5 4 6 PowerDNA API Reference Manual Release 4 0 DaMmSetLayerGonfig E 99 Bette Ee EE 99 DGNWIMSerUMGSSAge EE 100 DAMMCOUN eebe Ed 101 ACB and DMap Control and Event Functions 0 ccsseeeeeeseeeeeeeeeeeeeneeeeeneeeeees 101 RE Ee TEE 101 DOCS CIE EE 102 REEL E 104 DGGVV ALR OF EVEN EE 104 Asynchronous Event Functions cseeeeccceseeeeeeeeeeeeeeeeneeeeeeeeeneeneeeeenseeseeeeeeeees 105 DORTAS eeler RE EE 107 DORIAS aerer Te EE 107 DGRIAS VC CIOAREVOIUS ee reesen eae o E sug ehsapate aerpedesauvencasepresendeet 108 DORTAS VMCEMADIS EY CIS reren eo a aa a ei a EE 108 Bet ee El 109 DORTAS VMCASSIGNEY E E 109 Da RIAs yncGel
58. Command IOCTL Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 channel Channel to apply mode to uint32 mode Mode of operation uint32 flags Flags defining valid parameters pDO255SetExt params Parameters Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function allows setting up additional parameters for AI 255 layer It is not necessarily to call this function if you would like to rely on default settings Three parameters can be changed as defined in the following structure typedef struct uint32 PositionAvg Set moving average window size 0 1 8 256 uint32 ZeroCrossing JI Set zero crossing window 0 1 6 64 DQ255SetExt pDQ255SetExt 177 PowerDNA API Reference Manual Release 4 0 lt flags gt define valid parameters If a flag is set then parameter is valid and used if not set it is ignored DQ_AI254 _ MODE_SETAVG Set position calculation moving average 0 1 1 2 8 256 DQ_AI254 _ MODE_SETZEROC Set zero crossing windo
59. INSTMOD E_NTOH flag in samplesz parameter to automatically convert data from network byte order to host byte order 2 2 14 DqWriteAOChannel Syntax int DqWriteAOChannel int hd int devn int samplesz uint32 CLSize uint32 cl uint8 data Input int hd Handle to the IOM int devn device number int samplesz size of one sample in bytes Output Return uint32 CLSize HK Seet uint8 data uint8 data DO DQ_S LLEGAL_HAN END ESO DQ_TIMEOUT_ERROR DQ_IOM_ERRO DQ_SUCCESS Other negative values DL O channel list size channel list array of data should be of CL size times sample size received data illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command if the Command is processed successfully low level IOM error Sfi PowerDNA API Reference Manual Release 4 0 Description This function writes data to an analog output device Note Include DQ_INSTMODE_NTOH flag in samplesz parameter to automatically convert data from host byte order to network byte order 2 2 15 DqCmdEcho Syntax int DgqCmdEcho int Iom pDQRDCFG pDQRdCfg Command DQCMD_ECHO 0x104 Echo Input H nt Iom Handle to the IOM returned by DqOpenIO
60. If set data is ready at the decoder B If set data is ready at the decoder A BUS Bit timing error on bus B sticky auto cleared after read BUS Bit timing error on bus A sticky auto cleared after read BUS Parity error on bus B sticky auto cleared after read BUS Parity error on bus A sticky auto cleared after read RT Illegal command sticky auto cleared after read RT Message error sticky auto cleared after read RT Too many words were detected in RX message sticky auto cleared RT Too few words were detected inm RX message sticky auto cleared If set data overflow was detected at the decoder B sticky auto If set data overfolw was detected at the decoder A sticky auto Internal errors of the 1553 RT state machine debug only In lt param gt None Out PpDOEVENT gt event EV553_FSM_ERROR pEV553_ID gt evtype SL553_PORT_IR_DOA 1553 bus A B data was overriten SL553_PORT_IR_DOB critical IRQ SS Sg FSM stuck somewhere and new SL553_ PORT IR EMT 1553 command data arrived before previous PSPRAM memory access timeout pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above EV553_BUS_CHANGED Communication bus was switched In lt param gt None Out PpDOEVENT gt event EV553_BUS_CHANGED pEV553_ID gt evtype SL553_POR
61. Input PDQE pDqe pointer to the previously created instance of DQE int iom Handle to the IOM returned by DqOpenIOM uint32 devn layer number inside the IOM uint32 ss subsystem of layer uint32 dir direction for message queue either DQ_MSG_DIRECTION_RECEIVING or DQ_MSG_DIRECTION_SENDING uint32 config configuration layer specific uint32 queueSize maximum number of entries in message queue PDQBCB pBcb pointer to receive a newly allocated BCB structure Output pDQBCB pBcb receives a newly allocated BCB structure Return DQ_NO_MEMORY memory allocation error DQ_BAD_PARAMETER NULL or 0 as a parameter queueSi ze is less than DQ_MSG_MIN_QUEUE_SIZE or dir is neither DQ_MSG_DIRECTION_SENDING nor DQ_MSG_DTIRECTION_RECEIVING DQ_ILLEGAL_HANDLE invalid non NULL value for iom DQ_DEVICE_BUSY layer already taken DQ_SUCCESS successful completion Description This function allocates a new Msg queue type BCB Note None 3 8 2 DqMsgInitOps Syntax int DgMsgInitOps pDQBCB pBcb Command DQE Input PDQBCB pBcb pointer to Msg queue Output 93 PowerDNA API Reference Manual Release 4 0 None Return DQ BAD PARAMETER pBcb is NULL DQ_ILLEGAL HANDLE pBcb is not a Msg queue DO NO MEMORY unable to allocate necessary structure DQ_SUCCESS successful completion Descript
62. None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DO DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets clears the use of parity as 9th bit Note Implemented in logic version 0x01021006 or later Use the following defined constants as the parity_mode value DQ_SL501_PARITY9 DISABLE 0 A disabled DQ_SL501_PARITY9_ ENABLED 4 enabled 4 21 13 DqAdv501GetStatus Syntax int DgAdv501GetStatus int hd int devn uint32 errors uint32 count Command IOCTL Input int hd Handle to IOM received from DqOpenIOM 231 PowerDNA API Reference Manual Release 4 0 int devn Layer inside the IOM Output uint32 errors Array of Parity Error and Frame Error counters for each channel uint32 count Number of uint32 in the errors array 8 for 501 and 16 for 508 Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an
63. PowerDNA API Reference Manual Release 4 0 2 2 18 DgqCmdWriteVal Syntax int DgqCmdWriteVal int Iom uint32 Address uint32 Value Command DQCMD_WRVAL 0x114 Write Value to the Device Input int Iom Handle to the IOM returned by DqOpenIOM uint32 Address IOM memory map address to write to uint32 Value pointer to 32 bit value to write to Address Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function writes Value to a physical Address on IOM Note This low level function can be dangerous because all IOM address space including layer registers is accessible This function is password protected with user level password 2 2 19 DqCmdReadVal Syntax int DgqCmdReadVal int Iom uint32 Address uint32 Value Command DQCMD_RDVAL 0x118 Read Value from the Device Input int Iom Handle to the IOM returned by DqOpenIOM uint32 Address IOM memory map address to read from uint32 Value pointer to buffer to store the value received fro
64. Release 4 0 Other negative values low level IOM error Description This function writes and receives packets from the specified channel FIFOs Special channel numbers are defined for the purpose of accessing special data areas for write only DQ_AR566_CH_SCHED scheduler table DQ_AR566_CH_SCHDATA scheduler data DQ_AR566_CH_FILTER filter table From parameter should be first entry in the channel data for these special channels This function allows writing scheduler data and table in a single write To do that the maximum size of the Tx channel list is extended to twelve channels six for scheduler table for each channel and six for scheduler data For example to write to the scheduler table for channel 3 use DQ_AR566_CH_SCHEDI3 and DQ_AR566_CH_SCHDATAI3 to write scheduler data for the same channel The first entry in the scheduler or filter entry or data must be the lt from gt parameter which tells from which entry to write following scheduling data For example if one would like to write two entries into a table from index 5 in the scheduler table it must prepare a tx_data_arr data array consisting of three values 5 entryl entry2 where each entry is a 32 bit word to be written into scheduler table Please note that the size must include lt from gt into count thus tx_size 3 Note This function allows sending and receiving data for the whole device in one packet Currently the function is limited to sen
65. Reserved define BC1553_BCB_FLAGSO_RSV11 define BC1553_BCB_FLAGSO_RSV10 define BC1553_BCB_FLAGSO_RSV9 define BC1553_BCB_FLAGSO_SBUS 1L lt lt 8 Select Start Bus bus that will be initially used to communicate with RT 0 Bus A define BC1553_BCB_FLAGSO_DTC LL lt lt 7 1 check returned value of the data from RT compare with MIN and MAX value define BC1553_BCB_FLAGSO_MDC 1L lt lt 6 1 check returned value of the mode data word apply AND OR masks and compare with VAL value define BC1553_BCB_ FLAGSO_STS2 1L lt lt 5 1 check returned value of the 2nd status word apply AND OR masks and compare with VAL value define BC1553_BCB_FLAGSO_STS1 1L lt lt 4 1 check returned value of the first status word apply AND OR masks and compare with VAL value define BC1553_BCB_FLAGSO_TT N N amp 0xf Transfer type selects one of the available 1553 sequences Transfer types define BC1553_BCB_TT_BCRT_1E BC RT le sequence of the BC state machine define BC1553_BCB_TT_RTBC_2B RT BC 2b sequence of the BC state machine define BC1553_BCB_TT_RTRT_3A RT RT 3a sequence of the BC state machine define BC1553_BCB_TT_MD_1A MODE W O Data TX 1 2 3 M 4 define BC1553_BCB_TT_MDTX_2A 5 W Data TX define BC1553_BCB_TT_MDRX_1C 6 MODE W Data RX define BC1553_BCB_TT_BBCRT_1IF 7 Broadcast BC RT B 8 D 9 B 0
66. The filter allows limiting the scope of data passing to the user by imposing conditions on what kind of data is of interest Note Not supported in the current revision 4 25 6 Syntax DgAav553ContigBMSetT rigger int DgqAdv553ConfigBMSetTrigger int hd int devn int channel uint32 busmode uint32 t_size pDOQBM553Filter pTrigger Input int hd Handle to the IOM received from DqOpenIOM int devn Device number int channel Channel 0 or 1 uint32 busmode What to monitor bus A bus B or both buses uint32 t_size Size of the following trigger list pDQBM553Filter pFilter Array of DOBM553Trigger structures that defines filter for BM mode Output Returns DQ_NO_MEMORY error allocating buffer 269 PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ_BAD_PARAMETER Configuration parameters are incorrect DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error
67. The range of the channels is 0 thru 7 and the range of the ADC subchannels is O thru 4 as shown below DQ_AO358_SUBCH_I_SENSE DQ_AO358_SUBCH_EX1 DQ_AO358_SUBCH_EX2 0 current in adjustable bridge arm 1 excitation voltage normally positive 2 excitation voltage normally negative 3 4 DQ_A0358_SUBCH_VS_N voltage at the S bridge point DQ_A0358_SUBCH_THERM temperature of the ADC in degrees C The entire ADC subsystem is normally OFF at power up An ADC converter is started when a valid channel list entry for that ADC is sent by this function The ADC will continue to run until a channel list is presented by this function that does not contain any entries for that channel To shut off all ADCs for a given device number send a read command with this function with CLSize set to 1 and c1 0 set to Oxffffffft Because the ADCs are started when a changed channel list is presented the data from a first read with a new channel list must be discarded 4 13 DNA DIO 401 402 404 405 406 layers 4 13 1 DqAdv40xWrite Syntax int DgAdv40xWrite int hd int devn uint32 data Command DQE Input 195 PowerDNA API Reference Manual Release 4 0 int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 data data for the port Output None
68. channel number as specified in DqRt VmapAddChannel when this entry into the VMap is created VMap allows you to specify actual channel to substitute the channel number assigned when the channel was added to VMap This actual channel has to be passed as lt rq_channel gt 3 7 4 DgRtVmapRequestinput Syntax int DAQLIB DqRtVmapRequestInput int handle int vmapid int device uint32 channel int rq_size Command RT Input 88 PowerDNA API Reference Manual Release 4 0 int handle Handle to the IOM returned by DqgOpenIOM int vmapid VMap handle int device Device number uint32 channel Channel number int rq_size Requested size Output Returns positive value Number of bytes actually requested Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_ILLEGAL_HANDLE invalid non NULL value for iom DQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero or positive successful completion Description This function requests input data and store request in the output VMap packet Note None 3 7 5 DqRtVmapPlusRequestinput Syntax int DAQLIB DqRtVmapPlusRequestInput int handle int vmapid int device uint32 channel uint32 rq_channel int rq_size Command RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle int device Device number uint32 channel Channel number as specified in DgRtVmapAddChannel uint32 rq channel
69. define STS_FW_BAD_CONFIG 1UL lt lt 7 Layer cannot operate in current config define STS_FW_BUF_OVER 1UL lt lt 8 Firmware buffer overrun 18 PowerDNA API Reference Manual Release 4 0 define STS_FW_BUF_UNDER 1UL lt lt 9 Firmware buffer underrun define STS_FW_LYR_FIFO_OVER 1UL lt lt 10 Layer FIFO overrun define STS_FW_LYR_FIFO_UNDER 1UL lt lt 11 Layer FIFO underrun define STS_FW_EEPROM_FAIL 1UL lt lt 12 Layer EEPROM failed define STS_FW_GENERAL_FAIL 1UL lt lt 13 Layer general failure define STS_FW_OPER_MODE 1UL lt lt 14 Layer is in operation mode Clock out of range os en cp op means that the call to the DqgCmdSetClock function specified a clock rate that is not possible to achieve with that layer taking channel gain list into consideration For example an AI 207 layer has a multiplexed front end with a maximum aggregate sampling rate of 16kS s using the gain of 1 Thus if a user specifies a sampling rate 2kS s for 16 channels this bit is going to be set also DgDmapInitOps or else DgAcbInitOps will return an error A synchronization interface error sts_rw_sync_ERR indicates that the Sync interface was not configured in a fashion that can provide proper clock signals A channel list incorrect error sts_rw_cuNL_E RR is set when one or more entries in the channel list array supplied to the layer is incorrect for that particular layer The flags STS_FW_BUF_SCANS_PER_INT STS_FW_B
70. error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 217 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function reads the PGA status of the AI 217 Use the following defines to identify errors DQ_AT2 DQ_AT21 DQ_AT2 DQ_AT21 DQ_AT21 DQ_AT21 DQ_AT21 7_PGAE checksum enab 7_PGAE 7_PGAE 7_PGAE LI DGAk LI DGAk DQ_AT2 L7_PGAE 17_PGAE RR_C R_B R_IARE HKERR RR UFA CAERR R ERRFEFLAG R_O at R R RR_I R R R R R_I R_GAIN UTERR ERR RR OVE 1 PRPRPRPRPRPE U U1 UJ Ud UJ U1 kJ L lt lt 7 checksum error in SPI only active if L lt lt 6 Input Amplifier saturated to supply rail L lt lt 5 Buffer active indication L lt lt 4 input clamp conduction error L lt lt 3 Error flag L lt lt 2 Output Amplifier clipping or over current L lt lt 1 Gain network overload L lt lt 0 Input over voltage error Updates will occur 10 times per second Use the newdata variable to qualify the data if reads are made faster than this rate 4 6 3 DgAdv217SetCjcAvg Syntax int Command DQE Input int int hd devn DqA
71. frame cycle define SL553_MJF_DESC_EN_SWAP 1L lt lt 5 Status bit 1 if entry was executed at least once status only write zero to clear define SL553_MJF_DESC_ED TL24 Minor frame ID to execute 0 15 define SL553_MJF_DESC_MRF N N amp Oxf 286 PowerDNA API Reference Manual Release 4 0 4 25 18 DqAdv553WriteMNDescriptors Syntax int DAQLIB DgAdv553WriteMNDescriptors int hd int devn int channel uint32 mn_frame uint32 mn_block uint32 index int size uint32 descriptors Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 mn_frame Minor frame number 0 15 uint32 mn_block Minor frame block number 0 or 1 or both to store data uint32 index Descriptor index in the minor frame table int size Number of descriptors to write uint32 descriptor Array of descriptors Output Returns DQ_NO_MEMORY error allocating buffer LLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established BAD_DEVN device indicated by devn does not exist or is not an 1553 553 SEND ERROR unable to send the Command to IOM HU Q_ Q_BAD_PARAMETER Configuration parameters are incorrect om os TIMEOUT_ERROR nothing is heard from the IOM for Time out duration
72. int DgAdvSetScansPerPkt int hd int dev int ss int scans Syntax Command DQE Input int hd int devn int ss int scans Output None Return DQ_NO_MEMORY DQ_TLLEGAL_HANDLE DQ_BAD_DE V DQ_BAD_PARAMETER R T DQ_SEND DQ_TIMEOU DQ_TOM_ERRO DQ_SUCCESS Other negative values ERROR ve Description Handle to IOM received from DqOpenIOM Layer inside the IOM Input subsystem number e g DO_SSOIN Number of scans per packet error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist scans is less than 1 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function alters the number of scans required before a packet will be sent from the IOM to the host It is used to reduce latency and is only applicable to input subsystems 376 PowerDNA API Reference Manual Release 4 0 This function cannot be called when the layer is involved in any streaming or data mapping operations Note The maximum number of scans per packet is limited by the DaqBIOS packet size and varies with the number of channels and sample size 4 34 2 DqAdvSetNetworkBuffers
73. int bufferSize STi PowerDNA API Reference Manual Release 4 0 Input int handle Handle to the IOM int dmapid Identifier of the DMAP to write to int dev ID of the device where the channels are located int bufferSize Number of elements in scaledBuffer double scaledBuffer The buffer containing the scaled data to send to the device Return DQ_ILLEGAL_HANDLE invalid IOM handle DO BAD DEVN there is no device with the specified number DO SUCCESS command processed successfully Description This function writes scaled data to the output map of the specified device Note The data written is actually transferred to the device on the next call to DgRtDmapRfresh This function should only be used with devices that generate analog data such as the AI 3xx series layers 3 4 11 DqRtDmapWriteRawData16 Syntax int DgqRtDmapWriteRawDatal6 int handle int dmapid int dev unsigned short rawBuffer int bufferSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP to write to int dev ID of the device where the channels are located int bufferSize Number of elements in rawBuffer unsigned The buffer containing the scaled data to send to the device short rawBuf
74. int32 dcedccfg Set frequency of DC DC converters powering ADC s int32 dcdcx 4 Set duty cycle and phase for the ADC DC DC converters DQDIO462DATAOUT pDOQDIO462DATAOUT bit defines for the contents of DQDIO462DATAOUT cfgmask define DQDI0462_CFGSET 1L lt lt 0 1 if cfg contains valid data define DQDI0462_PORTOCMSET 1L lt lt 3 1 if portocm contains valid data define DQDI0462_PORTUCMSET 1L lt lt 4 1 if portucm contains valid data define DQDIO0462_RDCNTSET 1L lt lt 5 1 if rdcntset contains valid data define DQDIO462_ADCCFGOSET 1L lt lt 7 1 if adcecfg 0 contains valid data define DQDIO462_ADCCFG1SET 1L lt lt 8 1 if adccfg 1 contains valid data define DQDIO462_ADCCFG2SET 1L lt lt 9 1 if adcecfg 2 contains valid data define DQDIO462_ADCCFG3SET 1L lt lt 10 1 if adcecfg 3 contains valid data define DQDIO462_ADCCFG4SET 1L lt lt 11 1 if adcecfg 4 contains valid data define DQDI0462_DCDCCFGSET 1L lt lt 12 1 if dedcecfg contains valid data define DQDI0O462_DCDCXSET 1L lt lt 13 1 if dcdcx contains valid data cfg disconnection mode configuration bitmask bits 11 0 represent channels 11 0 A one in a corresponding bit enables auto retry mode of the circuit breaker The auto retry period is one second portocm bits 11 0 contain a one for every channel that should be included into the over current status portocs This parameter doe
75. lt filter_total gt In order to maintain accurate calibration the filter coefficients should be scaled so that the returned lt filter_total gt value is exactly 8388608 4 6 5 DgAdv217SetPIl Syntax int DgAdv217SetPll int hd double samplerate double sr_actual int dec_fact int line Command DQE Input int hd Handle to the IOM received from DgOpenIOM double samplerate Desired sampling rate int line Sync line to assign signal Output double sr_actual actual sample rate int dec_fact Required decimation factor for AI 217 layer Return DQ BAD PARAMETER requested sample rate is too high or too low DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description The PLL clock circuit on the CPU layer will be programmed and routed by this function The PLL may be routed by way of the sync 1 or sync 3 lines by using the DQ_EXT_SYNC1 or DQ_EXT_SYNC3 constants for the line parameter The DQ_EXT_IMMEDIATE flag should be bitwise ORed with the line parameter This DqAdv217SetP11 function should be called before the 145 PowerDNA API Reference Manual Release 4 0 DgqAcbInitOps DqAcbIn
76. number of 32 bit values Output uint32 size returns amount of data copied into data parameter in 32 bit chunks Return DQ_ILLEGAL HANDLE illegal IOM Descriptor DQ_BAD_PARAMETER data or size parameter was NULL DQ_NOT_ENOUGH_ROOM size passed in is too small to hold the data DQ_RECV_ERROR no status data has been received yet DQ_SUCCESS successful completion Description Gets the last status data retrieved via the heartbeat Note None 10 PowerDNA API Reference Manual Release 4 0 int devn uint8 data int samplesz uint32 Handle to the IOM size of one sample in bytes array to store data should be of CL size times sample size illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command 2 2 13 DqReadAlChannel Syntax int DgqReadAIChannel int hd CLSize uint32 cl Input int hd int devn device number int samplesz uint32 CLSize channel list size uint32 cl channel list uint8 data Output uint8 data received data Return DQ_ILLEGAL_HANDLE DQ_SEND_ERROR DQ _TIMEOUT_ERROR DQ_IOM_EKRROR DQ_SUCCESS Descrip Other negative values tion if the Command is processed successfully low level IOM error This function reads data from an analog input device Note Include DQ
77. pDQIOCTL IoOut output data Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description DOCMD_IOCTL is a multi purpose command The IOM schedules its execution rather than performing it immediately because the code executed by firmware for this command may include hardware delays This function issues an ioct1 request to the specified device driver on IOM Both input and output packets have the same DQIOCTL structure DQCMD_IOCTL typedef struct uint8 dev device number uint8 ss subsystem uint32 cmd ioctl command uint8 arg arguments var size DQIOCTL pDQIOCTL Currently there are few IOCTL commands IoIn gt cmd ToOut gt cmd defined DQCMD_IOCTL commands define DQIOCTL_CVTCHNL 1 convert channel define DQIOCTL_SETPARA 2 set arbitraty parameter defined in arg define DQIOCTL_GETPARA 3 get arbitraty parameter defined in arg define DQIOCTL_SETFILTER 4 force filter to set new values define DQIOCTL_SIGROUTING 5 set NIS lt gt IS and SYNCx routing DQIOCTL_CVTCHNL is used throughout all layers For analog input laye
78. reg specifies relative offset of the register of interest Note None 4 26 3 Syntax int Command DQE Input int hd int devn Output None Return DQ_ILLEGAL_HANDLE DO DAD DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_EKRROR DQ_SUCCESS Othe r negative values DgAdv601EnableAll int hd DqAdv601EnableAll int devn Handle to IOM received from DqOpenI Layer inside the IOM OM illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 318 PowerDNA API Reference Manual Release 4 0 Description This function enables all counters on the layer Note None 4 26 4 DqAdv601DisableAll Syntax int DgAdv601DisableAll int hd int devn Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM Output None Return DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 D
79. uint32 iterations How many iterations to perform Output uint32 bus_errors Cumulative errors detected on the bus Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function initiates built in tests and returns its results Following built in tests are defined define DQO_L553_BIT_CAB define DQ_L553_INTERNAI define DQ_L553_TWOCHAN Possible lt bus_errors gt SL553_PORT_IR_ITA invalid bit value SL553_PORT_IR_T7 or parity error TB SL553_PORT_IR_BEA following errors 1 LEWRAP 1L lt lt 0 test when A and B are on the same trunk i 1L lt lt 1 internal bit test ELS lie lt 2 tests bus A of channel 0 against bus A of channel 1 Ditto bus B L lt lt 26 Bus One of the following errors was detected on bus A B L lt lt 25 Bus invalid Manchester code during S
80. 300 PowerDNA API Reference Manual Release 4 0 If lt channel gt gt 0 then lt memtype gt lt rt gt lt sa gt and lt block gt are used to calculate a memory address If lt channel gt lt 0 then lt memtype gt should contain the address of the internal layer SDRAM to be read 4 25 28 DqRtVmapAddOutputChannelData for DNx 1553 553 To simplify specifying what channels need to be written we recommend you use the following macros DQ_L553_CH_RT_SA CH RT SA write to specified RT SA data field In VMap mode a write always starts at the first location of the data memory dedicated for this channel remote terminal subaddress combination and contains the number of words specified in lt data_size gt Normally all access is done using block 0 for both read and write If use of the second block is required for example in case of the file transfer a different macro should be used DQ_L553_DATA CH RT SA BLK this macro allows you to specify a block of data to access DQ_1L553_CONTROL_CFG CH RT RQ write control word to the specified channel and remote terminal lt RQ gt can be one of the following DQ_1553_RTS_CFG0 1L lt lt 0 Bits to control status DO L553 RTS CFG1 Leen Vector i and BIT low words DO L553 RTS TX BLK 1L lt lt 2 Set Tx block per RT 0 or 1 DQ_L553_RTS_RTEN 1L lt lt 3 Enable disable terminals mask For all output needs the DQ_SSOOUT subsystem of
81. 5 4 9 6 4 9 7 4 9 8 4 9 9 4 9 10 4 9 11 4 9 12 4 9 13 4 9 14 4 9 15 4 10 4 10 1 4 10 2 4 10 3 4 10 4 4 10 5 4 10 6 4 10 7 4 10 8 4 10 9 4 10 10 4 10 11 4 10 12 4 10 13 4 11 4 11 1 4 11 2 PowerDNA API Reference Manual Release 4 0 GROW TT ROA E at cba iatea sugtcuat Ea A a EE e enaa a aR 140 Bee EAR e EE E 140 D Adyv2 1 Le GE 141 IDG AOV 21 SOUR E asa e e e taupe esa ceeded a e aE 143 GACT TEE EE 145 DNA AI 224 laye Psin eisai unorder dein easintee innit eens 146 DgAdy224Read ai e a eE E E E 146 DaAdy224SetAvera ging oiden enone eoa a eae a e a Ea iea iaae Eii 148 DqAdv224SetBridgeCompletion ccceesseccceeeeeeeseeeeeeeeenseeaeeeeeseensneeeeseeeeeenaes 149 DGAGVE24 ee 150 DgAdy224S6tFlR r EE 150 Ree TEE eona a aaa ea eea a e e e i 152 D Adyv224SetSRUN EE 153 Al ER EU ciinii ai aae apa aeaaaee aa daaa adaa dan ap Adaa anada anaa aiaa aa 154 Ree EE 154 Bee 155 DNA AI 254 la yet aoee ainina ae dines Gan ciiven cnniaiunsilauisiinckutedldudsnaubcunaiabenadadawbedseniuanetaai 156 DEE annone aeaoe aa o aeae teaa EEEE aE ETNE 158 DAAdy254S6t E EE 159 DOAGVZS4 Set EE 160 DqAdv254GetWFMeasurements ek 161 DgAdv254MeasureW eerste 164 Reen 164 DqAdv254GetExcitation E 165 Bo X09 24022 EE 166 Ee ie Ee e 167 en 168 DqAdv254ConvertSim EE 169 Ee ie 4 VV POI os cg raat PI tal ae Bie ae Ed is ach ie aceon See 170 DgAdv254SetW Fe EE 171 Disp ie peter Read B g Weep a ernst pir enna cre ire er Pee CT Wr p ea ia eai 17
82. 5 6 wire LVDT simulation and the P1 output and phase for 4 wire one Because of that each position function produces a pair of pre packaged channel lists and binary data ready to be written into DMap fields or for use with the DqAdv254WriteBin function Notes Don t forget to allocate arrays for lt act_cl gt and lt bdata gt twice as large as CLSize int CLSize uint32 cl uint32 bdata DqOpenIOM illegal IOM Descriptor or communication wasn t established t exist or is not an AJ 254 Time out duration error occurred at the IOM when performing this command 4 9 12 DqAdv254WriteBin Syntax int DqAdv254WriteBin int hd int devn Command DQE Input int hd Handle to the IOM received from int devn Layer inside the IOM int CLSize Reserved uint32 cl Channel of interest uint32 bdata Binary gain or phase data Output None Return DO NO MEMORY error allocating buffer DQ_ITLLEGAL HANDLE DQ_BAD_DEVN device indicated by devn does no DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for DQ_IOM_ERROR DQ_SUCCESS successful completion Other negative values low level IOM error Description 170 PowerDNA API Reference Manual Release 4 0 The function writes a simulated position of an LVDT or special data for se
83. API Reference Manual Release 4 0 Description This function assembles a scheduler entry from the separate fields Note None 4 24 4 DqAdv566SetConfig Syntax int DgAdv566SetConfig int hd int devn int ss int timeout_us uint32 config Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem DQ_SSOIN for Rx or DQ_SSOOUT for Tx uint32 timeout_us Timeout to wait in case Tx is not ready or Rx message is not available uint32 config Configuration flags Use DO AR ENABLE _DIO0 to switch on DIOO Use DQ_AR_ENABLE_DIOI1 to switch on DIO1 Use DO AR ENABLE _DIO2 to switch on DIO2 0 if DIO not used Output None Return DQ MO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function configures basic ARINC device parameters Note None 4 24 5 DqAdv566SetMode Syntax int DgqAdv566SetMode int hd int devn int ss int chnl uint32 cmd Command IOCTL 248 PowerDNA API Re
84. API Reference Manual Release 4 0 Use the DQ_DIO462_MAKE_CL CH SUBCH helper macro to combine the channel and subchannel to make the entries in the channel list Note 4 19 2 DqAdv462GetAll Syntax int DgAdv462GetAll int hd int devn pDQDIO462DATAIN data Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM Output pDQDIO4 62DATAIN pointer to store all readable parameters from DIO 462 data Return DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 462 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads available information from the DIO 462 layer except readback from the ADCs that are monitoring every channel Note The DIO 462 layer provides multiple status parameters that may be accessed via a DqAdv462GetAll function call Information is returned in the PDQDIO462DATAIN type typedef struct int32 cfg Report list of the disabled channels int32 portout Current value written to the output port int32 dissts disable status int32
85. Bus A Encoder is enabled in RT Engine define SL553_PORT_STS_DRB 1L lt lt 27 If set data is ready at the decoder B define SL553_PORT_STS_DRA 1L lt lt 26 If set data is ready at the decoder A define SL553_PORT_STS_WDR 1L lt lt 10 Watchdog request from RT indicated no activity from the BC within specified period define SL553_PORT_STS_BEB 1L lt lt 9 BUS Bit timing error on bus B sticky auto cleared after read define SL553_PORT_STS_BEA 1L lt lt 8 BUS Bit timing error on bus A sticky auto cleared after read define SL553_PORT_STS_PEB 1L lt lt 7 BUS Parity error on bus B sticky auto cleared after read define SL553_PORT_STS_PEA 1L lt lt 6 BUS Parity error on bus A sticky auto cleared after read define SL553_PORT_STS_ILC 1L lt lt 5 RT Illegal command sticky auto cleared after read define SL553_PORT_STS_MER 1L lt lt 4 RT Message error sticky auto cleared after read define SL553_PORT_STS_TMW 1L lt lt 3 RT Too many words were detected in RX message sticky auto cleared after read define SL553_PORT_STS_TFW 1L lt lt 2 RT Too few words were detected inm RX message sticky auto cleared after read define SL553_PORT_STS_ERB 1L lt lt 1 If set data overflow was detected at the decoder B sticky auto cleared after read define SL553_PORT_STS_ERA 1L lt lt 0 If set data overfolw was detected at the decoder A sticky auto c
86. DIO 404 ref_volts is not one of the available constants or levelO or levell is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion 199 PowerDNA API Reference Manual Release 4 0 Other negative values low level IOM error Description Note This function sets the hysteresis levels for a DIO 404 layer Hysteresis is a specific feature of DIO 40x layers To access this feature you should enable it in the configuration word define DQ_L401_HYSTEN 1UL lt lt 18 hysteresis programming is enabled The DACs in the DIO 404 layer are not linear For each of the supported reference voltages there is a table mapping DAC 0 and DAC 1 value pairs to level 0 and level 1 voltage values This function will select the DAC settings that result in level values closest to those specified in the levelO and levell parameters The levell value has priority which means that the table entry with the closest levell value is found If there is more than one table entry whose levell value is equal to or equally close to the specified levell value the entry whose level0 value is closest to the one specified is chosen The DAC values in this table entry are used to set the DACs in the layer and the actual level0 and levell values in the table are returned The ref_volts parameter must be one of the following constants which re
87. DQ_TOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion low level IOM error Other negative values Description lt mode gt mode of operation define DQ_L553_MODE_BM Gleeft bus monitor mode define DQ_L553_MODE_RT 1121 remote terminal mode define DQ L553 MODE_BC 1L lt lt 2 bus controller mode The following modes of operation can be used simultaneously e Remote Terminal and Bus Monitor e Bus Controller and Bus Monitor Bus monitor mode can be used in conjunction with remote terminal mode Bus controller mode can only be used by itself lt flags gt additional initialization flags define DQ _L553_ DISCONNECT OL lt lt 0 disconnect from the bus default define DQ_L553_TRANSFORMER 2L lt lt 0 transformer coupled 264 PowerDNA API Reference Manual Release 4 0 define DQ_L553_COUPLE_DIR define DQ_L553_FORCE_A default is MIL 1553B 4 25 2 Syntax int DgAdv553BITTest i ECTLY 3 L lt lt 0 direct coupling potential isolation issues Eh L lt lt 4 make I O compliant with MIL 1553A standard DgAdv553BIT Test nt hd int devn int channel uint32 testmode uint32 iterations uint32 bus_errors Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 testmode What to test
88. Description This function sets up a start stop trigger for BM mode The trigger can include various conditions Rx Tx Mode Errors etc It also allows setting up a decimation ratio for an RT SA pair to decrease the amount of data transferred Note Not supported in the current revision 4 25 7 Syntax int DAQLIB DqAdv553RecvBMMessages int hd int devn int channel int rq_size uint32 messages PDOBM553Message pMsg DgAdv553RecvBMMessages Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rq_size Size of the allocated memory for pMsg array returns actual number of bytes stored in the buffer PDOBM553Message pMsg Pointer to where to store captured data uint32 messages Actual number of messages received Output None Returns DQ_NO_MEMORY error allocating buffer LLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established BAD_DEVN device indicated by devn does not exist or is not an 1553 553 Configuration parameters are incorrect SEND_ERROR unable to send the Command to IOM Q_ Oe Q_BAD_PARAMETER QO TIMEOUT_ERROR nothing is heard from the IOM for Time out duration Q _TOM_ERROR error occurred at the IOM when performing this command ellen e
89. Descriptor index in the minor frame table int size Number of descriptors to read Output uint32 descriptor Array to store descriptors uint32 mj_position Currently executed descriptor in the major frame uint32 mn_position Currently executed descriptor in the minor frame Returns 288 PowerDNA API Reference Manual Release 4 0 DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function allows you to read back minor frame descriptors This function returns descriptors that contain execution status flags as well as currently executed descriptor indices in the major and minor frames There are a few status bits stored in the minor frame descriptor after it is processed a status bit reports the currently active 1553 bus for this entry zero if side A is used status only write zero to clear define SL553_MNF_DESC_CB 1L lt lt 6 Status
90. EM event Output parameter that receives the configuration value the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg is NULL 348 PowerDNA API Reference Manual Release 4 0 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function sets up the configuration for a counter in a 604 layer Note None 4 27 9 DqAdv604SetWatermark Syntax int DgAdv604StartCounter int hd int devn int counter Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 3 Wines Vik Always DQSSO_IN uint1l6 len watermark level 0 1024 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 604 DQ_BAD_PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing
91. EV553_BC HEARTBEAT bus control ler informs when minor frame starts In lt None gt Out pDQEVENT gt event EV553_BC_HEARTBEAT pEV553_ID gt evtype SL553_PORT_BCI_HBT pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above data 0 SL553_PORT_BCISRC Error source data 1 SL553_PORT_BCERR Error code EV553_BC_OVERRUN bus controller minor and major frame overrun no time to complete current frame BC starts new frame In lt None gt Out pDOEVENT gt event EV553_BC_OVERRUN pEV553_ID gt evtype SL553_PORT_BCI_BCRO SL553_PORT_BCI_BCJO BC overrun minor frame clock called in non idle state BC overrun major frame clock called in non idle state pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above data 0 SL553_PORT_BCISRC Error source E PowerDNA API Reference Manual Release 4 0 data 1 SL553_PORT_BCERR Error code EV553_BC_CMD_ERR In lt None gt Out PDQEVENT gt event EV553_BC_CMD_ERR pEV553_ID gt evtype SL553_PORT_BCI_RTRI At least one RT in dead state replied with valid status SL553_PORT_BCI_MF At least one Mode command w o data word failed SL553_PORT
92. Handle to the IOM received from DgAsyncOpenIOM int flags Define behavior of the function int pkt_size Packet size PDQEVENT pEvent Event packet Output None Return DQ_NO_MEMORY error allocating buffer 116 PowerDNA API Reference Manual Release 4 0 DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sends a packet as a reply to the received event lt flags gt DQ_RTRE_REPLY_REQD tell the cube to send a confirmation packet back 4 Layer specific functions 4 1 DNA AI 201 202 layers 4 1 1 DgAdv201Read Syntax int DgAdv201Read int hd int devn int CLSize uint32 cl uintl6 bData double fData Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels uint32 eel pointer to channel list uint32 bData pointer to store calibrated binary data double fData pointer to store calibrated voltage data NULL if not required Output uint32 l channel list uint16 bData calibra
93. Input int hd int devn int counter int startmode int pe Int tOr int dbg int dbc int iie int gie int trig int trs int enc int gated int re int end_mode int cfg Output int cfig Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_SUCCESS Other negative values Description int erte Handle to the IOM received from DqgOpenIOM Layer inside the IOM Counter number 0 7 DQ_PL601_SM const Period counter value Interval divider for timebase register Input debouncing gate register value Input debouncing clock register value RUE to turn on pre inversion of the input pin RUE to turn on pre inversion of the gate pin RUE to use trigger RUE to use external trigger source only w a triggered mode TRUE to use auto clear at the end of the count only w a triggered mode TRUE gate line as hardware gate on the prescaler enabled when high or gie inverts TRUE to enable re load continuous operation One of the DO EM SN end mode constants Output parameter that receives the configuration value T T T T the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg
94. It is very useful for debugging and selecting parameters when programming for a new LVDT sensor or simulating an LVDT output For the most purposes use default input settings and use the calculated amplitude and frequency as parameters for DgAdv254SetMode 163 PowerDNA API Reference Manual Release 4 0 4 9 5 DqAdv254MeasureWF Syntax int DqAdv254MeasureWF int hd int devn uint32 changain double frequency_b double amplitude_b double offset_b Command IOCTL Input int hd int devn uint32 changain Output double frequency_b double amplitude_b double offset_b Return NO MEMORY _ILLEGAL_HANDLE BAD BAD GEN SE TIMEOU Q Q Q Q Q Q ERROR Al Q_TOM_ERRO DQ_SUCCESS Other negative values Description Handle to the IOM received from DqgOpenIOM Layer inside the IOM Channel and gain to use gain lt lt 8 channel signal frequency of the signal on channel B amplitude of the signal on channel B offset of the signal on channel B error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 254 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low
95. Manual Release 4 0 DO_SUCCESS successful completion Other negative values low level IOM error Description This function allows a user to flexibly request status information for bus controller entries of interest This is a combined function everything except bus controller status can be retrieved via DgAdv553ReadMNDescriptor and DgAdv553ReadBCCB The following status bits can be obtained e Bus controller status define DQ_SL553_BC_STATUS 2L lt lt 12 BCCB status control Use the following macro to select what status to retrieve define DQ_SL553_BC_VMAP TYPE MN IDX TYPE MN amp 0xf lt lt 8 IDX amp 0xff Use the following modifier in the MN field define DQ _SL553_BC_STATUS_BC 1 return status of BC controllers register 0x21A4 Returns 32 bit word with the following bits define SL553_PORT_BCSTS_BSY 1L lt lt 31 1 if BC not in IDLE or WAIT_CLOCK states define SL553_PORT_BCSTS_RSV30 1L lt lt 30 Reserved define SL553_PORT_BCSTS_RSV29 1L lt lt 29 Reserved define SL553_PORT_BCSTS_RSV28 1L lt lt 28 Reserved define SL553_PORT_BCSTS_MRF3 1L lt lt 27 Reports ID for the currently processed define SL553_PORT_BCSTS_MRFO 1L lt lt 24 minor frame define SL553_PORT_BCSTS_DSC7 1L lt lt 23 Reports ID for the currently processed define SL553_PORT_BCSTS_DSCO 1L lt lt 16 descriptor minor frame
96. Q_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function stores a minor frame descriptor table of lt size gt from the data array supplied starting from the lt index gt supplied Minor frame descriptor bits are defined as follows Enable current entry If this bit O the descriptor is ignored and next entry is processed until the end of the descriptor table is reached define SL553_MNF_DESC_EN 1L lt lt 8 Execute once flag If set the entry will be executed once and then it will be automatically disabled This flag can be used for the aperiodic messages the enable flag is not cleared if sn error was detected during the execution of the entry define SL553_MNF_DESC_OT 1L lt lt 7 Status bit report currently active 1553 bus for this entry zero if side A is used status only write zero to clear define SL553_MNF_DESC_CB 1L lt lt 6 287 PowerDNA API Reference Manual Release 4 0 Status bit 1 if 1553 RT that was in error state responded with status status only write zero to clear define SL553_MNF_DESC_RR 1L lt lt 5 Status bit 1 if entry was executed at least once status only write zero to clear define SL553_MNF_DESC_ED 1L lt lt 4 Lo tatus bit 1 if entry was executed with error status only write zero to clear define SL553_MNF_DESC_ERR Lee
97. RT EN RT status For communication from a BC to an RT the second two words are zero This way of 272 EN flag to write a mask of enabled RTs PowerDNA API Reference Manual Release 4 0 retrieving received data is safer than using DQ_L553_RT_STSO last command higher 16 bits and status lower 16 bits word because there is no risk that the data has been updated between reading status information and actual data To enable an RT SA address to become active one needs to supply an lt rtsa_list gt list defining active terminals and sub addresses DQ_L553_BM_SADDR IN N amp 0x1 lt lt 0 sub address lt reserved gt DQ_L553_BM_SADDR_SEL 1L lt lt 5 Sub address field is valid lt reserved gt DQ_1L553_BM_RT N N amp Ox1f lt lt 6 RT number DQ_L553_BM RI SEL 1L lt lt 11 RT field is valia These definitions are encapsulated in DQ_L553_RT_SA RT SA macro If NULL is supplied as an lt rtsa_list gt all RTs and all SAs are active and can be used to emulate a 1553 network during initial prototyping and BC debugging process lt valid_list gt A validation list allows checking messages against specified parameters Each word in the validation list is applied against RT SA list with the same index 553_MEMVAL_MD_TX_DW 1L lt lt 28 1 when mode data word is expected and T R_N bit set to 1 5553_MEMVAL_MD_RX_DW 1L lt lt 27 1 when mod
98. RT and SA When buffers are allocated for either a receive or transmit operation the interrupt upon RX or TX on this RT SA is enabled After the operation is over ISR either retrieves or stores a new set of data of scan size from or into the allocated buffer lt rx_buf_size gt receive buffer size in uint 6 words lt rx_scan_size gt the size of one scan in the RX buffer this is the number of words to be stored from the SA data area to the buffer upon an RX interrupt on this RT SA combination lt tx_buf_size gt transmit buffer size in uintl6 words lt tx_scan_size gt the size of one scan in the TX buffer this is the number of words to be written from the buffer to the SA data area to the buffer upon an RX interrupt If lt rx_buf_size gt is set to zero the buffering function is disabled The data in the buffer can be presented in two ways 1 If lt xx_scan_size gt is greater than zero the size of SA data in the buffer is fixed 2 If lt xx_scan_size gt is equal to zero the first uint16 word defines the size of the data 1 32 to be placed into SA memory 4 25 11 DqAdv553WriteRT Buffer Syntax int DAQLIB DgAdv553WriteRTBuffer int hd int devn int channel uint32 rt_sa uint32 data size uint16 data uint32 written uint32 remains Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_sa RT and SA numbe
99. Requested channel int rq_size Requested size Output Returns positive value Number of bytes actually written to the output buffer Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_ILLEGAL_HANDLE invalid non NULL value for iom DQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero Or positive successful completion Description This function requests input data and store request in the output VMap packet Note 89 PowerDNA API Reference Manual Release 4 0 lt channel gt channel number as specified in DgRt VmapAddChannel1 when this entry into the VMap is created VMap allows you to specify actual channel to substitute the channel number assigned when the channel was added to VMap This actual channel has to be passed as lt rq_channel gt 3 7 6 DgRtVmapRead nput Syntax int DAQLIB DgqRtVmapReadInput int handle int vmapid int device uint32 channel int rq_size int ret_size uint8 data Command RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle int device Device number uint32 channel Channel number int rq_size Requested size Output int ret_size Actually received uint8 data Pointer to the user allocated to copy data Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_ILLEGAL_HANDLE invalid non NULL value for iom DQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero or positive successful com
100. Return Q_NO_MEMORY Q_ ILLEGAL HANDLE Q BAD DEV Q BAD PAR Q SEND ERROR Q_TIMEOUT_ERROR Q TOM_ERRO Q SUCCESS Other negative values Z ve Description Handle to the IOM received from DgOpenIOM Layer inside the IOM Channel and gain to use gain lt lt 8 channel signal frequency of the signal on channel D amplitude of the signal on channel D offset of the signal on channel D error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 255 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function is a simplified version of DqAdv255GetWFMeasurements that allows measurements on channel B only This is sufficient for most applications 4 10 6 Syntax DqgAdv255Enable int DqAdv255Enable int hd int devn uint32 config int enable int CLSize wIint32 lt 1 Command 181 PowerDNA API Reference Manual Release 4 0 DQE Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 config Re
101. S1 Results of measurements for channel S2 error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 254 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function measures parameters of the waveform presented on the inputs S1 and S2 of the lt channel gt The waveform parameters measurements are required for setting up proper excitation frequency in DgAdv254SetMode for modes with external excitation and simulation The function requires input that specifies various parameters of measurement typedef struct uint32 changain GE uint32 zero uint32 clock uint32 uzb uint32 uaz uint32 s_e uint32 period_ms ff WFMEASURE_254 pWEMEASURE_254 channel and zero level gain D default 0x8000 A D rate 0 maximum rate TRUE use ZC on channel S2 TRUE auto zero if divider is set not zero use Sa Se maximum expected waveform period Not all parameters are required to be supplied For 5 6 wire devices you may set up the lt changain gt parameter only to the same value as in lt channel gt If the excitation voltage is applied to channel S2 or channel S1 has a low amplitude waveform set lt uzb gt to TRUE to use chan
102. S1 and S2 separately in the hardware representation lt min_lvl gt and max Ivl are readings from minimum and maximum level detectors in int16 format You can calculate the span of the waveform by subtracting the minimum from the maximum The maximum span of the waveform is 22V pp lt sum gt is a current sum integration of all measurements performed during a half period of the waveform from one zero crossing event to another lt cal gt is a calibrated position the one returned in DgAdv254Read a 24 bit 2s complement number lt raw gt is the same position before applying the lt usr_offset gt and lt usr_gain gt values specified in DqAdv254SetMode lt zc0 gt is a number of 33MHz pulses counted for the positive segment of the waveform counted when waveform level is above lt zero gt level To calculate the waveform frequency use zc0 zc1 30 3ns lt zcl gt is a number of 33 MHz pulses for the negative part of the waveform lt zcO_var gt lt zcl_var gt is a variation in counts between last 16 measurements of lt zcO gt and lt zcl gt respectively in 33MHz counts lt raw_var gt is a variation of the position data in counts over last 16 measurements lt clk_frq gt is the sampling clock divider lt ampl gt is the calculated waveform amplitude lt freq gt is the calculated waveform frequency lt offs gt is the calculated waveform offset Note Use of this function requires a good knowledge of AI 254 layer design
103. SL 501 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Requests the error counts for parity and frame errors for each channel Notes Error counters are cleared in the device once this function is called later 4 21 14 DqAdv501PauseAndResume Syntax int DgAdv501 PauseAndResume int hd int devn uint32 channel_mask int todo Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 channel_mask channel to change configuration mask int todo operation to perform Output none Return DO NO MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an SL 501 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion 232 PowerDNA API Reference Manual Release 4 0 Other negative values low level IOM error Description If lt todo gt DQL_IOCTLS501_CHANGE_PAUSE pause receive If lt todo gt DQL_
104. The Major FIFO can be locked at any time except when it is transferring data to the Secondary FIFO at the rate of 150ns per byte Once the Major FIFO is locked its content is reset and the firmware writes data to the FIFO The lock write unlock procedure prevents a situation in which the Major FIFO gets partially overwritten and packet integrity is lost At the same time it prevents the situation that occurs when data is accumulated in the Major FIFO If for some reason for example if the VMap rate is faster than the selected frame rate the data written into the Major FIFO in a previous pass hasn t had a chance to be transferred into the Secondary FIFO it will be overwritten and lost Data should be written in the DQ_SL501_FRAMEDELAY_VMAP_LEN mode and firmware adds a frame bit 0x 100 to the first entry in the VMap packet When firmware completes a write into the Major FIFO it releases it When MCLK data is transferred into Secondary FIFO If the firmware doesn t lock the Major FIFO when the next MCLK arrives the Major FIFO data is transferred into the Secondary FIFO again Thus if the realtime program stops sending data to the layer it will continue to output that last received frame using MCLK as a timebase If the frame bit is set and the secondary FIFO waits for FCLK to output data Characters are put into the UART FIFO using TCLK to introduce inter character delay To initiate repeat mode one should call D
105. _SL553_BCDBG_START 1 Start debugger define DQ_SL553_BCDBG_STEP 2 Perform one step define DQ_SL553_BCDBG_GOTO 3 Go to specified descriptors and then stop define DQ_SL553_BCDBG_STOP 4 Cease BC operations lt major_idx gt index in the major frame descriptor table to execute to Use 1 if this is irrelevant lt minor_idx gt index in the minor frame descriptor table to execute to Use 1 if this value is irrelevant The function returns lt current_major_d gt current major frame descriptor where execution was postponed lt current_minor_d gt current minor frame descriptor where execution was postponed lt bc_status gt bus controller status 0 15 and addition interrupt status 16 31 registers combined Note User should set up a timeout value in the library long enough to allow the programmed number of commands to execute 4 25 25 DqAdv553WriteTxFifo Syntax int DAQLIB DgAdv553WriteTxFifo int hd int devn int channel uint32 tx_size uint32 tx_data Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 tx_size Number of words for transmission uint32 tx_data Data to transmit Output Returns DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or
106. a data buffer internal to the ACB into which the user can put output data The ret rieved parameter indicates how much data the returned buffer can accept in scans avail indicates the amount of remaining space in the ACB not including the returned buffer If a data buffer large enough to hold at least rqsizemin scans of data cannot be returned the function returns NULL in the data parameter and 0 in the ret rieved parameter In this case it does not necessarily mean that there isn t enough space in the ACB It could mean that the space wraps around the end of the ACB and the amount of space before the wrap is less than rqsizemin To detect this situation check to see if the value returned in avail is greater than or equal to rqsizemin 61 PowerDNA API Reference Manual Release 4 0 Note None 3 2 8 DgAcbSetBurstMode Syntax int DgAcbSetBurstMode int Iom uint32 trigger PpDQBURST pDqBurst uint32 entries Command DQE Input int iom IOM Descriptor uint32 trigger TRUE to use sync line as trigger pDQOBURST pDqBurst desired data buffer size in scans uint32 entries Number of pDQBURST entries Output uint32 entries Number of pDQBurst entries processed Return DO DAD PARAMETER data is NULL DQ_SUCCESS successful completion Description ACB burst mode is a special mode in which data acquisition into the IOM s internal memory continues until a predetermine
107. arrived on different bus RTRT Timeout detected RTRT Validation failed Gap within data word detected use only when Bit timing error on bus B Bit timing error on bus A Parity error on bus B Parity error on bus A Illegal command Message error Too many words were detected in RX message Too few words were detected inm RX message 4 25 3 DqAdv553Control Syntax int DAQLIB DgAdv553Control int hd int devn int channel uint32 flags pDO553Control params Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 flags What parameter to set up pDQ553Control params Parameters Output uint32 bus_errors Cumulative errors detected on the bus Returns DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM 266 PowerDNA API Reference Manual Release 4 0 DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion low level IOM error
108. be called This function receives VMap V Map packet regardless of lt vmap_id gt of the packet and returns lt vmap_id gt which can be used to select appropriate processing for the data 7 Call DgktVmapReadInput to copy received data from the V Map into user buffer 8 Optionally if the flag Do_vMaAP_FIFO_STATUS is set user can use DgRtVmapInputFifoAvailable and DgRtVmapOutputFifoAvailable functions to retrieve the amount of data either available in the input FIFO or room available in the output FIFO 86 PowerDNA API Reference Manual Release 4 0 3 7 1 DqRtVmap nitOutputPacket Syntax int DAQLIB DqRtVmapInitOutputPacket int handle int vmapid Command RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle Output None Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_ILLEGAL_HANDLE invalid non NULL value for iom DO SUCCESS successful completion Description This function clears all structures of the outgoing packet associated with lt vmapid gt Note None 3 7 2 DgRtVmapWriteOutpout Syntax int DAQLIB DgqRtVmapWriteOutput int handle int vmapid int device uint32 channel int rq_size uint8 data Command RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle int device Device number uint32 channel Channel number int rq_size Requested size uint8 data Pointer t
109. be called in the main cycle of the application 1 Allocate a fixed or a circular buffer for each channel of each device We suggest to use a circular queue as a data structure to store device data 2 Initialize VMap Add channels to VMap VMap and start VMap 3 Enable operations then while stop DqRt VmapInitOutputPacket clear outgoing packet 4 Store output data only for channels you would like to output data DqRtVmapWriteOutput data or DgRtVmapPlusWriteOutput channel data Last parameter is a pointer to the user buffer where data should be copied from For VMap V Map lt channel gt is the same channel which was added using DgRt DmapAddChannel For VMap lt rq_channel gt is the channel user actually requests data from 5 Store requests for input data Input data is what is going to be returned from the layer DqRtVmapRequest Input DqRtVmapPlusRequestInput The same difference between lt channel gt and lt rq_channel gt applies when user requests input 6 Exchange data with the cube There are two ways to refresh data a using DgRtVmapRefresh to send packet with the output data and input data requests wait for and the receive a packet with the requested input data b Call DqRtVmapRefreshOutputs to send output packet at the end of the cycle and then at the beginning of the cycle call DqgRt VmapRefreshInputs to receive recently received data As an option DqRtXmapRefreshInputs can
110. bit 1 if the 1553 RT that was in error state responded with status status only write zero to clear define SL553_MNF_DESC_RR ILZES Status bit 1 if entry was executed at least once status only write zero to clear define SL553_MNF_DESC_ED C1iee4 Status bit 1 if entry was executed with error status only write zero to clear define SL553_MNF_DESC_ERR ILLS Bits 2 0 are an error counter that counts the number of retry attempts If the number of retries is above the value specified in the control block an error bit is set Successful execution of the 1553 command sequence clears this counter lt mn_frame gt minor frame number from 0 to 15 lt mn_block gt minor frame block number Each minor frame has two parts containing 128 descriptors each Only one block can be read at a time define SL553_MNF_BLOCK1 1Le lt lt 1 block 1 of a minor frame define SL553_MNF_BLOCKO 1L lt lt 6 ditto block 0 lt index gt index of the minor frame descriptor to start writing a lt size gt of descriptors in the supplied array 289 PowerDNA API Reference Manual Release 4 0 4 25 20 DqAdv553WriteBCCB Syntax int DAQLIB DgAdv553WriteBCCB int hd int devn int channel uint32 mn_frame uint32 mn_block uint32 index uint32 size pBCCB_Control descriptor Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1
111. bit is used to easily set all of the FIR configuration values to their default state When the DQ_AI224_FIR_SET_DEFAULT flag is set all of the other lt act ion gt parameter bits are ignored The DQ_A1I224_FIR_ENABLE and DQ_AI224_FIR_DISABLE defines are used to enable or bypass the FIR filter when a custom FIR filte r has been loaded 151 PowerDNA API Reference Manual Release 4 0 lt decrat gt parameter sets the decimation rate Zero no decimation Setting a value of 1 discards one reading for every one kept two discards two readings for every one kept etc When the DQ_AI224_FIR_SET_DECRATE flag bit is set in lt action gt parameter The value in lt decrat gt is set lt tapsize gt and lt data gt parameters are used to load user defined filter coefficients to the selected FIR filters When the DQ_AI224_FIR_COEFF_LOAD flag bit is set in the lt act ion gt parameter the lt tapsize gt and lt data gt values are set lt tapsize gt is the number of coefficients expected in the array of double precision coefficients pointed to by lt data gt The coefficients should be in the 1 0 1 0 range The sum of all the coefficients should equal 1 0 depending on the value of the returned lt filter_total gt In order to maintain accurate calibration the filter coefficients should be scaled so that the returned lt filter_total gt value is exactly 32768
112. busy flag is zero The msbit will be set when the value is invalid value 3 is the read address that the next DQ_AO358_ EE RD command will use value 4 is the write address that the next DQ_AO358_EE WR command will use Note Internally the busy flag does toggle to the busy state briefly after every RD and WR command but it is not necessary for the user to test the state of the busy flag for the RD and WR commands The firmware will automatically test for busy and delay the command for the appropriate time The DQ_AO358_EE RD_ID_ADDR command sets the read address and DQ_AO358_EE_WR_OPEN sets the write address As long as sequential addresses are being read or written then multiple RD or WR commands may be sent without re sending the addresses Read and write addresses are stored separately so read and write may be interleaved if desired 4 12 2 DqAdv358Write Syntax int DgAdv358Write int hd int devn uint32 CLSize uint32 cl int takeraw uint32 data double fdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 CLSize channel list size uint32 cl channel list channel numbers int takeraw use raw data instead of float uint32 data array of raw binary data should be of CL size or NULL if takeraw is FALSE double fdata array of float point resistances or NULL if takeraw is TRUE 193 PowerDNA API Reference Manual Release 4 0
113. cancel ongoing sampling call the same function with Oxffffffff as the first channel element The channel list c1 is an array of uint32 elements with a length CLSize from 1 to 4 Each element of the channel list contains a bit packed word that defines the channel number the front end multiplexer configuration and the gain The following examples show the string of helper macros that are used to assemble the mux setting channel number and gain setting Example 1 First element 0 of the channel list specifies channel 2 with the front end mux set to read the S and S inputs with a gain of 10 cl 0 DQ_LNCL_CHANGAIN DQ_AI224 SET_CHAN DQ_A1T224 MUX_SS 2 DQ_AI224 GAIN_10 Example 2 Second element 1 of the channel list specifies channel 3 with the front end mux set to read the difference between the bridge completion voltage and the S input with a gain of 1 cl 1 DQ_LNCL_CHANGAIN DQ_AI224 SET CHAN DQ_AT224 MUX_CS 3 DQ_AT224_ GAIN_1 When using these macros the valid channel numbers are numbered from 0 to 3 The following defines are used to select the front end multiplexers DQ_AI224 MUX_SS S to S DQ_AIT224 MUX_CS Bridge comp S DQ_AI224 MUX_EXCP P to S DQ_AI224 MUX_PPS P to PS DO _AI224 MUX_NULL GND only for nulling DQ_AI224 MUX_PS PS to PS DQ_AI224 MUX_EXCN P to S DQ_AI224 MUX_5K Vdrop on 5k prec resistor The
114. clentry is nota valid channel number samples is NULL or requested value is not between 1 and 120 or data is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error 126 Description This function performs raw measurements of the following values DQL_IOCTL208_RI PowerDNA API Reference Manual Release 4 0 EA ground DQL_IOCTL208_RE D_AGND connect both differential inputs of the PGA to analog D_REF read 2 5V voltage reference DQL_IOCTL208_RE DOQL_IOCTL208_RE DQL_IOCTL208_RE DQL_IOCTL208_RE DQL_IOCTL208_RE DQL_IOCTL208_RE DQL_IOCTL208_RE R R R R DQL_IOCTL208_RE R R R R DQL_IOCTL208_RI EA D_Rs D_Rx D Ba D_Rb D_SS D_PP D_PS D_5k D_PSM measure S thru the PS line measure switch resistance Rs measure multiplexer resistance measure shunt resistor Ra measure shunt resistor Rb measure to S measure P to AGND measure PS to AGND measure 5k resistance Because the resistance can differ from channel to channel because current is flowing through different channels of the same multiplexer which can have different resistances one should set up the channel number to be used This funct
115. clock divider used to set the rate of the A D conversion The maximum allowable frequency to pace the main A D is 1Mhz Do not use values less than 65 when 66MHz is selected or less than 23 when 24MHz is selected The output frequency is clksrc clkdiv 1 Max value is 1023 When the DQA1211_CLKDIVSET flag bit is set in lt mask gt the value in lt clkdiv gt is set The default value is 65 lt fmt r gt This value sets a reduced precision mode reserved for special applications When the DQAI211_FMTRSET flag bit is set in lt mask gt the value in lt fmtr gt is set The following defines are provided define DQ_211_FMTR_NORMAL 0 define DQ_211_FMTR_REDUCED 1 The default value is DQ 211 FMTR_ NORMAL lt avg_factor gt This value sets the amount of averaging performed The number of samples averaged together is always a power of 2 Setting lt avg_factor gt to zero gives no averaging Setting lt avg_factor gt to l gives 2 samples averaged setting 2 averages 4 samples 3 averages 8 etc The 136 PowerDNA API Reference Manual Release 4 0 maximum value for lt avg_factor gt is 15 which averages 32 768 samples When the DQAI211_AVGFACTORSET flag bit is set in lt mask gt the value in lt avg_factor gt is set lt dec_factor gt This value sets the amount of decimation performed The decimation ratio is always a power of 2 Setting lt dec_factor gt to zero gives no decimation Setting lt dec_
116. contains valid data define DQAI211_FMTRSET 1L lt lt 3 1 if fmtr contains valid data define DQAT211_AVGFACTORSET 1L lt lt 4 1 if avg_factor contains valid data define DQAI211_DECFACTORSE 1L lt lt 8 1 if dec_factor has valid data define DQAI211_FIR_BY_DECFACTOR 1L lt lt 5 Set default FIR to follow sample rate determined by decimation factor The DQAI211_CFGLAYER_DEFAULTSET flag bit is used to easily set all of the layer configuration values to their default state Before setting up a custom configuration it is recommended to first set all values to their default state by setting lt mask gt to DQAI211_CFGLAYER_DEFAULTSET and calling DqAdv211SetCfgLayer When DQAI211_CFGLAYER_DEFAULTSET is Set all other lt mask gt flag bits are ignored lt clksrc gt This value selects the source of the clock to be used to pace the A D conversion on the layer This clock source is routed to the clock divider that is set by lt clkdiv gt below When the DQAI211_CLKSRCSET flag bit is set in lt mask gt the value in lt clksrc gt is set The following defines are provided define DQ_211 CLK _66MHZ 0 define DQ 211 CLK _24MHZ 0x10 define DQ _211_CLK_SYNC2 0x18 define DQ_211_CLK_SYNCO_BUS 0x8 define DQ_211_CLK_SYNC1_BUS 0x9 define DQ_211_CLK_SYNC2_BUS Oxa define DQ_211_CLK_SYNC3_BUS Oxb lt clkdiv gt This value sets the
117. current Code 0x800000 1 788uA define DO LA ADC H FAN 9 Fan voltage Code 0x800000 149nV 23 1V define DQ LA ADC_V_1 2 8 1 2V source Code 0x800000 149nV 23 1V define DO LA ADC_V_1_5 7 1 5V source Code 0x800000 149nV 23 1V define DQ_L4_ADC_V_IN 6 Input voltage Code 0x800000 149nV 45 3V define DQ_L4 ADC_GND_2 5 internal reference ground define DO LA ADC_V_24DNR 4 24V DNR Code 0x800000 149nV 23 1V define DQ_L4_ADC_V_CAP 3 V capacitor define DO LA ADC_V_3_3DNR 2 3 3V DNR Code 0x800000 149nV 23 1V define DO LA ADC_GND 1 internal reference ground define DO LA ADC_V_2_5DNR_ 0 2 5V DNR Code 0x800000 149nV 23 1V Channels from 0x10 to Oxlc return over the limit settings for abovementioned channels Channels from 0x20 to 0x2c return under the limit settings for abovementioned channels Channel 0x30 is a direct write read to from LED register i e write occurs upon command execution Channel 0x31 is a direct write read into configuration register Channels 0x32 and 0x33 have similar functionality however actual read write is performed by periodic supervisor routine define DO L DNRP_LED_CH 0x30 direct R W to LED register define DQ_L2 DNRP_FAN_CH 0x31 direct R W to CFG register define DO L2_DNRP_LED_MNGD 0x32 managed R W to LED register define DQ _L2 DNRP_FAN_MNGD 0x33 managed R W to CFG register Note None 4 31 2 DqAdvDnxpSetConfig Syntax in
118. data such as the AI 4xx series layers 3 4 13 DqRtDmapStart Syntax int DgqRtDmapStart int handle int dmapid Input int handle Handle to the IOM int dmapid Identifier of the DMAP to start Return DQ_ILLEGAL HANDLE invalid IOM handle DO_SUCCESS command processed successfully Description This function starts operation and the cube updates its internal representation of the map at the rate specified in DgRtDmapCreate 3 4 14 DqRtDmapStop Syntax int DgRtDmapStop int handle int dmapid Input int handle Handle to the IOM int dmapid Identifier of the DMAP to stop Return Ba ict PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL HANDLE invalid IOM handle DQ_SUCCESS command processed successfully Description This function stops operation and the cube stops updating its internal representation of the data map 3 4 15 DqRtDmapRefresh Syntax int DqRtDmapRefresh int handle int dmapid Input int handle Handle to the IOM int dmapid Identifier of the DMAP to refresh Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_SUCCESS command processed successfully Description This function refreshes the host s version of the map by downloading the IOM s map Note The IOM automatically refreshes its version of the data map at the
119. devn int counter int reg uint32 value Output uint32 value DqAdv601ReadRegisterValue int hd int devn int counter uint32 value Handle to IOM received from DqOpenI Layer inside the IOM Counter number 0 7 One of the DQ_CTU_XXxX constants indicating which register to read Pointer to receive data value OM Read data value 322 PowerDNA API Reference Manual Release 4 0 Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DO BAD _ PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_TOM_ERROR DQ_SUCCESS Other negative values Description illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid reg is not one of the DQ_CTU constants or value is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function reads the value from a register reg of the counter relative to layer devn counter channel The following registers are allowed DQ_CTU_STR DQ_CTU_PS DQ_CTU_CR DQ_CTU_PC DQ_CTU_CRH DQ_CTU_CRL DQ_CTU_FCNTI DQ_CTU_FCNTO DQ_CTU_ISR Note None 4 26 11 Syntax int uint32 reg uint32 Command DQE Input int hd int devn int counter int reg ui
120. duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This is the first function to be called for asynchronous operations It created a channel of communication between the cube and the host and allocates packet queue and all required support structures Call DgRtAsyncCloseIomM to free this memory 3 11 2 DqRtAsyncCloselOM Syntax int DAQLIB DgqRtAsyncEnableEvents int handle uint32 flags uint32 enable_mask Command Enable sending asynchronous events from the cube Input int handle Handle to the asynchronous IOM channel received from DqRtAsyncOpenIOM Output 107 PowerDNA API Reference Manual Release 4 0 None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SOCK_LIB_ERROR Socket library error DO_SUCCESS successful completion Other negative values low level IOM error Description Use this function to close asynchronous channel 3 11 3 DqRtAsyncClearEvents Syntax int DAQLIB DqRtAsyncClearEvents int handle uint32 flags Command Clear waiting to be processed events in the queue Input int handle Handle to the asynchronous IOM channel received from DqRtAsyncOpenIOM int flags Reserved Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn
121. e following shows how to make a common filter configuration that jects 0x241 0x514 and 0x4E1 and accepts 0x541 and 0x641 241 010 0100 0001 lay out the bits to reject convert hex to binary 514 101 0001 0100 4E 00 1110 0001 lay out the bits to accept 54 01 0100 0001 641 110 0100 0001 Now shift the groupings left by one place and pad with 21 x s on the ti ght to make it a full 32 bit word reject 0100 1000 001x XXXX XXXX XXXX XXXX XXXX AN AN ac AN 1E 010 0010 100x XXXX XXXX XXXX XXXX XXXX 001 OO OO1lx XXXX XXXX XXXX XXXX XXXX cept 100 1010 1000 001x XXXX XXXX XXXX XXXX XXXX 000 001X XXXX XXXX XXXX XXXX XXXX ow a DH xx0 100x Oxlx xxxx XXXX XXXX XXXX XXXX for each column if both accept bits are the same and at least one reject bit is different then copy the accept bit otherwise make it x 1000 1000 0010 0000 0000 0000 0000 0000 make code copy row a and 8 r 011 r 1 6 1 r make 8 2 0 the a all x s be zero 0000 convert binary to hex D 00 row has a 5 F the a cceptance code 0x88200000 01 0101 1111 1111 1111 1111 1111 make mask put a 1 where at n x The others become zero F F FF convert binary to hex cceptance mask Ox615FFFFF Example 2 29 bit filtering
122. fer in bytes buffer to store ASCIIZ name of the IOM DQ_DEVNAME_SIZE bytes max OM retrieved IOM name ASCIIZ string illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command if the Command is processed successfully low level IOM error DqCmdSetParameters int DgCmdSetParameters int Iom PDQSETPRM pDQSetParm uint32 CRC Note None 2 2 41 Syntax Command DQCMD_S Input int Iom pPDOSETPRM pDQSetParm uint32 CRC Output uint32 CRC Return DQ_ITLLEGAL_ HANDLE DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_TOM_ERROR DQ_SUCCESS Other negative values Description ETPRM 0x170 Set Power up Values Handle to the IOM returned by DqOpen I pointer to parameter specification OM pointer to uninitialized CRC unused pass in NULL CRC of data actually written unused always returns 0 if not NULL illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command if the Command is processed successfully low level IOM error 34 PowerDNA API Reference Manual Release 4 0 This function sets up named and
123. from the PowerDNA cube Output uint8 Data data received from the PowerDNA cube Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DC SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function reads multiple values from a physical address on IOM You have to initialize pwDQORDVALM structure before calling it DQCMD_RDVALM structure typedef struct uint32 addr int16 increment uint8 size uint8 count wDQRDVALM pwDQRDVALM Note The maximum count is limited by the packet size This low level function can be dangerous to use because all IOM address space is accessible I O layer triggers may be initiated when certain memory is read This function is password protected with user level password 2 2 22 DqCmdSetCfg Syntax int DqCmdSetCfg int Iom DQSETCFG pDQSetCfg uint32 Status uint32 entries Command DOCMD_SETCFG 0x124 Set Configuration for the Device Input int Iom Handle to the IOM returned by DqOpenIOM DQSETCFG Array of configuration structures pDOSetCfg uint32 Status Array to store status information from all configured devices uint32 entries Number of configuration structur
124. function performs a direct copy of the contents of the buffer into IOM device object memory Thus one should check firmware and library versions prior to calling this function to avoid incompatibility in structures defined in library and firmware A special mode is used to store or retrieve named parameters Named parameters cannot be stored in EEPROM but instead can be used to affect operations of the PowerDNA cube To set up or retrieve named parameters pass IoMODE_NAMEDPRM as mode and one of the following named parameters as a uint32 field in the value buffer 36 PowerDNA API Reference Manual Release 4 0 define DQ _IOPRM_NBUFS 0x100 number of buffers for streaming define DQ_IOPRM_CLPERINT 0x200 number of channel lists per interrupt define DQ_IOPRM_ADDLDELAY 0x400 additional delay control define DQ_IOPRM_RQID 0x1000 Request id for streaming RDFIFO Note Named parameters are layer dependent Not all of them are implemented 2 2 43 DqCmdSaveParameters Syntax int DgqCmdSaveParameters int Iom uint32 devn uint32 HashCode Command DQCMD_SAVEPRM 0x178 Save Parameters Input int Iom Handle to the IOM returned by DqOpenIOM uint32 devn layer ID to store data into EEPROM uint32 HashCode pointer to receive hash code of saved parameters Output uint32 HashCode hash code of saved parameters Return DQ_ILLE
125. high level API provides two mechanisms Advanced Circular Buffer ACB and Direct Data Mapping DMap Not all layers support ACB or DMap functions Therefore it is important to call DqAcbIsSupported and DqDmapIsSupported to verify that operations exist for the layer This section describes common ACB and DMap functions dedicated ACB functions dedicated DMap functions and common ACB and DMap control and event functions 3 1 Common ACB Dap and Msg functions These are functions common to both ACB and DMap mechanisms 3 1 1 DgAcbIsSupported Syntax int DgAcbIsSupported int iom uint32 devn uint32 ss int supported Command DQE Input int iom handle to IOM received from DgOpenIOM uint32 devn layer inside the IOM uint32 ss subsystem of layer int supported pointer to Boolean to receive value Output int supported returns TRUE if the IOM device subsystem supports ACB operation FALSE if not Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_SUCCESS successful completion other negative values other error Description This function verifies that the IOM device subsystem supports ACB operation Note None 3 1 2 DgDmapls Supported Syntax int DaDmapIsSupp rted int iom uint32 devn uint32 ss int supported Command Ag PowerDNA API Reference Manual Release 4 0
126. index in the minor frame table uint32 size Number of descriptors to read pBCCB_Status descriptor Array of BCCB descriptors Output Returns Q_NO_MEMORY error allocating buffer Q_ ILLEGAL HANDL S illegal IOM Descriptor or communication wasn t established Q_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 O BAD PARAMETER Configuration parameters are incorrect Q_SEND_ERROR unable to send the Command to IOM Q_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration Q_TOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads the status part of BCCB descriptors for the minor frame and slot selected A BCCB status part has the following structure typedef struct uintl6 stsl1 tl6 sts2 t16 tsmsb tl6 tslsb tl6 rsv84 tLe rsv85 tl6 errsts0 tl6 errstsl GG Se er GS Poo oe Be ui BCCB_Status int16 rx_data 32 40 urntl s total pBCCB_Status First status reply from the RT Second status reply from the RT Timestamp of last access to the RT Timestamp of last access to the RT 16 MSBs 16 LSBs error status 0 error status
127. indicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration 316 PowerDNA API Reference Manual Release 4 0 DOs OM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads data from the RT SA memory which is updated upon a Receive command from a BC See DgAdv553 WriteRT for full description 4 26 DNA CT 601 layer 4 26 1 Syntax int DgAdv601SetRegister int hd int devn int counter uint32 reg uint32 value DgAdv601SetRegister Command DQE Input int hd int devn int counter uint32 reg uint32 value Output None Return DQ NO MEMORY DQ_TLLEGAL HANDLE DO BAD DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_SUCCESS Note Other negative values Description This function writes value to the selected reg register reg specifies relative offset of the register of interest None 4 26 2 Syntax Handle to IOM received from DqOpenIOM Layer inside the IOM Counter number 0 7 Register o
128. input followed by A B low low QDU_EB_RE_LH rising edge on the debounced input followed by A B low high QDU_EB_RE_HL rising edge on the debounced input followed by A B high low QDU_EB_RE_HH rising edge on the debounced input followed by A B high high One of the QDU_ES_XXX event source constants QDU_ES_Z Z input QDU_ES_T T input One of the QDU_TBS_XXX timebase source constants QDU_TBS_66M internal 66Mhz timebase QDU_TBS_TRIG debounced TRIGIN pin 346 int clkout_en int clkout_mode int trg_src int trg_clr int trgout_en int trgout_mode PowerDNA API Reference Manual Release 4 0 QDU_TBS_SYNCO SYNCO line QDU_TBS_SYNC1 SYNCI line QDU_TBS_SYNC2 SYNC2 line QDU_TBS_SYNC3 SYNC3 line TRUE to turn on CLKOUT One of the QDU_COM_XXX clock mode constants QDU_COM_CRIG CLKOUT 1 if CR gt CRI QDU_COM_CRIE CLKOUT 1 if CR CRI QDU_COM_1X CLKOUT Ix QE clock QDU_COM_2X CLKOUT 2x QE clock QDU_COM_4X CLKOUT 4x QE clock QDU_COM_IE CLKOUT Index event QDU_COM_N Inc Dec N pulse when CR increments decrements by QDU_INC counts One of the QDU_TRS_XXX trigger source constants QDU_TRS_SW software trigger source QDU_TRS_HW hardware trigger source TRUE to use auto clear at the end of the count only in triggered mode TRUE to turn on TRGOUT One of the QDU_TOM_XXxX trigger output mode constants QDU_TOM_CROL TRIGOUT 1 if CR lt CRO QDU_TOM_CROE TRIGOUT 1 if CR CRO QDU_TOM_GTS TRIGOU
129. int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chnl device Channel uintl6 data buffer of message to send with parity bit 9 encoded uintl6 size length of message Output uint16 written number of bytes written int success TRUE if message was written uint8 errorcode if success FALSE returns 501 specific error code Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DQ DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function is for immediate mode usage only It writes a block of data to a serial port If size written all data fits into the outbound FIFO Note The version of DgAdv501SendMessage with parity included with the data 4 21 20 DqgAdv501ReadWriteAll Syntax int DgAdv501ReadWriteAll int hd int devn uint32 tx_ch uint32 Ca Ch uint32 tx_chan_arr uint32 tx_data_arr uint32 tx_size uint32 tx_wrt uint32 tx_avl uint32 Ca Chan art uint32 rx_data_arr uint32 rx_size uint32 rx_read uint32 rx_rmns Command DQCMD_WRRDFIFO 236 PowerDNA
130. is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up the configuration for a counter in a 601 layer for getting period measurements For an extended parameter description see DgAdv601ConfigCounter Note None 4 26 18 DqAdv601CfgForPWM Syntax int DgAdv601CfgForPWM 332 PowerDNA API Reference Manual Release 4 0 Command DQE Input int hd int devn int counter int startmode int sampwidth int ps int ert int crl int dbg int dbc int iie int gie int oie int extclk int trig int trs int enc int gated int re int end_mode int lr TALE CEG Output THE fo Return int hd int devn int counter int startmode int sampwidth int ps tne EE sen er int dbg int dbc int iie int gie int oie int extclk Ine CRUG ait irs int enc int gated int re int end mode int Ilr int cfg Handle to the IOM received from DqgOpenIOM Layer inside the IOM Counter number 0 7 DQ_PL601_SM const DQ_PL601_SW const DQ_PL601_SW 8 16 32 specify sample width for period update Prescaler register value Compare register 0 value Compare register 1 value Input debouncing gate register value Input debouncing clock register value RUE to t
131. is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets the FIFO watermark level during buffered ACB Messaging modes Note None 4 27 10 DqAdv604ReaadDioln Syntax int DgAdv604ReadDioIn int hd int devn uint32 din Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM 349 PowerDNA API Reference Manual Release 4 0 DEES n Output parameter that receives the din value Output Wines din din value Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 604 DQ_BAD_PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function returns the status of all digital input lines Note None 4 27 11 DqAdv604ReaadDioOut Syntax int DgAdv604ReadDioOut int hd int devn uint32 dout Comm
132. layer is involved in any streaming or data mapping operations If the user specifies a short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every call to the function returns the latest acquired data If one would like to cancel ongoing sampling call the same function with Oxffffffff asa channel number Note 4 8 2 DqAdv225SetRate Syntax int DgAdv225SetRate int hd int devn float fCLC1k uint32 TrigMode Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM float fCLC1k desired acquisition rate in Hz uint32 TrigMode clocking and triggering mode can be NULL Output float fCLC1k actual acquisition rate in Hz Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AJ 225 DQ_BAD_PARAMETER CLC1k is NULL or points to 0 value DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low lev
133. level IOM error This function is a simplified version of DqAdv254GetWFMeasurements that allows measurements on channel B only This is sufficient for most applications 4 9 6 DqAdv254Enable Syntax int DqAdv254Enable int hd int devn uint32 config int enable int CLSize uint32 cl Command DQE Input int hd int devn uint32 config int enable int CLSize uinci cl Output Handle to the IOM received from DqgOpenIOM Layer inside the IOM Reserved TRUE to enable channels Size of the supplied channel list Channel list 164 Return PowerDNA API Reference Manual Release 4 0 None NO_MEMORY LLEGAL_ HANDLE BAD _DEVN Q_ Q_ Q_ Q Q_ ve Q SEND_ERROR BAD_PARAMETER TIM OM_ UT_ERROR RROR FO Q_SUCCESS Other negative values Description error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 254 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function enables disables operations for the channels specified in the channel list This function should be called after DgAdv254SetMode in point
134. luet 74 S417 DORTDmapRetreshIMpuits egene Eege 75 SE WE OR RE Eine Le 75 3 5 Real time Variable size Data Mapping VMap Functions csseeeecseeeeeeees 75 3 5 1 DG REV ee E 77 3 5 2 Heeler Eege dE ag 78 3 5 3 DaRtVmapGetlnputMap EE 78 204 D RtVmapG amp etOutputMap ee irinenn eeso Eed aaa a ie 79 3 5 5 DaRtVmapAddOutputData E 79 SE RE e Ee RE 80 S08 RE ae eeler E 80 3 5 8 D RtVmapG amp etlnputDatak ses senner oe eaaa iaaa bandedsesenghacgecenversads 81 KEE RE aen GE 81 3 510 DORI MAD SLOP E 81 3 5 11 IDORIDV MADR GIRCS EE 82 2 0 12 DaRtVmapRefreshOutPutS eege ege Eer Ee 82 3 5 13 DaRtVmapRefreshInp tS tc3 sesecoceteAiatde dente seh des a pae sup i aa e aa eaa ep a a 83 TES EE Re eeler 83 3 6 Real time Variable size Data Variable channels Mapping VMap Functions 83 3 6 1 DqRtVmapAddOutputChanne Data A 84 3 6 2 DqRtVmapRalnputChannelDatasZ cece eee eeeeeeeeeeeeeeeeneeeeeeeeeeeeaeeeeeeeesees 85 3 7 Simplified VMap and VMap Functions ccccccsseeeeeeeeeeeeeeeeeneeeeeeseeseeeeeeeenseeees 85 3 7 1 Beta enee Tei GT EE 87 3 7 2 DqRtVmapWriteOutput ees EE 87 be E DqRtVmapPlusWriteOutput EE 88 3 7 4 Ce 88 3 7 5 DeRiVmapPlusRequestInput 22 eege e lates hse ae re 89 3 7 6 IDG rea EE eege 90 3 7 7 DqRtVmaplnputFifoAvailable xs occ eed dee Eeer 90 3 7 8 DqRtVmapOutputFifoAvailable EE 91 3 8 Messaging Msg FunctionS ssssssunnneeseunnnnrenunnnnnnnnnnnnnnnnunnnnnnnnnnnnnnnnnnnnnnnnnnn mnnn 93
135. modal layer parameters These parameters reside in a device object and can be partially stored in layer EEPROM One has to know the EEPROM structure of the layer being accessed to set parameters correctly DOQCMD_SETPRM is used to set and retrieve layer parameters DQCMD_SETPRM typedef struct uint8 dev device uint8 ss subsystem uint8 mode parameter mode uint8 value array of values DQOSETPRM pDQSETPRM The following values for mode are available Returned structures xxx layer model define DQ_IOM_ACCESS_INIT INITPRM_xxx_ define DQ_IOM_ACCESS_CALIBR CALSET_xxx_ define DQ_IOM_ACCESS_OPERS OPMODEPRM_xxx_ define DO LOM ACCESS SHUTDOWN SDOWNPRM_xxx_ define DQ_IOM_ACCESS_NAMEDPRM named parameters in lt value gt are expected define DO IOM ACCESS NAMES CNAMES_xx_ define DQ_IOM_ACCESS_EECMNDEVS EECMNDEVS The first four modes are used to store copy to memory DOOPMODEPRM_ DQ_IOMODE_OPS DQINITPRM_ DQ_IOMODE_INIT DOSDOWNPRM Do_IomMopE_spD DOCALSET_ DQ_IomopE_crcG If one needs to store or retrieve names of channels DQ_IomopE_Names should be used Appropriate data should be stored in value array for set operation The function performs a direct copy of the contents of the buffer into IOM device object memory Thus one should check firmware and library versions prior to calling this function to avoi
136. model define _MODESCAN OL lt lt 16 single scan update mode define _MODEFIFO 1L lt lt 16 continuous output with FIFO There are two definitions common to all models define DQ_FIFO_MODESCAN OL lt lt 16 single scan update mode define DQ_FIFO_MODEFIFO 2L lt lt 16 continuous acquisition with FIFO The first mode is selected for DMap operation and maps one or more scans into the physical memory of the device The second mode is the streaming mode This mode is selected when the layer streams to the ACB The user can select start and stop triggers These settings are applied to external trigger lines connected to a CM 1 layer The user may also select the po_LN_active bit to light up STS the status LED on the layer Flag po_LN_ENABLED should be selected library sets it anyway TrigMode Allocate and pass a pointer to the following structure to set up hardware triggering parameters typedef struct uint8 dev device uint8 ss subsystem uint8 ch channel uint8 mode trigger mode AND or OR Start trigger uint32 trigtypeS trigger type enable edge or mask union float levels level uint32 maskS us stoP trigger uint32 trigtypeP trigger type enable edge or mask union float levelP level uint32 maskP uP float hyster hysteresis for both triggers int prescans pre trigger scans int postscans post tr
137. of raw binary ADC data double fdata array of float point voltages or currents Return DQ_NO_MEMORY error allocating buffer 194 PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AO 358 DQ_BAD_PARAMETER channel number in channel list is not a valid AO 385 channel number DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function requests conversion results for each channel specified in the channel list and stores them alongside converted data At each channel each ADC reading takes approx 0 16 seconds If all 5 channels are to be read then it will take 0 8 seconds to make all 5 readings If this function is called at a rate that does not allow enough time for conversion to occur then old or invalid data may be returned New data is indicated by the presence of a 1 in the MSBit of the bdata The DQ_AO358_ MAKE CL CH SUBCH macro should be used to make the contents of the channel list The AO 358 has 8 channels with each channel having 5 ADC channels also known as subchannels
138. or healt fuli programmed time including RI RT errors state machine error or MC error warning bus was changed transmitter shutdown or overrid synchronize event reset condition misc mode commands lake ITF specify RT SA combination data data data data mode bus controller events recevieved transmitted recevieved transmitted EV553_CLEAR 0x100 bus or RT controller event EV553_NO_ACTIVITY EV553_IN_FIFO EV553_OUT_FIFO L EV553_BUS_ERROR EV553_FSM_ERROR E EV553_BUS_CHANGED mode commands received EV553_MD_ SHUTDOWN EV553_MD_ SYNCHRONIZE EV553_MD_RESET L EV553_MD_MISC receive or transmit EV553_RX Ki EV553_TX AA EV553_BCST_RX L EV553_BCST_TX EV553_MD GE command received broadcast broadcast related event by code one of bus controllers errors i bus error bus not idle transaction took too long user requested interrupt from the BC frame BC overrun event one or more command has fail Minor frame started major or mi inor frame led or an RT is dead If an event happens a packet of the following structure is send from the cube to notify the host about this event typedef struct uint8 d uint8 s uintl6 s uint32 e uint8 d DQEVENT p ev ET ize vent ata DOEVENT device subsystem data size even
139. order to replace data inside of the minor frame and or minor frame descriptors OT Execute once flag if set entry will be executed once and then it will be automatically disabled May be used for the minor frame filled with aperiodic messages IRQ Issue IRQ upon completion of the minor frame execution SL553_ PORT_BCI_UIRQ SWAP Enable entry if disabled or disable if enabled upon SWAP request SWAP request allows simultaneous change of the sequence in the major frame descriptor table at the beginning of the major frame cycle Write to SL553_ PORT_BCSWP 0x21A4 0x28A4 initiates SWAP cycle upon next major frame clock ED Status bit 1 if entry was executed at least once MRF Minor frame ID 0 15 4 25 17 DqAdv553WriteMJDescriptors Syntax int DAQLIB DgAdv553WriteMJDescriptors int hd int devn int channel uint32 index int size uint32 descriptors 285 PowerDNA API Reference Manual Release 4 0 Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 index Descriptor index in the major frame table int size Number of descriptors to write uint32 descriptor Array of descriptors Output Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 15
140. perform MAC address IP address gateway network mask startup state baud rate for serial interface default UDP port DQSETCOMM pDOQSETCOMM todo can be one of the following Ss DO READCOMM 1 read parameters This function returns parameters read from the parameter memory Ss DQ_WRITECOM M 2 write parameters This function writes specified parameters into parameter memory startup consists of four bytes 389 PowerDNA API Reference Manual Release 4 0 uint8 autorun 0 wait for user input from terminal 1 load and execute firmware e uint8 runtype 0 wait in configuration mode 1 switch to operating mode upon initialization uint8 portnum unused set to 0 uint8 protocol unused set to 0 Byte order is big endian autorun runtype portnum protocol Note This is a pending command Use a large timeout Do not call in operating mode Parameters will not affect execution right away To make parameters go into effect the user has to reset the PowerDNA cube either physically or by issuing a DOCMD_RST command This function is password protected with user level password 2 2 89 DgqCmdSetName Syntax int DgqCmdSetName int Iom char Name int32 CRC Command DQCMD_SETNAME 0x168 Set Device Name Input int Iom
141. performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description DNA 432 433 supports normal soft start soft stop and PWM modes of operation Soft start and soft stop modes are designed to prolong the life of incandescent indicator bulbs connected to the outputs of the layer In normal mode the output FET switches from closed state to open state and back In soft modes the FET switches on and off increasing for a start duty cycle and decreasing for a stop duty cycle until it reaches 100 or 0 duty cycle In PWM mode the layer output produces a pulse train of the selected period with the selected duty cycle lt period_us gt can be selected for the whole layer It defines the total PWM period lt count gt specifies the size of the array of pop10432Pwm structures to follow lt pDQDIOPWMs is a pointer to the array of popropwm structures To specify the mode of operation for each channel the user should pass an array of one or more DQDIO432PWM structures typedef struct uint8 channel channel number uint8 mode mode of operation uint32 duty_cycle_length duty cycle or length of the full soft start soft stop cycle DQDIOPWM pDQDIOPWM lt mode gt can be one of the following define DQDI0432_PWM_DISABLED define DQDI0432_PWM_SOFTSTART define DQDI0432_PWM_SOFTSTOP define DQDI0432_PWM_SOFTBOTH define DQDI0432_PWM_MODE PWM and soft start disabled use
142. portOucmset int32 portOucm Vale int32 rdcntset int32 rdcnt int32 adccfg0set dh int32 adccfg0 int32 adccfglset int32 adccfgl int32 disdivset int32 disdiv DQDIO416DATAOUT cfg xy 1 if cfg should be updated Set disconnection mode 1 if discfg should be updated Override circuit breaker 1 if adcspd should be updated Set ADC Timing 1 if port0Oocm should be updated Set over current interrupt mask 1 if portOucm should be updated Set under current interrupt mask 1 if rdcnt should be updated Set number of failed samples prior breaker engagement 1 if adccfg0 should be updated User ADC conversion control word for low side ADC 1 if adccfgl should be updated User ADC conversion control word for high side ADC 1 if disdiv should be updated 66MHz divider for the re enable counter pDOQDIO416DATAOUT disconnection mode configuration bitmask bits 15 0 represent channels 15 0 A one in a corresponding bit enables auto retry mode of the circuit breaker The auto retry period is defined by the disdiv parameter discfg allows override of the circuit breaker Note that 1 Overriding circuit breaker may permanently damage the layer if currents above the rated 1A will be flowing through the circuitry for a prolonged period of time and 2 Updating this parameter will not re enable 203 PowerDNA API Reference Manual Release 4 0 already disabled channels if
143. presented on all four channels in an array of four following structures it is user responsibility to allocate this array typedef struct uint32 min_lvl waveform minimum uint32 max_lvl waveform maximum uint32 sum average accumulated sum Sa Sd uint32 cal calibrated angle uint32 raw raw angle uint32 zc0 zero crossing 0 uint32 zcl zero crossing 1 uint32 zcO_var variation of ze uint32 zcl_var variation of zcl uint32 raw_var variation of the raw position uint32 clk_fra selected AIn AOut clock uint32 wf_phase phase in 15 15ns clocks float ampl waveform amplitude float freq waveform frequency float offs waveform offset WFPRM_255 pWFPRM_255 D Information is returned for each channel separately in the hardware representation lt min_lvl gt and max Ivl are readings from minimum and maximum level detectors in int16 format You can calculate the span of the waveform by subtracting the minimum from the maximum The maximum span of the waveform is 80V pp lt sum gt is a current sum integration of all measurements performed during the half period of the waveform from one zero crossing event to another lt cal gt is a calibrated position of a synchro or resolver the one returned in DqgAdv255Read this is a 24 bit 2s complement number lt raw gt is the position of a synchro or resolver before applying the lt usr_of
144. represents the aggregate for all subsystems of that device in other words an error bit will be set if at least one subsystem has that error bit set You can then call DqCmdReadStatus with the specific device number to find out which subsystem had the error 2 2 24 DgqCmdWriteChannel Syntax int DgqCmdWriteChannel int Iom pDQWRCHNL DQChannelData uint32 DataBufLen Command DQCMD_WRCHNL 0x12C Write Channel Input int Iom Handle to the IOM returned by DqOpenIOM pDQWRCHNL Array of structures that define device subsystem channel and DQChannelData data uint32 DataBufLen Combined size in bytes of all structures contained in DOChannelData Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration Other values low level IOM status Description This function writes channels specified in DOWRCHNL structures The IOM firmware scans incoming data and passes subsystem and channel information to the appropriate device driver The data field should be typecast to a data size appropriate to the device For example for an AI 302 the data field should be typecast to uint 16 See user manual for a complete list DOQCMD_WRCHNL transfers data in the following format
145. routes SyncIn connector to one of the SYNCX lines Call DqCmdSetS yncRt after calling this function to make connection Note For PPC cubes only 4 32 5 DqAdvRouteSyncOut Syntax int DgAdvRouteSyncout int hd int line Input int hd Handle to IOM received from DqOpenIOM int line Line to assign Use one of the following DQ_EXT_SYNCO DQ_EXT_SYNCI1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 0 to release 364 PowerDNA API Reference Manual Release 4 0 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_PARAMETER line has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function routes one of the SYNCX lines to the SyncOut connector Call DqCmdSetSyncRt after calling this function to make connection Note For PPC cubes only 4 32 6 DqAdvRouteSyncClockln Syntax int DqAdvRouteSyncClockIn int hd int line Input int hd Handle to IOM received from DqOpenIOM int line Line to assign Use one of the following DQ_EXT_
146. send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function clears the current count CR CRH or CRH CRL of the specified counter Note None 4 26 8 DqAdv601Read Syntax int DgAdv601Read int hd int devn int CLSize uint32 cl uint32 data Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int CLSize Number of channels to read uint32 cl Channel list uint32 data Pointer to receive data values Output uint32 data Read data values Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 DO BAD PARAMETER counter number is invalid reg is not one of the DQ_CTU constants or value is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads the current count values from the counters specified in the channel list It is used for immediate mode Note Period measurement returns 2 uint32 per channel It is up to the user to determine the size of uint
147. special functions Setting the value to DQ_211_SEC_N_OFF disables the transfer of this data but does not inhibit the functioning of the visual alarm LED The DQ_211_SEC_N_STD define is the recommended setting for this value but it may be set to any value from zero to 32 767 4 5 3 DgAdv211SetCfgLayer Syntax int DgAdv211SetCfgLayer int hd int devn pDOQCFGLAYER_211 ldata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM pDQCFGLAYER_211 Pointer to 211 layer config structure see below ldata Output None Return DO NO MEMORY error allocating buffer DQ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 211 DO DAD PARAMETER One of the values in the PDQCFGLAYER_211 structure is set to an illegal value DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up advanced layer configuration parameters for the AI 211 These settings apply to all channels on the layer In the normal case these configuration settings are set automatically by the DqAcbInit
148. ss subsystem uint8 ch channel uint8 mode trigger mode AND or OR Start trigger uint32 trigtypesS trigger type enable edge or mask union float levels level uint32 masks uS stoP trigger uint32 trigtypeP trigger type enable edge or mask union float levelP level uint32 maskP uP float hyster hysteresis for both triggers int prescans pre trigger scans int postscans post trigger scans 1 continue operations DQSETTRIG pDQSETTRIG field mode in the structure defines the meaning of other fields Definitions for triggering and define DQ TRIGGER SET ON 1L lt lt define DQ_TRIGGER_SET 1L lt lt define DQ_TRIGGER_ONCE 1L lt lt define DQ_TRIGGER_RESET 1L lt lt define DQ_TRIGGER_STOP 1L lt lt define DQ_TRIGGER_START 1L lt lt 2 2 53 DqCmdSetLock Syntax int DgqCmdSetLock int Iom TP Command Input synchronization interface 5 set alternative condition OR trigger 4 set trigger or add additional AND condition trigger only once veset trigger to default issue stop trigger issue start trigger uint8 Mode char Password uint32 DOCMD_SETLOCK 0x1CO Set clear lock or query lock status int Iom Handle to the IOM returned by DqOpenIOM uint8 Mode function mode lock unlock check char Password password string ignored and can
149. status are used For reference we have summarized in the following table the various types of 1553 commands supported by a DNR 553 1553 bus controller Command1553 Code Cmd Case RT SA addressed Commands Rx BC gt RT 1 RX Do Se Dn St gap le Tx RT gt BC 2 TX St Do Dy gap 2b RxTx RT gt RT 3 RX TX StTx Do Dy StRx gap 3a TXMo 4 MC S St gap la TXM 5 MC 7 St Data gap 2a RXM 6 MC Do St gap Ic Broadcast Commands Rx BC gt RT 7 RX Do a Dy gap 1f RxTx RT gt RT 8 RX TX StTx Do Dn gap 3b TXMo 9 MC gap 1b RXM 10 MC Do gap ld RX receive command TX transmit command Do Dn 16 bit data words from 1 to 32 words are allowed MC mode command St status word StRx status issued by the receiving terminal StTx status issued by the transmitting terminal time between bus controller command and terminal response standard calls for 12uS gap a gap between messages when both lines are low lt flags1 gt controls retry behavior as defined in MIL1553 protocol if an error during command execution was encountered define BC1553_BCB_FLAGS1_RSV15 1L lt lt 15 Reserved define BC1553_BCB_FLAGS1_IRT 1L lt lt 14 Retry on incorrect RT in status define BC1553_BCB_FLAGS1_RUS 1L lt lt 13 Retry on unexpected st
150. subsystem of layer int supported pointer to receive result Output int supported returns TRUE if the IOM device subsystem supports Msg operation FALSE if not Return DQ_ILLEGAL HANDLE invalid iom handle DQ_SUCCESS successful completion other negative values other error Description This function verifies that the IOM device subsystem supports Msg operation Note None 3 1 5 DgStartDQEngine Syntax int DgStartDQEngine uint32 period_us pDQE pDge pDQEPRM dgeprm Command DQE Input uint32 period_us main clock period in microseconds pDQE pDqe pointer to DQE pointer PDQEPRM dqeprm pointer for DQE parameters or NULL to use defaults Output pDQE pDge pointer to the created DQE instance Return DO NO MEMORY memory allocation error DQ_TIMEOUT_ERROR timer error DQ_SUCCESS successful completion Description This function initializes DQEngine and prepares it for operation It 1 Creates events for thread synchronization 2 Starts sending threads and set their priorities 3 Verifies and stores startup parameters 4 Starts a periodic routine that wakes up threads The user can change default parameters by filling the DQEPRM structure and supplying a pointer to it Set fields for parameters you don t want to change to NULL DQE parameters typedef struct uint32 timeout veply wait timeout 50 PowerDNA API Reference Manual Release 4 0 uint32 retries_async number of retries for asynchronous commands be
151. the TX data and accepts RX messages and status information as well Once a message is received or transmitted for the particular subsystem special flags are set and once new data is placed in the TX buffer or data is read from the RX buffer those flags are cleared DNA may write or read data in blocks as large as 1024 16 bit data words at a time A read or write is 263 PowerDNA API Reference Manual Release 4 0 executed as an atomic transaction i e no data change allowed during a read or write to from the DNA bus This document describes the initial function set for BM and RT modes of operation 4 25 1 Syntax DgAdv553SetMode int DgAdv553SetMode int hd int devn int channel uint32 mode uint32 flags Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 mode Mode of operation uint32 flags Additional initialization flags Output Returns DO NO MEMORY error allocating buffer DQ_TLLEGAL_HANDL Ka illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration
152. the device should be specified 4 25 29 DqRtVmapRq nputChannelData for DNx 1553 553 For remote terminal mode To simplify specifying what channels need to be written we recommend that you use the following macros DQ_L553_CH_RT_SA CH RT SA read from specified channel DQ_L553_DATA CH RT SA BLK this macro allows you to specify a block of data to access for a read Input data from a DNx 1553 553 layer can contain status information described in DqAdv553StatusRT To retrieve status information specify the following channel define DQ_L553_STATUS_STSF CH RT STS Where lt STS gt is one of the follows or their combination proper data size should be allocated in the packet to accommodate all status data Status data is always represented as 32 bit Ge user should allocate two 16 bit fields per each status entry DO L553 RTS STso Last command hi and status low by RT DO L553 RTS STsi Last SYNC hi and Tx shutdown low by RT DO L553 RTS SES ee Last mode command low 16 bits by RT DO L553 RTS CHSTAT Channel status RT SA ignored DO L553 RTS BERR RS Bus errors RT SA ignored Data status information is a bit mask of which subadresses received or transmitted information per each RT Use the following macro to specify that data ready or data sent status needs to be received 301 PowerDNA API Reference Manual Release 4 0 define DQ_L553_STATUS_DATA CH RT BL
153. the returned parameter In this case it does not necessarily mean that there isn t enough data in the ACB It could mean that the data wraps around the end of the ACB and the amount of data before the wrap is less than rqsizemin To detect this situation check to see if the value returned in avail is greater than or equal to rqgsizemin Note None 3 2 6 DgAcbPutScansCopy Syntax int DgAcbPutScansCopy pDQBCB pBcbh char data uint32 size uint32 rgsizemin uint32 retrieved uint32 avail Command DQE Input pPDQBCB pBcb BCB containing the desired ACB char data pointer to the data buffer allocated by calling program uint32 size size of the data accessible by the pointer in scans uint32 rqsizemin minimum size of the data to copy from the user buffer in scans If the buffer doesn t have space to put the minimum amount of data the function doesn t put any data uint32 retrieved buffer for the number of scans actually copied uint32 avail buffer for the number of scans can fit in the buffer after data is stored Output uint32 retrieved the number of scans actually copied uint32 avail the number of scans that can fit in the buffer after data was stored Return DO DAD PARAMETER data is NULL or pBcb is NULL or is not an ACB 60 PowerDNA API Reference Manual Release 4 0 DQ_SUCCESS successful completion Description This function copies a nu
154. the same excitation frequency config must be set to either of the following 2 defines DQ_AT224 SET _DC_EXC DQ_AT224 SET AC KC Note This function must be called before starting acquisition or reading channels to set up a proper excitation voltage source 4 7 5 DqAdv224SetFIR Syntax int DgAdv224SetFIR int hd int devn int ch_mask int stage int action int decrat int tapsize int filter_total double data Command DQE 150 PowerDNA API Reference Manual Release 4 0 Input int hd int ch_mask int stage int action int decrat int tapsize double data Output int filter_total Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ DAD DEVN DQ BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DgOpenIOM bit field to select single or multiple channels Which filter to set FIRO or FIR1 what operation to perform filter decimation ratio number of taps in filter length of the following data NULL if not required see below pointer to filter taps data NULL if not required see below total of filter coefficients after conversion to integer Expected returned value is 32768 see below error allocating buffer illegal IOM Descriptor or communication wasn t
155. the user application Type 1 of the asynchronous event handling allows to read and handle one event at a time Type 2 allows filling input buffer with multiple event packets and then processing them one at a time Type 3 allows an easy way to split processing for different devices into different routines 106 PowerDNA API Reference Manual Release 4 0 3 11 1 DqRtAsyncOpenlIOM Syntax int DAQLIB DqRtAsyncOpenIOM int handle int new_handle uint1l6 UDP_Port uint32 mTimeOut int depth pDQRDCFG pDqCfg Command Open asynchronous channel of communications with the cube Input int handle Handle to the IOM received from DgOpenIOM uintl6 UDP_Port UDP port to use default is Do_UDP_DAQ_PORT_ASYNC 6344 uint32 mTimeOut Timeout associated with the new handle ms int depth Size of the input packet queue to hold input packet Default is DQ_RTA_QUEUE_DEPTH 64 PDQRDCFG pDqCfg Pointer to the cube configuration structure Output int new_handle Created channel handle to use with DqRtAsync functions PDQRDCFG pDqCfg Pointer to the cube configuration structure Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SOCK_LIB_ERROR Socket library error DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out
156. to point mode Notes This function should not be used in DMap mode 4 9 7 DqAdv254GetExcitation Syntax int DqAdv254Get double exc_rate Command DQE Input int int uin hd devn t32 config uint32 channel double exc_rate double exc_level double ADC_rate EN sine_points Output Return DQ_ None DQ_NO_MEMORY LLEGAL_ HANDLE DO BAD_DEVN DO DAD PARAMETER Excitation int hd int devn uint32 channel uint32 config double exc_level double ADC_rate uint32 sine_points Handle to the IOM received from DqgOpenIOM Layer inside the IOM Reserved Channel of interest Actual excitation rate Actual excitation level Current ADCs and DACs rate Number of waveform points per period error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 254 Configuration parameters are incorrect 165 PowerDNA API Reference Manual Release 4 0 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function retrieves actual parameters of excitation waveform They may be slig
157. to the IOM received from DgOpenIOM int devn layer inside the IOM int chan device Channel uint8 data buffer of message to send uintl6 size length of message Output uint16 written number of bytes written int success TRUE if message was written uint8 errorcode if success FALSE returns 501 specific error code Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DQ BAD PARAMETER invalid parameter DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function is for immediate mode usage only It writes a block of data to a serial port If size written all data fits into the outbound FIFO Note 235 PowerDNA API Reference Manual Release 4 0 The maximum message size is limited to 470 bytes in a 576 byte Ethernet frame and 1412 bytes in a 1518 byte frame 4 21 19 DqgAdv501SendMessageParity9 Syntax int DgAdv501SendMessageParity9 int hd int devn int chnl uintl6 data uintl6 size uintl6 written int success uint8 errorcode Command DQE Input
158. u32 typedef unsigned short ul6 typedef unsigned char u8 typedef unsigned long uint32 typedef unsigned short uint16 typedef unsigned char uint8 typedef long int32 typedef short int16 typedef char intg typedef unsigned long DWORD_PTR typedef LPTSTR char 2 1 2 Devices and subsystems DaqBIOS defines a maximum of 16 layers devices inside an IOM and eight subsystems per layer define DQ MAXDEVN 1 define DQ_MAXSS sixteen layers on the bus maximum maximum number of subsystems four input and four output 6 8 define DQ_SSOIN 0 Subsystem 0 input main and often only device SS define DQ_SSOOUT 1 Subsystem 0 output main and often only device SS define DQ_SS1IN 2 Subsystem 1 input define DQ_SS10UT 3 Subsystem 1 output define DQ_SS2IN 4 Subsystem 2 input define DQ_SS20UT 5 Subsystem 2 output define DQ_SS3IN 6 Subsystem 3 input define DQ_SS30UT 7 Subsystem 3 output moe PowerDNA API Reference Manual Release 4 0 The layer number is uint 8 Only the four lower bits are used to signify the layer number The upper four bits have a special purpose One of them is the DO_LASTD the last command entry in a DaqBIOS packet The PowerDNA library handles use of DO_LASTD so that a user never has to deal with it EV 0x80 flag which is used to mark EV 2 1 3 DaqBIOS Packet Structures DaqBIOS protocol runs on top of UDP protocol DaqBIOS packet has the following str
159. value Compare register 1 value A debounce B debounce Z debounce T debounce TRUE to turn on inversion of the A pin TRUE to turn on inversion of the B pin TRUE to turn on inversion of the Z pin TRUE to turn on inversion of the T pin TRUE to turn on inversion of the DOO TRGOUT pin TRUE to turn on inversion of the DO1 CLKOUT pin One of the QDU_CM_XXX mode constants QDU_CM_CDU count up A input QDU_CM_CDN count down A input QDU_CM_DC direction counter QDU_CM_QE quadrature encoder QDU_CM_TCDU triggered count up A input QDU_CM_TCDN triggered count down A input QDU_CM_TDC triggered direction counter QDU_CM_TQE triggered quadrature encoder QDU_CM_RTCDU re triggered count up A input QDU_CM_RTCDN re triggered count down A input QDU_CM_RTDC re triggered direction counter QDU_CM_RTQE re triggered quadrature encoder SN int rl_mode int evt_b int evt_src int tb_src PowerDNA API Reference Manual Release 4 0 One of the QDU_CRM_XXX reload mode constants QDU_CRM_LR load register QDU_CRM_CRO1 CRO for the down count and CR1 for the up count QDU_CRM_CR10 CR1 for the down count and CRO for the up count QDU_CRM_NR no reload counter keeps its value QDU_CRM_OTR One time reload load counter only once per every start trigger and following event One of the QDU_EB_XXX event behavior constants QDU_EB_NO no event QDU_EB_RE rising edge on the debounced input QDU_EB_RE_LL rising edge on the debounced
160. values from the integrator accumulated over the last period of the input sinewave Notes Use the same channel identifications to specify channels for DMap operation 4 9 9 DqAdv254ReadVrms Syntax int DqAdv254ReadVrms int hd int devn int CLSize uint32 cl double pos double VArms double VBrms Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM 167 PowerDNA API Reference Manual Release 4 0 int CLSize Reserved uint32 cl Channel list only channel numbers with gains are valid entries Output double pos Calculated position 1 1 le VA jija e Pointer to double array to store RMS voltage on channel A of specified channels or NULL Pointer to double array to store RMS voltage on channel A SEET EE of specified channels or NULL Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 254 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This fu
161. with initialization data for the DIO 416 illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a DIO 416 DQ_SEND_ERRO DQ_TIMEOUT_E DQ_TOM_ERROR DQ_SUCCESS Other negative values Description This function allows setting any of the configurable parameters of the DIO 416 layer Note RROR unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error The DIO 416 is a unique combination of high current sourcing sinking Digital Output and precision Analog Input and a digitally programmable circuit breaker The default configuration for the circuit breaker may be changed by using the DqAdv416SetAll function The configuration should be set using DQDIO416DATAOUT type For parameters that should be actually programmed on the layer Xset field should be set to 1 it should be set to O for parameters that should not be affected In some cases DgAdv416GetAlll should be called to retrieve values of the current parameters of the layer and then the configuration should be updated and written to the layer structure for SI typedef struct ETPARAM data int32 cfgset int32 cfg int32 discfgset int32 discfg int32 adcspdset int32 adcspd int32 port0ocmset int32 port0ocm int32
162. 0 Rx12 12 DQ_AR_STATUS_GET_FRM_ERR get number of loopback errors for Rx0 Rx12 12 DQ_AR_STATUS_GET_FRM_MIS get number of missed frames for Rx0 Rx12 12 DQ_AR_STATUS_GET_FIFO_CNT get current levels in receive FIFOs Rx0 Rx12 Array to store status information Status information is always returned in the order in which flags are represented N in parentheses represents the number of uint32s returned for this flag Number of packets the function was able to retrieve from the channel FIFO error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function requests the error and status of the interface 4 24 19 DqgAdv566EnableByChip Description Notes None Syntax int DgqAdv566EnableByChip int hd Command IOCTL Input int hd int devn int chipmask int actions int devn int chipmask uint32 actions Handle to IOM received from DqOpenIOM Layer inside the IOM 0 all channels 1 lt lt N Nth channel TRUE enable device operations 261 PowerDNA API Reference Manual Release 4 0 Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_E
163. 01ConfigCounter int hd int devn int counter int startmode int tbr int dbg int dbc int iie int gie int end_mode int lr int cfg Note None 4 26 15 DqAdv601CfgForQuadrature Syntax int DgAdv601CfgForQuadrature Command DQE Input 329 PowerDNA API Reference Manual Release 4 0 int hd int devn int counter int startmode int tbr int dbg int dbc int iie int gie int end_mode int lr int ctg Output int cfg Return DQ_TLLEGAL HANDLI DO BAD DEVN DO DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ _IOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DqOpenIOM Layer inside the IOM Counter number 0 7 DQ_PL601_SM const Interval divider for timebase register Input debouncing gate register value Input debouncing clock register value TRUE to turn on pre inversion of the input pin TRUE to turn on pre inversion of the gate pin One of the DO EM SN end mode constants Sets quadrature midpoint usually 0x80000000 Output parameter that receives the configuration value the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg is NULL unable to send the C
164. 03 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets the configuration options for a 503 layer Note 4 22 5 DqAdv503SetMode Syntax int DgAdv503SetMode int hd int devn int chnl uint32 cmd uint8 value Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int chnl Channel to configure uint32 cmd what parameter to set uint8 value value depending on cmd parameter 240 PowerDNA API Reference Manual Release 4 0 if cmd is DOL_TIOCTL503_SET_MASK value is 8 byte buffer containing 4 byte accept code and 4 byte accept mask if cmd is DOL_IOCTL503_SET_RATE value is two bytes for rate byte 0 is BTRO and byte 1 is BTR1 if cmd is DOL ITOCTL503_SET OPER MOD value is one byte mode value Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CAN 503 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occ
165. 03ResetChannel int hd int devn int channel Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int channel Channel to reset Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CAN 503 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function resets SJA 1000 chip associated with the specified channel Note None 4 22 8 DqgAdv503ParseVmapMsg Syntax int DgAdv503ParseVmapMsg uint32 mode uint8 rx uint32 tstamp uint32 identifier uint8 buf int len Input uint32 mode Current mode of CAN port same flags passed to DqAdv503SetChannelCfg uint8 rx Received 16 bytes message from VMap buffer Output uint32 tstamp Message timestamp in 10us resolution uint32 identifier CAN frame ID uint8 buf CAN frame payload up to 8 bytes int len Number of bytes stored in payload buffer Return The number of bytes parsed in the RX buffer Description This function converts CAN message from the 16 byte per message hardware representation to frame ID payload and timestamp Note This is a helper function to use the CAN 503 layer in VMAP mode 244 PowerDNA API Re
166. 1 transmit data Together with BccB_Control the Bus Controller control block occupies 120 16 bit words typedef struct 293 PowerDNA API Reference Manual Release 4 0 BCCB_Control control BCCB_Status status BCCB pBCCB lt errsts0 gt contains information of the completion of this entry It holds the status of the entry processing written by the BC state machine define BC1553_BCB_ERRSTSO_CB 1L lt lt 15 Status Current bus 0 Bus A define BC1553_BCB_ERRSTSO_RSV14 1L lt lt 14 Reserved use as needed define BC1553_BCB_ERRSTSO_PD 1L lt lt 13 Error descriptor is permanently disabled define BC1553_BCB_ERRSTSO_S1B 1L lt lt 12 Warning Status 1 RT responded with BUSY define BC1553_BCB_ERRSTSO0_S2B 1L lt lt 11 Warning Status 2 RT responded with BUSY define BC1553_BCB_ERRSTSO_BNR 1L lt lt 10 Error No response from bus define BC1553_BCB_ERRSTSO_RCR 1L lt lt 9 Error Retry count reached clear to re start define BC1553_BCB_ERRSTSO_WBR 1L lt lt 8 Error Response received on the wrong bus also will set WBR bit in PORT_STS define BC1553_BCB_ERRSTSO_IRT 1L lt lt 7 Error Incorrect RT responded also will set IRT bit in PORI STS define BC1553_BCB_ERRSTSO_LR 1L lt lt 6 Warning Late response define BC1553_BCB_ERRSTSO_ER 1L lt lt 5 Error Early response define BC1553_BCB_ERRSTSO_S2F 1L lt lt 4 Error Status 2 compare faile
167. 12 0 are sticky bits auto cleared define SL553_PORT_BCSTS_BIR 1L lt lt 12 Response received from incorrect RT define SL553_PORT_BCSTS_BTO 1L lt lt 11 Maximum 1553 access time exceeded define SL553_PORT_BCSTS_BAD 1L lt lt 10 Bus activity is detected while in wait for clock idle state define SL553_PORT_BCSTS_BWB 1L lt lt 9 Response received on the wrong bus define SL553_PORT_BCSTS_BCO 1L lt lt 8 BC overrun major minor frame clock called in non idle state define SL553_PORT_BCSTS_HBT 1L lt lt 7 Heartbeat set to one at the beginning of each minor frame define SL553_PORT_BCSTS_MTD 1L lt lt 6 Memory access timeout was detected hardware error define SL553_PORT_BCSTS_RTR 1L lt lt 5 At least one RT in dead state replied with valid status define SL553_PORT_BCSTS_MF 1L lt lt 4 At least one Mode command w o data word failed define SL553_PORT_BCSTS_MRBF 1L lt lt 3 At least one Mode TX command with data word failed define SL553_PORT_BCSTS_MBRF 1L lt lt 2 At least one Mode RX command with data word failed define SL553_PORT_BCSTS_RBF 1L lt lt 1 At least one RT gt BC transmission failed define SL553_PORT_BCSTS_BRF 1L lt lt 0 At least one BC gt RT transmission failed define SL553_PORT_BCSTS_MRF S S amp 0x 000000 gt gt 24 processed minor frame define SL553_PORT_BCSTS_DSC S S amp 0xff0000 gt gt 16 processed descriptro in minor frame e Major frame descriptor stat
168. 16 data uint32 read uint32 remains Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_sa RT and SA numbers like in the RT SA list uint32 rq_size Requested size of the following RT SA data uint16 data Pointer to the array of data Output uint32 read Actual number of uint16 read uint32 remains Number of words remain in the buffer Returns DQ_NO_MEMORY error allocating buffer LLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established BAD_DEVN device indicated by devn does not exist or is not an 1553 553 Configuration parameters are incorrect unable to send the Command to IOM DQ DO DO BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration 276 PowerDNA API Reference Manual Release 4 0 DQ_ITOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function reads data from the RT SA buffer memory defined in DqgAdv553ConfigBufferRT The number of uint16 words read is returned in lt read gt The number is always either a multiple of uint
169. 17_SEL_QOFIR_D 0x08 select fir for channels 12 15 define AI217_SEL_QFIR_ALL 0x0f select all channels More than one channel may be specified by ORing multiple channel flags together lt act ion gt parameter flag bits that select which parameters will be written The following flags are defined define DQ _AI217_FIR_SET_INDEX 0x80 override the automatic selection of the FIR index define AI217_FIR_SET_DEFAULT set and enable the default filter define AI217_FIR_COEFF_LOAD load taps and coefficients define AI217_FIR_SET_DECIMATION_RATE 0x2 set decimation rate define AI217_FIR_ENABLE enable fir filter define AI217_FIR_DISABLE disable fir filter The AI217_FIR_SET_DEFAULT flag bit is used to easily set all of the FIR configuration values to their default state Before setting up a custom configuration it is recommended to first set all channels to their default state by setting lt bank gt to AI217_SEL_CHAN_ALL setting lt mask gt to AI217_FIR_SET_DEFAULT and calling DgAdv217SetFIR When the AI217_FIR_SET_DEFAULT flag is set all of the other lt act ion gt parameter bits are ignored The AI217_FIR_ENABLE and AI217_FIR_DISABLE defines are used to enable or bypass the FIR filter when a custom FIR filter has been loaded When standard default settings are used the system will automatically load and enable the FIR filter No additional enablin
170. 2 DgAdy254Write ET 173 DNA AI 255 Ta Or uereg Seege EENEG SE 173 Bee ee EE 176 e ie SS EE E 177 DqAdv255SetExcitation EE 178 DgAdv255GetW FMeasurement cceesseececeeeeeeeseeeeeeeeeeseeeeeeeeeesnsneaeeeeeteeeneaes 179 PGA V2 DONG DE E 181 en 181 DqAdv255GetExcitation E 182 Ee te 2 SEN EE 183 PCV e 184 Da ROV ZS SC ONY E E 186 DgAdy255WriteBiN WEE 187 DoAdy25 a a ead B DE 188 Ree Ve EE 189 DNA AO 302 308 332 333 layers csseseresseseessssneesenscsersenscccsesscccesesceceesenceneetes 190 Been 190 GENEE EE tea ee aie re ane ee dE 191 4 12 4 12 1 4 12 2 4 12 3 4 13 4 13 1 4 13 2 4 13 3 4 14 4 14 1 4 14 2 4 14 3 4 15 4 15 1 4 16 4 16 1 4 16 2 4 16 3 4 17 4 17 1 4 17 2 4 17 3 4 17 4 4 18 4 18 1 4 18 2 4 18 3 4 18 4 4 18 5 4 19 4 19 1 4 19 2 4 19 3 4 19 4 4 20 4 20 1 4 20 2 4 21 4 21 1 4 21 2 4 21 3 4 21 4 4 21 5 4 21 6 4 21 7 4 21 8 4 21 9 4 21 10 4 21 11 PowerDNA API Reference Manual Release 4 0 DNA AO 358 l y ET EE 192 Ree EE 192 Kee E EE 193 D Adv358ReadA DO eepe ariete e e ae aces Ea aE EE aE 194 DNA DIO 401 402 404 405 406 layers sssssnnnssnnnnnnnnnnunnnnnennnnnnnnnnnnnnnnnnnnnnnnnnn nnmnnn 195 GAGA OX WG EE 195 D Ady40X e E EE 196 DG ROVE OK Sea UE 197 DNA DIO 403 LAV Or wise cccertecialits tials Sas circ eneimecetanitiiecewtedaccaanaiiashwpasenhiadewtedsesiuanebaai 197 DG AGVA OS SOO EE 197 DIG AOVAO SVM ING EE EE 198 GROVE OS ROA oss EE 198 DNA DIO 404
171. 2 This function is formerly known as DgDmapSetEntry 3 This function works with AO layers only if the flag DQ _ ACB _DATA_RAW is set It works with AI layers with either DQ_ACB_DATA_RAW DQ_ACB_DATA_DOUBLE or DQ_ACB_DATA_SINGLE flag set 3 3 5 DqDmapAddMultipeEntries Syntax int DqDmapAddMultipeEntries pDQBCB pBcbh PDQSETTRL pTRL int entries char offset Command DQE Input pDOBcb pBcb pointer to DMap table PDQSETTRL pTRL array of transfer list entries int entries number of entries in pTRL array char offset array of pointers to store addresses of transfer list elements can be NULL if not desired Output int entries number of entries actually processed char offset array of pointer to transfer list elements Return DQ_ILLEGAL_HANDLE invalid Descriptor DQ_SEND_ERROR if the unable to send the Command to IOM DQ_TIMEOUT_ERROR if nothing is heard from the IOM for Time out duration DQ_IOM_ERROR if error occurred at the IOM when performing this command 65 PowerDNA API Reference Manual Release 4 0 DQ_SUCCESS if the Command is processed successfully Other values low level IOM status Description User should fill at least one entry in the array of DOSETTRL type DQCMD_SETTRL typedef struct uint1l6 dmapid DMAP id do not fill uints8 dev device uint8 ss subsystem uint32 ch channel channel list entry uint32 flags control flags including channel information uintl6 sample
172. 3 CRC 32 values for parameter areas Input int Iom Handle to the IOM returned by DqOpenIOM DQCRCINFO pointer to uninitialized CRC information oDOCRCInfo Output DOCRCINFO CRC information pDOCRCInfo Return DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function returns the IEEE 802 3 CRC 32 codes of different configuration areas The areas DOCRCINFO structure has the following fields DQCMD_GETCRC typedef struct uint32 fwerc CRC of firmware code uint32 fwver FW version uint32 paramcrc CRC of parameter table uint32 initcrc Init mode CRC uint32 opercrc Operation mode CRC uint32 sdcrc Shutdown CRC 4 PowerDNA API Reference Manual Release 4 0 DQCRCINFO pDQCRCINFO Note None 2 2 49 DqCmdloctl Syntax int DgqCmdIoctl int Iom pDQIOCTL IoIn pDQIOCTL ToOut Command DOCMD_IOCTL 0x198 Send I O Command Directly to Device Input int Iom Handle to the IOM returned by DqgOpenIOM pDQIOCTL Loin input ioctl data pDQIOCTL Tout buffer for output data Output
173. 32 samples per channel when calling this function 321 PowerDNA API Reference Manual Release 4 0 DqAdv601SetChannelCfg int hd DqAdv601SetChannelCfg int devn int ss int counter fg uint32 cfg Handle to the IOM received from DqOpenI Layer inside the IOM Device subsystem Counter number 0 7 Pointer to channel configuration structure OM Pointer to cfg values Returned config status illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This internal function sets the low level configuration for a counter channel Currently cfg has no meaning but may return extra config status values in the future 4 26 10 DqAdv601ReadRegisterValue 4 26 9 Syntax int PDOCHNLSET_601_ pCi Command DQE Input int hd int devn int ss int counter PDOCHNLSET_601_ pCig JE ACE Output Ink Eer Return DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_BAD_ PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Note Syntax int uint32 reg Command DQE Input int hd int
174. 40000 Stop trigger is received single errors status not inclusive or ed bit 0x10000000 set define DQERR_EXEC 0x90010000 exception on command execution define DQERR_NOMORE 0x90020000 no more data is available define DOERR_MOREDATA 0x90030000 more data is available define DQERR_TOOOLD 0x90040000 request is too old RDFIFO define DQERR_INVREQ 0x90050000 Invalid request number RDFIFO define DQERR_NIMP 0x90060000 DQ not implemented or unknown command define DQERR_ACCESS 0x90070000 password is not cleared access denied define DQERR_LOCKED 0x90080000 cube is locked GE kk kk kk kk kk PowerDNA API Reference Manual Release 4 0 The following is reuse of the previous code in the different direction host gt IOM It means that there was no reply to one of the previous packets of the same type Made especially for RDALL WRRD and RDFIFO commands ST define DQERR_OPS 0x90070000 IOM is in operation state define DQERR_PARAM 0x90080000 Device cannot complete request with specified parameters network errors define DQERR_RCV 0x90090000 packet receive error define DQERR_SND 0x900A0000 packet send error These codes are or ed with command reply value dqCommand DOQREPLY Another set of error codes can be generated on the host side
175. 406 layers ccccccceceeeeeeeeeeseeeeeeeeeeeeeneeneeeeeeseeeeeeeseeenseeeeeeeseeeseneeeeees 199 DG AGW OF EH 199 DNAsDIO 416 lay f EE 200 GAGA TEE EE 200 Ree LG SETA EE E 202 Reie ME Ei SE 204 DNA DIO 432 4S3 RT 205 Ree TEE 205 DGAGVASZSCEA UE trates ochadtat vasaetnoaydnevenas uctvcsat ce SERA E aE APUNE E Ei 207 DG AOVAS 2 Se TIMI EE EE 208 DGAUVASZ SEER EE E 209 DNA DIO 448 la VOl E 211 Ee te E 211 EP A PCAC ne et Pa Na eI ata el Be a ae ee aa ee eh oe 211 CAAA UE 212 DqAdv448SetLevels eae cece aaa aa tial alae I che ele eh 213 DqAdv448SetDebouncer EE 214 DNA DIO 462 Ta Ver E 215 GAC e oe es ar ed eee etal ea ie a athe Oe es 215 ee ce oy oid EE 216 CACAO 2 SOA EE 217 Beie E Dt EE 218 Serial 500 layer ColdFire IOM Only ccccccssseeeeeeseeeeeeeeeeeeeseeeeeeeeeeeneneeseeneeeeees 219 Bop te NEO LONT eTA EE 219 e ie IT E ene tee EE 220 DNA SL 501 and DNA SL 508 layer ceeccceeeseeeeeeeeseeeeeeeeeeenseeeeeeeseeeeeeeeeneees 221 ee Ier 221 DoAdv50 1ChangeGhatim el ie cesccc case tae acetates tated aide edac 222 DoAdv501ChangeGhannelParity EE 222 PYG ACV SOT SEC EE EH 223 Bop ie SOT Sel Ba 16 a iene Reenter a tre rater Pee er pee er ere erty Pee TS 224 Diop te eye aires sta re E 225 DqAdv501SetTermString EE 225 PYG AG VSO SCE GIA Kec eat a ea tia il Be a lee ne ee oe 226 PAG Ier Ee E 227 MaAGVS0T Set RE 227 BGAdVS50 TSC IER E 228 PowerDNA API Reference Manual Release 4 0 Bee SO GG ES FAIS eira tens toreases
176. 4_ ENABLE exc_rate amp adc_rate lt expected level on the secondary coils datasheet required to select proper Se for four wire configurations usr_offset 0 0 needed usr_gain 1 0 needed ret float exc_rate lt additional gain for in system calibration DgAdv254SetMode hd0 DEVN CHANNEL mode float exc_level Mode External excitation 4 5 6 wire LVDR RVDT DQ_AI254_MODE_EXT 5 lt 5 6 wires DQ_A1I254_MODE_EXT 4 lt 4 wires Measur frequency and level on input B flags lt additional offset for in system calibration usr_offset A channel only This is keep 0 if not keep 1 0 if not usr_gain ret DgAdv254MeasureWF hd0 DEVN CHANNEL _COARS amp exc_rate amp exc_level Pa r amp exc_offs exc_level 11 8 lt expected level on the secondary coils datasheet This is required to select proper Se for four wire configurations 157 PowerDNA API Reference Manual Release 4 0 usr_offset 0 0 lt additional offset for in system calibration keep 0 if not needed usr_gain 1 0 lt additional gain for in system calibration keep 1 0 if not needed ret DgAdv254SetMode hd0 DEVN CHANNEL mode flags usr_offset usr_gain float exc_rate float exc_level Mode Simulation with external excitation 4 5 6 wire LVDR RVDT DQ_AI254_MODE DQ_AI254_MODE SIM_5 lt
177. 5 6 wires SIM_4 lt 4 wires Measure frequency and level on input B ret DgAdv254MeasureWF hd0 DEVN CHANNEL _COARS Gl r amp exc_rate amp exc_level amp exc_offs exc_level 11 8 lt expected level on the secondary coils datasheet This is required to select proper Se for four wire configurations usr_offset 0 lt set to 0 usr_gain 1 0 lt set to 1 ret DgAdv254SetMode hd0 DEVN CHANNEL_SIM mode flags usr_offset usr_gain exc_rate exc_level 4 9 1 DgAdv254SetMode Syntax int DAQLIB DgAdv254SetMode int hd int devn uint32 channel uint32 mode uint32 flags uint32 meas_pts double usr_offset double usr_gain double exc_freg double Se_level Command IOCTL Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 channel Channel to apply mode to uint32 mode Mode of operation uint32 flags Additional flags reserved uint32 meas_pts Number of points per period of the sine wave equal to the number of sampling points per period double usr_offset User defined offset from 1 0 to 1 0 in 1 0x7fffff increments to fine calibrate output data to trim LVDT RVDT position double usr_gain User defined gain from 0 to 1 99996 to trim LVDT RVDT gain double exc_freq Expected excitation frequency for external excitation and simulation modes need not be exact ignored for internal excitation mo
178. 53 553 DQ BAD PARAMETER Configuration parameters are incorrect DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function programs a major frame descriptor table of lt size gt from the data array supplied starting from the lt index gt supplied Major frame descriptor bits are defined as follows Enable current frame If this bit 0 the descriptor is ignored and next entry is processed until the end of the descriptor table is reached The descriptor may be temporarily disabled in order to replace data inside minor frame and or minor frame descriptors define SL553_MJF_DESC_EN 1L lt lt 8 Execute once flag If set the entry will be executed once and then it will be automatically disabled May be used for the minor frame filled with aperiodic messages define SL553_MJF_DESC_OT 1L lt lt 7 Issue IRQ upon completion of the minor frame execution this bit is overwritten by the firmware define SL553_MJF_DESC_IRQ 1L lt lt 6 Enable entry if disabled or disable if enabled upon SWAP request A SWAP request allows simultaneous change of the sequence in the major frame descriptor table at the beginning of the major
179. 53_BC_STATUS_BCPOS define SL553_PORT_BCPOS_GP 1 if return from GOTO is pending define SL553_PORT_BCPOS_GET_GMNFD N returns stored MN return to GOTO command position define SL553_PORT_BCPOS_GET_GMJFD N returns stored MJ return to GOTO command position define SL553_PORT_BCPOS_CUR_BLOCK N returns current MN block define SL553_PORT_BCPOS_CUR_MNFD N returns current MN position top bit is block define SL553_PORT_BCPOS_CUR_MJFD N returns current MJ position DQ_SL553_BC_STATUS_BC define SL553_PORT_BCSTS_BSY 1 if BC not in IDLE or WAIT_CLOCK states define SL553_PORT_BCSTS_RSV30 Reserved define SL553_PORT_BCSTS_RSV29 Reserved define SL553_PORT_BCSTS_RSV28 Reserved define SL553_PORT_BCSTS_MRF3 Reports ID for the currently processed define SL553_PORT_BCSTS_MRFO minor frame define SL553_PORT_BCSTS_DSC7 Reports ID for the currently processed define SL553_PORT_BCSTS_DSCO descriptor minor frame 12 0 are sticky bits auto cleared define SL553_PORT_BCSTS_BIR Response received from incorrect RT define SL553_PORT_BCSTS_BTO Maximum 1553 access time exceeded define SL553_PORT_BCSTS_BAD Bus activity is detected while in wait for clock idle state define SL553_PORT_BCSTS_BWB Response received on the wrong bus define SL553_PORT_BCSTS_BCO BC overrun major minor frame clock called in non idle state define SL553_PORT_BCSTS_HBT Heartbeat set to
180. 53_RX pEV553_ID gt evtype 1 in the bitfield that received message corresponds to each RT that pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above For each flagged RT data i 0 Command and status 31 16 command data i 1 1 in the bitfield that corresponds to each SA that received message for this RT For each flagged SA of this RT data i n 16 or 32 bit data from that SA Amount is data is a minimum between requested and contained in the received 311 PowerDNA API Reference Manual Release 4 0 word for uint16 It is always fixed for uint32 EV553_TX messages transmitted In lt None gt Out PpDOEVENT gt event EV553_TX pEV553_ID gt evtype 1 in the bitfield that corresponds to each RT that have transmitted message pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above For each flagged RT data i 0 Command and status 31 16 command data i 1 1 in the bitfield that corresponds to each SA that received message for this RT EV553_MD mode command received In lt None gt Out PpDOEVENT gt event EV553_MD pEV553_ID gt evtype 1 in the bitfield that corresponds to each RT that have received mo
181. 70 bytes 4 21 10 DqAdv501SetCharDelay Syntax int DgqAdv501SetCharDelay int hd int devn int chnl uint32 delay_src double delay_us Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chnl device channel uint32 delay_src source of the delay clock 227 PowerDNA API Reference Manual Release 4 0 double delay_us delay between characters in microseconds Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DQ BAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description Sets delay between Tx characters Select delay_src from DQ _S L501_DELAYMODE_DISABLE DQ_SL501_DELAYMODE_INTERNAL internal per channel clock DQ_SL501_DELAYMODE_TMRO1 TMR1 for char and TMRO for frame DO SL501_DELAYMODE_SYNCO02 S SYNC2 for char and SYNCO disabled Tx done WNr OH Note Make sure that if the delay is enabled it is longer than the duration of the transmitted character
182. 9 RT Bus B Encoder is enabled in RT Engine define S L553_PORT_STS_ENA 1L lt lt 28 RT Bus A Encoder is enabled in RT Engine define SL553_PORT_STS_DRB 1L lt lt 27 If set data is ready at the decoder B define SL553_PORT_STS_DRA 1L lt lt 26 If set data is ready at the decoder A define SL553_PORT_STS_WDR 1L lt lt 10 Watchdog request from RT indicated no activity from the BC within specified period define SL553_PORT_STS_BEB 1L lt lt 9 BUS Bit timing error on bus B sticky auto cleared after read define SL553_PORT_STS_BEA 1L lt lt 8 BUS Bit timing error on bus A sticky auto cleared after read define SL553_PORT_STS_PEB 1L lt lt 7 BUS Parity error on bus B sticky auto cleared after read define SL553_PORT_STS_PEA 1L lt lt 6 BUS Parity error on bus A sticky auto cleared after read define SL553_PORT_STS_ILC 1L lt lt 5 RT Illegal command sticky auto cleared after read define SL553_PORT_STS_MER 1L lt lt 4 RT Message error sticky auto cleared after read define SL553_PORT_STS_TMW 1L lt lt 3 RT Too many words were detected in RX message sticky auto cleared after read define SL553_PORT_STS_TFW 1L lt lt 2 RT Too few words were detected inm RX message sticky auto cleared after read define SL553_PORT_STS_ERB 1L lt lt 1 If set data overflow was detected at the decoder B sticky auto cleared after read define SL553_PORT_STS_ERA 1L lt lt 0
183. API Reference Manual Release 4 0 Input int hd int devn uint32 tx ch uint32 rx ch uint32 tx_chan_arr uint32 tx_data_arr uint32 tx_size uint32 tx_wrt uint32 tx_avl uint32 rx_chan_arr uint32 rx_data_arr uint32 rx size uint32 rx_read uint32 rx_rmns Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Handle to IOM received from DgOpenIOM Layer inside the IOM Number of channels in transmit channel list Number of channels in receive channel list Tx channel list Array of pointers to the arrays of the transmit data Array of number of messages to transmit for each channel in Tx channel list Array where function returns actual number of messages written to each channel Array where function returns number of entries available in the FIFO for each channel Rx channel list Array of pointers to the arrays to store received data Array of number of messages to receive for each channel in Tx channel list Array of number of messages actually received for each channel Array of number of messages remains in the receive FIFO for each channel error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a SL 501 unable to s
184. AcblnitOps Syntax int DgAcbInitoOps PDOBCB pBcb uint32 Config uint32 TrigSize PDQOSETTRIG TrigMode Float fCLC1k Float fCVC1k uint32 CLSize uint32 CL uint32 ScanBlock PDOQACBCFG pAcbCfg Command DQE Input pDQBCB pBcb pointer to BCB points to ACB uint32 Config requested configuration layer specific uint32 TrigSize requested number of triggering conditions can be NULL pDQSETTRIG requested triggering mode layer specific can be NULL if TrigMode TrigSize is NULL or 0 float fCLC1k CL clock requested can be NULL if Config doesn t include LN_CLCKSRCO float fCVC1k CV clock requested can be NULL if Config doesn t include LN_CVCKSRCO uint32 CLSize requested channel list size uint32 CL requested channel list uint32 ScanBlock requested number of scans to handle together 0 default pDQACBCFG pAcbCfg requested buffer parameters Output uint32 Config actual configuration layer specific uint32 Trigsize actual number of triggering conditions can be NULL pPDQSETTRIG actual triggering mode layer specific can be NULL if TrigMode TrigSize is NULL or 0 float fCLC1k CL clock actual can be null if Config doesn t include LN_CLCKSRCO Float fCVClk CV clock actual can be null if Config doesn t include 54 PowerDNA API Reference Manual Release 4 0 uint32 CLSize uint32 CL uint32 ScanBlock Return pDOQAC DQ ILLEGAL BCFG pAcbCfg HANDLI C
185. BAD PARAMETER pdgeprm is NULL DQ_SUCCESS successful completion Description This function can retrieve or change DQEngine parameters after engine is started Set setparam to TRUE to set parameters or set it to FALSE to retrieve current parameters 51 DQE par PowerDNA API Reference Manual Release 4 0 ameters typedef struct uint32 timeout uint32 retries_async uint32 retries_receive uint32 retries_send uint32 max_inbound_packet uint32 max_outbound_packet uint32 abort_after uint32 use_protocol uint32 packets_at_once DQEPRM pDQEPRM reply wait timeout number of retries for asynchronous commands before return an error number of retries while receiving stream before placing filler number of retries while sending stream upon dumping packet maximum packet size from IOM maximum packet size send to IOM when streaming abort operation after number of lost packets switch between DQ TS and DQ_VT RESERVED maximum number of packets to one IOM upon one tick Set a field to NULL if you don t want to change that parameter Note None 3 1 8 DgAdvReadCalData Syntax int CalSize Command DQE Input int int hd devn BYT E CalData uin Output t32 CalSize BYT E CalData uin Return DO t32 CalSize DQ_NO_MEMORY S LLEGAL_HANDL DO BAD DE
186. CESS successful completion Description This function must be called when setting of M3 entries is complete to finalize it and configure the layer involved DgMmInitOps parses a transfer list calculates parameters for configuration channel list trigger mode and clocks Note None 3 9 3 DgMmDestroy Syntax 97 PowerDNA API Reference Manual Release 4 0 int DqMmDestroy pBCB pBcb Command DQE Input pDOBCB pBcb pointer to a previously allocated M3 structure Output None Return DQ_ILLEGAL_HANDLE invalid pBcb DO BAD PARAMETER nothing to destroy or pBcb not a M3 DQ_SUCCESS successful completion Description This function destroys all memory structures allocated with DgMmCreate and stops any ongoing M3 operations associated with this pBcb Note It is safe to call this function while M3 operation is running Say in exception handler 3 9 4 DgMmSetEntry Syntax int Command DQE Input D in i DQ nt uin uint DqMmSet flags BC Bcb B p dev ss 32 32 ch ags int samples char Output char Return DO DO DO I DQ_NOT_ DO D DQ_ xxo S xxof e S LL BAI D D_DEVN S EGAL_HAN Entry pDO int samples DL S BA D_
187. CR 0 DQ_EM_TBR End when TBR 0 DQ_EM_GT End when H gt L on gate not supported Load register value initial value of CR in continuous modes LR will be reloaded into CR each time Output parameter that receives the configuration value the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid mode is not one of the valid DO CN constants end_mode is not one of the valid DO EM constants or cfg is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 326 PowerDNA API Reference Manual Release 4 0 Sets up the configuration for a counter in a 601 layer 4 26 13 DqAdv601CfgForGeneralCounting DqAdv601CfgForGeneralCounting Note None Syntax int Command DQE Input int hd int devn int counter int startmode int ps int CrO int crl int dbg int dbc int iie int gie int oie int extclk int trig int trs int enc int gated int re int end_mode int Lr int hd int devn int counter int startmode int ps INE bt IAE CEL int dbg int dbc int iie int gie int oie int extclk int trig int trs int enc int gated int re int end_mode int Ilr int cfg
188. DO SUCCESS successful completion Other negative values low level IOM error Description This function sets up debouncing time for the digital comparator circuitry for each channel specified in the channel list Upon startup the firmware programs low and high levels The hysteresis is programmed to change the detected logic level from low to high when the input signal is above low and high limits The debouncer enhances this capability by requiring the signal to stay above high or below low logic levels for a certain time before input can change logic state The debouncer is a 16 bit value that defines the time in 100us intervals for which the logic level of each channel should stay stable before the register changes state For example a value of 10000 means that the signal level on that channel should stay for 1s before a debounced value will change state Note 214 PowerDNA API Reference Manual Release 4 0 To access debounced values use channel 2 for port 0 and channel 3 for port 1 in DMap mode In DqAdv448Read set lt read_db gt to TRUE to read debounced port values If debouncing delay is set to 0 debounced values are equal to the current reading 4 19 DNA DIO 462 layer 4 19 1 Syntax int uint32 bdata Command DQE Input int int uin uin Output hd devn t32 CLSi E32 FGI uint32 rda double vda Return DO TLURGAL DO BAD_DEVN DQ_ DQ_ DQ_ DO
189. DQE Input int hd int devn int chnl int baseclock Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_DE V DQ_BAD_PARAMETER R T DQ_SEND DQ_TIMEOU DQ_ITOM_ERRO DQ_SUCCESS Other negative values Description This function sets the base ERROR Ke handle to the IOM received from DgOpenIOM layer inside the IOM device channel base clock frequency error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a SL 501 invalid parameter unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error clock frequency for an individual 501 channel Baseclock may be set to one of two values DQ_L501_BASE_66 or DQ_L501_BASE_24 Note The 24MHz base clock source for non standard baud rates is only available in logic version 0x01020E05 or later 221 PowerDNA API Reference Manual Release 4 0 4 21 2 DqAdv501ChangeChannelCfg Syntax int DgAdv501ChangeChannelCfg int hd int devn int channel int config Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn lay
190. DX DRAG ces tse ck aa aaa a eee i hate i eee ccs Seti tales ih 358 DqAdvDnxpSetConfig E 359 PowerDNA simplified layer SiQnalind ccccecesseeeeesseeeeeeeeeeeneeeeeeeeeeeeeseeeeeees 362 Bee OLS e EE 362 Ee ie ee EE 362 Ee 363 DORCVROUTES YMG Us cose acacia eek ey ae Ts a st ee a Ee is a 364 DqAdvRouteSyncOut essseeessreeerrrrsrnnrssnnnerennretranernraernrnactnrasetnnnnennnnneennnennnneene 364 DE ROVROUTESYRECIOCK cag acest tear ea ee a Sada ee se dies oe te iis ee 365 eet Tee 365 DqAdvRouteSyncTrigln WE 366 PCAC ee ek e ET 367 Ee e ee ECH Klee EE 367 Diop e ae EN Ral TEE 368 POGGIO S CLS VNC Ae Nes Sashes eh eee GENEE 369 DaAGVLAVerACCeSS Re E 369 PowerDNaA layer signaling cccccessseeeeeceeeesseeeeeeeeesessneneeeeeesseneneeeeesenseeeeeees 371 DqAdvSetClockSource aaa Ea oe ee ee a oe ea aa 371 DqAdvSetTriggerSource cis eet eee as Shee eee ekg ace ee ci ig se 371 DgaAdvAssSigN So E 372 e ie Ee Tele EE 373 FERNS SUI IC E 374 PGA Ee E PA OUILIGG E 375 PowerDNA buffer Gorete euer tee 376 DqAdvSetScansPerPkt E 376 PowerDNA API Reference Manual Release 4 0 4 34 2 DqAdvSetNetworkBuffers PowerDNA API Reference Manual Release 4 0 1 Introduction This document is intended to serve as a reference guide to those who wish to program a PowerDNA system PowerDNA is the umbrella name that describes a real time distributed I O system with exceptional flexibility and performance It consists of PowerDNA Cubes also k
191. DmapAdadEntry Syntax int DgDmapAddEntry pDQOBCB pBcbh int dev int ss unt32 ch uint32 flags int samples char offset Command DQE Input pDQBCB pBcb pointer to DMap table int dev layer ID int ss subsystem uint32 flags configuration flags 64 PowerDNA API Reference Manual Release 4 0 uint32 ch channel use the same flags as with channel list int samples number of samples from this device subsystem channel char offset buffer for address of this entry in the device map Output char offset address of this entry in the device map Return DQ_ITLLEGAL HANDLE invalid pBcb or pBcb is nota DMAP DQ_BAD_DEVN no device at given index or device does not support DMap mode DQ BAD PARAMETER bad value for other parameter DQ_NOT_ENOUGH_ROOM translation list size is too big DQ_DEVICE_BUSY pBcb is busy DQ_SUCCESS successful completion Other negative values low level IOM error Description The function adds an entry transfer list entry into the transfer list Note 1 Using this function one can request multiple consecutive values from the same channel While this option cannot guarantee continuity of data it can be helpful if the user is interested in the average value of the channel
192. DqOpenIOM Layer inside the IOM pointer to store input data from DIO 432 pointer to store converted values of current and voltage on every DIO 432 channel illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a DIO 432 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 205 PowerDNA API Reference Manual Release 4 0 This function call returns two structures structures should be allocated in the user application memory First structure DODIO0432DATAIN is defined as typedef struct uint32 portout Current value written to the output port 31 0 ch uint32 portocs Over current status 31 0 ch uint32 portucs Under current status 31 0 ch uint32 rdcnt Current value of the consecutive read counter setting Number of failed reads prior to disabling the channel uint32 disdiv Current value of the re enable divider 32 bit uint32 dout Actual value driven by the DOUT port 31 0 ch uint32 vccis VCC available 0 1 on the isolated side uint32 adc_i DQ_DI0432_CHAN Current value of the measured current raw uint32 adc_v DQ_DIO432_CHAN Current value of the measured voltage raw DQDIO432DATAIN pDQDIO432DATAIN This structure returns information about the current setting and st
193. E _SSPERCHAN set samples per channel ACB DMap mode DQL_IOCTL208_SE DQOL_IOCTL208_SE _Ra Set value for shunt calibration resistor A in 256 steps P to _Rb set value for shunt calibration resistor B in 256 steps S to P DQOL_IOCTL208_SE _EXC_A set excitation DAC A DQL_IOCTL208_SE _EXC_B set excitation DAC B DQOL_IOCTL208_SE _EXC_CH switch on off excitation channels F to switch shunt calibration on when control is ET Ra orDQL_IOCTL208_SET_Rb 4 4 3 DqAdv208SetExc Voltage Syntax int DgAdv208Set readbackB Command DQE Input int int hd devn floa t ExcVolt Et Gt floa int int t ExcVolt chA chB floa t readbackA floa Output t readbackB floa t readbackA floa Return t readbackB LL DO DO z END_ERROR DQ_TIMEOUT_ERROR DO OM_ERROR DQ_SUCCESS Other negative values Description EGAL HANDLE DQ _BAD_DEVN DQ DAD PARAMETER ExcVoltage int hd int devn ExcVoltA float ExcVoltB uint32 chA uint32 chB float readbackA float Handle to the IOM received from DgOpenIOM device number excitation voltage for excitation DAC A excitation voltage for excitation DAC B channel to measure
194. E invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_BAD_PARAMETER the subsystem is invalid for this device DQ_SUCCESS command processed successfully Zero or positive value Number of bytes left in the buffer Description Add one or more channels to the VMAP 3 5 3 DgRtVmapGetlnoutMap Syntax int DgRtVmapGetInputMap int handle int vmapid int trl_list unsigned char mappedData Input int handle Handle to the IOM int dmapid Identifier of the VMAP int trl_list Index of the VMAP entry Output unsigned char pointer to the beginning of the specified entry input VMAP mappedData buffer Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully 78 PowerDNA API Reference Manual Release 4 0 Description Get pointer to the beginning of the input data map allocated for the specified device 3 5 4 DgRtVmapGetOutputMap Syntax i int DqRtVmapGetOutputMap int handle int dmapid int trl_list unsigned char mappedData Input int handle Handle to the IOM int dmapid Identifie
195. E to start the CAN 503 FALSE to stop illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CAN 503 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error DqAdv503RecvMessage int devn int success int Schan uint32 id uint8 Terror code int Handle to the IOM received from DqOpenIOM Layer inside the IOM channel number message was received on id value of message Will return 0 if there was no message message data buffer number of bytes written to buffer Will return 0 if there was no message returns 0 if the CAN port or bus is in error state returns the error code for this CAN bus returns the number of messages available in the receive FIFO error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CAN 503 chan id data or size is NULL the size indicated by the size parameter is not big enough 238 PowerDNA API Reference Manual Release 4 0 to hold the received message DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out dur
196. FilterEntry uint32 label uint32 new_data_only uint32 trigger_scheduler Command None Input uint32 label Label to accept uint32 new_data_only TRUE FALSE Store only new changed data into the FIFO int trigger_scheduler TRUE FALSE Upon receiving a label trigger mark for execution schedule entry with the same index in the scheduler table Output Assembled filter entry Description This function assembles filter entries from the separate fields Note None 4 24 3 DqAdv566BuildSchedEntry Syntax uint32 DAQLIB DgAdv566BuildSchedEntry uint32 master_entry uint32 periodic uint32 prescaler uint16 delay_counter Command None Input uint32 master_entry TRUE for master entry FALSE for slave entry Upon execution scheduler executes master entry and all following valid slave entries Execution stops upon new master entry or zero entry uint32 periodic Set to TRUE to execute this entry on a periodic basis set to FALSE to execute it one time uint32 prescaler Select one out of three prescalers DQ_AR_SCHED_PS100us main 100us prescalers DQ_AR_SCHED_PSTBO first user timebase DQ_AR_SCHED_PSTB1 second user timebase Set to zero to disable entry Use of three independent timebases allows you to create schedules driven from independent clocks uint16 delay_counter Number of prescaler ticks to wait before executing the entry Output Assembled scheduler entry 247 PowerDNA
197. GAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function writes parameters stored in device object into layer EEPROM or system Flash parameter area User has to specify one of the values as devn Actual layer id 0x0 Oxf write layer EEPROM DQ_LNPRM_ DEVIOM OxFE write parameter sector of the Flash DQ_LNPRM_DEVALL OxFF save both Note This command can take several seconds to complete pending command execution Please reset the PowerDNA cube for parameters to go into effect 2 2 44 DgqCmdSetCalibration Syntax int DgCmdSetCalibration int Tom pDQSETCAL pDQSetCal int entries Command DOCMD_SETCAL 0x174 Set up Calibration Values AT Input int Iom pDQSETCAL pDQSetC PowerDNA API Reference Manual Release 4 0 al int en Output tries int en Return H DO TI EGAL HANDLE tries DQ_SEND_ ERROR DQ_TIMEOUT_ERROR DQ_SUCC ESS Other negative values Description Handle to the IOM returned by DqOpenIOM Array of DOSETCA
198. Handle to the IOM returned by DqOpenIOM char Name ASCIIZ name of the IOM DQ_DEVNAME_S1ZE bytes max int32 PERC pointer to store CRC Output uint32 CRC Standard IEEE 802 3 CRC 32 value of the written name Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function stores the IOM name in the IOM RAM User has to store the PowerDNA cube name in Flash memory for the change to become permanent Note This function is password protected with user level password 2 2 40 DqCmdGetName Syntax int DqCmdGetName int Iom uint32 BufLen char Buffer FRR Command Input Output Return DQCMD_S PowerDNA API Reference Manual Release 4 0 ET NAME 0x168 Read Device Name int Iom uint32 char Buf Char B uffer LL DO EGAL HANDLE DQ_S END ERRO DQ_TIME OUT DO TOM ERROR DQ_SUCCESS ERROR Other negative values Description This function retrieves IOM name in the IOM RAM Handle to the IOM returned by DqOpen I size of Buf
199. ING 1L lt lt 14 For RDFIFO devices stream the FIFO data automatically For WRFIFO do NOT send reply to WRFIFO unless needed define DQ_LN_RECYCLE L lt lt 13 if there is no data taken available overwrite reuse data define DQ_LN_GETRAW L lt lt 12 force layer to return raw unconverted data define DQ_LN_TMREN L lt lt 11 enable layer periodic timer define DQ_LN_IRQEN 1L lt lt 10 enable layer irqs define DQ_LN_PTRIGEDGE1 1L lt lt 9 stop trigger edge MSB define DQ_LN_PTRIGEDGEO L lt lt 8 stop trigger edge 00 software 10 external define DQ_LN_STRIGEDGE1 L lt lt 7 start trigger edge MSB define DQ_LN_STRIGEDGEO L lt lt 6 start trigger edge 00 software 10 external define DQ_LN_CVCKSRC1 L lt lt 5 CV clock source MSB define DQ_LN_CVCKSRCO 1L lt lt 4 CV clock source 0 SW 01 internal 10 exterrnal define DQ_LN_CLCKSRC1 L lt lt 3 CL clock source MSB define DQ_LN_CLCKSRCO L lt lt 2 CL clock source 0 SW 01 internal 10 external define DQ_LN_ACTIVE L lt lt 1 ACT LED status define DQ_LN_ENABLED L lt lt 0 enable operations Please refer to the layer specific section in the user manual for layer specific configuration flags Note None 7 PowerDNA API Reference Manual Release 4 0 2 2 23 DgCmdReadStatus Syntax int DgqCmdReadStatus int Iom uint8 DeviceNum uint32 Entries uint32 S
200. IOCTL501_CHANGE_RESUME resume receive If 501 508 device is in messaging mode this function call also finalizes whatever ongoing message was accumulating the data Notes 4 21 15 DqAdv501Enable Syntax int DgAdv501Enable int hd int devn int chnl int enable Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chnl device channel int enable TRUE enable FALSE disable Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DO DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function starts stops a 501 device Note None 4 21 16 DqAdv501ClearFifo Syntax int DAQLIB DgAdv501ClearFifo int hd int devn uint32 ch_mask int action Command IOCTL Input 233 PowerDNA API Reference Manual Release 4 0 int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM uint32 ch_mask mask of channels to clear FIFO for
201. IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This internal function sets the low level configuration for a counter channel Currently cfg has no meaning but may return extra config status values in the future Description Note 4 27 6 Syntax int uint32 reg Command DQE Input int hd int devn int counter int reg uint32 val Output uint32 val Return DOQ_ILL REGAL HANDLE DqAdv604ReadRegisterValue int hd DqAdv604ReadRegisterValue int devn int counter uint32 value ue ue Handle to IOM received from DqOpenIOM Layer inside the IOM Counter number 0 3 One of the QD60 4_QDU_XXxX constants indicating which register to read Pointer to receive data value Read data value illegal IOM Descriptor or communication wasn t established 342 DO DO DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ SUCCESS PowerDNA API Reference Manual Release 4 0 BAD _DEVN BAD_PARAMETER Other negative values Description This function reads the value from a register reg of the counter relative to layer devn counter channel The following registers are allowed device indicated by devn does not exist or is not a CT 604 counter number is inv
202. K RQ DQ_1L553_BUSMON_DATA CH These are special status bits telling whether transmit or receive has happened DQ_1553_RTS_DATAREADY 1L lt lt 0 Data ready status for this terminal DQ_L553_RTS_DATASENT 1L lt lt 1 Data sent status for active block For all input data the DQ_SSOIN subsystem of the device should be specified To access the bus monitor FIFO is enabled use DQ_L553_BUSMON_DATA CH For bus controller VMap channel numbers are formed as follows define DQ_SL553_BC_VMAP CH TYPE MN BLK IDX Type defines what sort of data needs to be accessed define DQ_SL553_BC_DATA 1L lt lt 127 BCCB data write data read status define DQ_SL553_BC_STATUS 2L lt lt 12 BCCB read status write control define DOQ_SL553_BC_BC_STATUS 3L lt lt 212 BC status word define DQ_SL553_BC_BUSMON 4L lt lt 12 Bus monitor access write define DQ_SL553_BC_MN_DESC 5L lt lt 12 MN descriptor read write define DO _SL553_BC_MJ_DESC 6L lt 5 12 MI descriptor read write For DQ_SL553_BC_STATUS five statuses are requested DQ_SL553_BC_STATUS_BC return status of BC controllers register 0x21A4 DQ_SL553_BC_STATUS_PORT port status DQ_SL553_BC_STATUS_BcPos current MJ and MN position and GOTO status DQ_SL553_BC_STATUS_IsRC return interrupt sources included IDs when interrupt was requested DQ_SL553_BC_STATUS_ERR return error source and frame IDs DQ_SL5
203. L 2 2 3 DqCleanUpDAQLib Syntax void DgCleanUpDAQLib void Input None Output None Return None Description PowerDNA API Reference Manual Release 4 0 Closes socket libraries and deallocates table structures Note This function should be called at the end of your program to allow the library to release resources and clean up its allocated structures before it is unloaded This function should not be called under Windows because Windows will automatically call it when unloading the DLL 2 2 4 DqGetLibVersion Syntax uint32 DgqGetLibVersion void Input None Output None Return Version of PDNA Library Description Library version returns as 0xMMNNSS where M is major version N is minor version and S is release subversion Note Versions with the same minors and different subversions have compatible APIs 2 2 5 DqOpenlOM Syntax int DgqOpenIOM char SIP uintl6 UDP_Port uint32 mTimeOut int handle pDQRDCFG pDqCfg Input char IP IP Address in Decimal dot Notation uint16 UDP_Port UDP port for use by the IOM uint32 mTimeOut Timeout Duration in milliseconds int handle pointer to store descriptor of the IOM being opened PDORDCFG pDqCfg pointer to store pointer to DOCMD_ECHO results or NULL if not required Output int handle descriptor of the IOM being ope
204. L structures containing calibration values Number of calibration entries in pDQSetCal Number of calibration entries actually processed illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration if the Command is processed successfully low level IOM error This function sets up values of calibration DACs The main purpose of it is to calibrate hardware Not every piece of hardware can be calibrated some layers like the AI 225 do not have calibration circuitry or do not require calibration DIO 403 See the User Manual for layer specific details Every calibration entry is represented by the DOSETCAL structure DOCMD_SETCAL typedef struct uint8 dev uint8 ss uint8 channel uint8 dac uint32 value DQSETCAL Note User has to specify p pDqSetCal gt value pl device subsystem channel parameter mode DAC value to write pDOSETCAL DqSetCal gt dev pDgSetCal gt ss pDgSetCal gt dac and DqSetCal gt channel field is reserved for future use DqCmdSetMode DqCmdSetMode int Iom 2 2 45 Syntax int Command DQCMD_SET Input int Iom uint32 Mode uint32 Mask Output None Return DQ_ILL EGAL HANDLE uint32 Mode uint32 Mask MD 0x17C Set Mode of Operation Handle to the IOM returned by DqOpenIOM
205. LL Output int samples number of samples retrieved uint32 data pointer to retrieved binary data 18 bit double volts pointer to value in volts Return DO NO MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 207 DQ_BAD_PARAMETER measurement is not one of the valid DQL_IOCTL208_READ constants clentry is nota valid channel number samples is NULL or requested value is not between 1 and 120 or data is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function performs raw measurements of the following values DQL_IOCTL208_READ_AGND connect both differential inputs of the PGA to analog ground e DQL_IOCTL208_READ_REF read 2 5V voltage reference sg DQL_IOCTL208_READ_Rs measure switch resistance Rs sg DQL_IOCTL208_READ_Rx measure multiplexer resistance R R e DOL IOCTL208 READ Ra measure shunt resistor Ra e DOL IOCTL208 READ Rb measure shunt resistor Rb 122 Note None PowerDNA API Reference Manual Release 4 0 DQL_IOCTL208_READ_SS measure S to S DQL_IOCTL208_READ_PP measure P to AGND DQL_IOCTL208_READ_PS measur
206. L_HANDLE ifpBcb does not reference a receiving Msg queue DQ_NOT_ENOUGH_ROOM if the data field of message indicated by the dataSize field is not large enough to store the message DQ_SUCCESS successful completion Description This function gets a message received by one device in the IOM Note Check the got Msg parameter after calling to see if a message was actually retrieved 3 8 5 DgMsgSendMessage Syntax int DgMsgSendMessage pDQBCB pBcb pDgqMessage message uint32 avail Command DQE Input pPDQBCB pBcb pointer to Msg queue pDqMessage messag message to send uint32 avail pointer to receive the number of messages that there is still room for in the sending message queue Output uint32 avail returns the number of messages that there is still room for in the sending message queue Return DQ_BAD_PARAMETER if any parameter is NULL DQ_ILLEGAL_HANDLE if pBcb does not reference a sending Msg queue DQ_NOT_ENOUGH_ROOM the message queue is full DO_SUCCESS successful completion Description The function sends a message from one device in the IOM Note This function stores a copy of the message in the message queue thus the caller is responsible for freeing the memory of the passed in message 95 PowerDNA API Reference Manual Release 4 0 3 8 6 DgMsgCount Syntax int DgqMsgCount pDOBCB pBcbh uint32 msg_avail uint32 space
207. M PDQRDCFG pDORdCfg pointer to DORDCFG structure allocated by calling process Output PDORDCFG pDQORdCfg pointer to populated DORDCFG structure allocated by calling process Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_IOM_ERROR IOM reports command execution error DQ_SEND_ERROR cannot send packet DQ_TIMEOUT_ERROR IOM reply wasn t received within timeout period HO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description Specified IOM replies back to the host with configuration data The returning packet payload has the following structure device configuration data typedef struct uint32 model IOM model uint32 ipaddr ip address uint32 sernum serial number uint32 caldate calibration date uint32 mfgdate manufacturing date uintl6 devmod DQ_MAXDEVN up to 16 installed layers uintl6 option DQ_MAXDEVN and their option parameters DQRDCFG pDQRDCFG Calibration and manufacturing dates are represented as OXMMDDYYYY in uint32 where MM is month DD is day of the month and YYYY is year Note This is a safe command in any mode 2 2 16 DqCmdReset Syntax SE PowerDNA API Reference Manual Release 4 0 int DgqCmdReset int Iom Command DQCMD_RST 0x110 Reset Device
208. M DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function returns event packet associated with a callback call or an event 3 11 8 DqRtAsyncProcessEvent Syntax int DAQLIB DgqRtAsyncProcessEvent int handle uint32 flags int num_events Command Process event s Input int handle Handle to the IOM received from DgAsyncOpenIOM int devn Device number PDQEVENT pDgEv Pointer to the event packet int signaled True if packet hasn t been yet processed Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Process requested number events and mark packets as processed This function is used if user structured his program to process events in callbacks 3 11 9 DqRtAsyncWaitForEvent Syntax int DAQLIB DgqRtAsyncWaitForEvent int hd uint32 flags uint32 timeout_ms int packets_in_queue Command Wait for
209. NDLE invalid IOM Descriptor DQ BAD PARAMETER The specified slot is empty or invalid DQ_SUCCESS successful completion Description The function returns the ID number as well as other parameters for the device inserted in a given slot Note This function is only useful with PowerDNR chassis On PowerDNA I O modules the device number is always the position of the device in the stack 2 2 8 DqGetDevnBySerial Syntax int DgqGetDevnBySerial int Iom uint32 Serial uint32 devn uint32 slot uint32 address uint1l6 model Input int Iom Handle to the IOM returned by DqOpenIOM uint32 Serial The serial number of the device to query Output uint32 devn Device number of the device matching the serial number uint32 slot Slot of the device matching the serial number uint32 address Address of the device matching the serial number uint16 model Model number of the device matching the serial number Return DQ_ILLEGAL_HANDLE invalid IOM Descriptor DQ_BAD_PARAMETER The specified serial number was not found DQ_SUCCESS successful completion Description The function returns the ID number as well as other parameters for the device with a given serial number Note None 2 2 9 DqSetPacketSize Syntax int DgqSetPacketSize int Iom uint32 MinPktSize uint32 MaxPktSize BER PowerDNA API Reference Manual Release 4 0
210. O overrun Note Add DQ_L553_READFIFO_ALL to the channel number to receive data from the FIFO in one message instead of breaking it into separate messages Each transmission on a 1553 bus always starts with aCommand or Status word followed by timestamp and status flags if enabled The bus monitor then stores a variable number of received data words one to thirty two 4 25 8 DqAdv553ConfigRT Syntax int DAQLIB DgAdv553ConfigRT int hd int devn int channel uint32 rt_mode uint32 rt_size uint32 rtsa_list uint32 valid_list 271 PowerDNA API Reference Manual Release 4 0 Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_mode Remote terminal mode of operation uint32 rt_size Size of the following RT SA and data validation lists uint32 rtsa_list Array of RT SA entries uint32 valid_list List of validation conditions to match rtsa_list or NULL Output Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ_BAD_PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is hea
211. O432DATAIN structure filled in a DgAdv432GetAll call lt rdcnt gt specifies the number of consecutive samples above the selected threshold to be acquired before disconnecting the line Valid values are 1 31 the default value is four lt disdiv gt specifies the number of 15 15ns clocks to wait before the logic will try to re enable a tripped channel lt cfg gt selects which channels need to be re enabled automatically Note 1 For DMap operations these parameters are mapped into special channel numbers of DQ_SSOIN Channels 0 31 return the last measured current 16 MSBs on lines 0 31 Channels 32 63 return the last measured voltage 16 MSBs on lines 0 31 4 17 3 DqAdv432SetLimit Syntax 208 PowerDNA API Reference Manual Release 4 0 int DgqAdv432SetLimit int hd int devn int limitid double limitvalue Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int limitd Channel to set limit for double limitvalue Value of the limit in Amps or Volts Output Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 432 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when perf
212. OEVENT gt event EV553_NO_ACTIVITY pEV553_ID gt evtype None pEV553_ID gt tstamp 10us resolution timestamp pEV553_ID gt data 0 Watchdog register Bits 29 16 are delay in 100us steps EV553_IN_FIFO Bus Monitor input FIFO event In lt param gt None Out pDQEVENT gt event EV553_IN_FIFO 307 PowerDNA API Reference Manual Release 4 0 pEV553_ID gt evtype SL553_PORT_IR_IFH and or Input FIFO half full and FIFO SL553_PORT_IR_IFF flags half full flags pEV553_ID gt tstamp 10us resolution timestamp pEV553_ID gt data 0 Actual amount of data in the FIFO EV553_OUT_FIFO transmit FIFO event In lt param gt None Out pDQEVENT gt event EV553_OUT_FIFO pEV553_ID gt evtype SL553_PORT_IR_OFH and or Output FIFO half empty and SL553_PORT_IR_OFE flags FIFO empty flags pEV553_ID gt tstamp 10us resolution timestamp pEV553_ID gt data 0 Actual amount of data in the FIFO EV553_BUS_ERROR and error or abnormal event on 1553 bus In lt param gt None Out pDOEVENT gt event EV553_BUS_ERROR pEV553_ID gt evtype One or a combination of the following flags SL553_PORT_IR_ITA One of the following errors was detected on bus A B SL553_PORT_IR_ITB Inval
213. OGIC_DC_FAILED 1UL lt lt 1 DC DC failed IOM also define STS_LOGIC_TRIG_START 1UL lt lt 2 Trigger event started IOM also define STS_LOGIC_TRIG_STOP 1UL lt lt 3 Trigger event stopped IOM also define STS_LOGIC_CLO_NOT_RUNNING 1UL lt lt 4 Output channel list not running define STS_LOGIC_CLI_NOT_RUNNING 1UL lt lt 5 Input channel list not running define STS_LOGIC_CVCLK_CLO_ERR 1UL lt lt 6 CV clock error for CLO define STS_LOGIC_CVCLK_CLI_ERR 1UL lt lt 7 CV clock error for CLI define STS_LOGIC_CLCLK_CLO_ERR 1UL lt lt 8 CL clock error for CLO define STS_LOGIC_CLCLK_CLI_ERR 1UL lt lt 9 CL clock error for CLI 7 The first four error flags DC_OOR DC_FAILED TRIG_START and TRIG_STOP are used in the IOM status as well The 3rd uint32 contains the firmware status define STS_FW_CLK_OOR 1UL lt lt 0 Clock out of range IOM also define STS_FW_SYNC_ERR 1UL lt lt 1 Synchronization interface error IOM also define STS_FW_CHNL_ERR 1UL lt lt 2 Channel list is incorrect define STS_FW_BUF_SCANS_PER_INT 1UL lt lt 3 Buf setting error scans interrupt define STS_FW_BUF_SAMPS_PER_PKT 1UL lt lt 4 Buf setting error samples packet define STS_FW_BUF_RING_SZ 1UL lt lt 5 Buf setting error FW buffer ring size define STS_FW_BUF_PREFUF_SZ 1UL lt lt 6 Buf setting error Pre buffering size
214. OM device number which channel to set desired reference level in volts 10V max error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 224 channel is not in range of 0 3 or ref_level is greater than 10 0 or less than 10 0 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets the internal bridge completion voltage At run time use the following steps to set the bridge completion voltage 1 Set bridge completion voltage to 0V 2 Measure difference between Bridge Completion voltage and S by doing a DgAdv224Read using DQ_AI224_MUX_CS in the channel list at a gain setting of 1 3 Measure the voltage Averaging a large number of samples will increase accuracy and help to cancel any motion sensed by the strain gauge 4 Set the bridge completion voltage to the voltage measured in step 3 Note that the API will only allow bridge completion voltage changes in 1 millivolt steps The bridge should be ready to use If desired the bridge completion voltage may be adjusted by measuring and averaging again this time measuring to see any difference between the measured and desired value For example if the reading is now 3mV higher than desired decrease the bridge completion voltage by 3mV
215. ON Gate line transition detected event601_t For EV601_INP_TRANSITION and EV601_GATE_TRANSITION use define EV601_LOW_TO_HI 1 define EV601_HI_TO_LOW 2 To select whether to send event upon input or gate line goes from the logical zero to one or back or both If an event happens a packet of the following structure is sent from the cube to notify the host about this event typedef struct uints dev device ints ss subsystem int16 size data size DQEVENT pDOEVENT ui ui uint32 event event type or command and additional flags uint8 data data for CT 601 layer of EV601_ID type Event data is always layer specific In this case EV601_ID structure is used to inform user application about what type of event has happened on DNx CT 601 layer Event data for 601 layer typedef struct uint32 chan channel information uint32 evtype type of the event uint32 count counter register CR uint32 cr0 CRO W or CRL R register uint32 cri CR1 W or CRH R register uint32 sts applicable status register uint32 tstamp timestamp of event 337 PowerDNA API Reference Manual Release 4 0 uint32 size size of the following data in bytes uint32 data data to follow EV601_ID pEV601_ID Every type of the event requires specific parameters or none and sends a notification with s
216. OR error occurred at the IOM when performing this command D I SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function requests named and modal layer parameters from IOM These parameters reside in the device object and can be partially stored in layer EEPROM Before calling this function caller should fill out the DOGETP RM structure DQCMD_GETPRM typedef struct uint8 dev uint8 ss uint8 mode uint8 value device subsystem parameter mode array of values DQGETPRM pDQGETPRM Following values for mode are available Returned structures xxx layer model define DQ_IOM_ACCESS_INIT INITPRM_xxx_ define DQ_IOM_ACCESS_CALIBR CALSET_xxx_ define DQ_IOM_ACCESS_OPERS OPMODEPRM_xxx_ define DQ_IOM_ACCESS_SHUTDOWN SDOWNPRM_xxx_ define DQ_IOM_ACCESS_NAMEDPRM named parameters in lt value gt are expected define DQ_IOM_ACCESS_NAMES CNAMES_xx_ define DQ_IOM_ACCESS_EECMNDEVS EECMNDEVS The first four modes are used to store copy to memory DOOPMODEPRM_ DQ_IOMODE_OPS DQINITPRM_ DQ_IOMODE_INIT DOSDOWNPRM po_IomMoDE_sD DOCALSET_ DQ_IomopE_cFce If one needs to store or retrieve names of channels D9_IomopE_Names should be used Appropriate data should be stored in the value array for set operation The
217. Ops function Use these settings to override standard behavior for special applications The user may configure as many parameters as he chooses Any parameter that is not enabled by a lt mask gt bit will retain its present value To accomplish AI 211 layer configuration the user must allocate initialize and pass a pointer to a pDOCFGLAYER_211 structure This structure is defined as typedef struct uint16 mask bitwise indicate which of the following fields are valid uintl6 clksrc select clock source for divider uint1l6 clkdiv clock divider output 1MHz max clkdiv 0 passes clksrce w o change Do not set values less than 65 or 23 when 66MHz or 24MHz selected Sample rate is clksrc clkdiv 1l 8 uintl6 fmtr reduced precision data format 1 reduced 0 normal 135 PowerDNA API Reference Manual Release 4 0 uint16 avg_factor Set the averaging factor 0 1 1 2 2 4 3 8 etc uintl6 dec_factor Set decimation factor DOCFGLAYER_211 pDOQCFGLAYER_211 T LSE FT lt mask gt flag bits that select which parameters will be written The following flags are defined define DQAI211_CFGLAYER_DEFAULTSET 1L lt lt 0 1 to set default state define DQAI211_CLKSRCSE 1L lt lt 1 1 if clksrc contains valid data define DQATI211_CLKDIVSE 1L lt lt 2 1 if clkdiv
218. PARAM ET ER D i NOUG EVICE_ BU UCCESS H SY ROOM Other negative values Description BC in B pBcb int dev uint32 offset int ss uint32 ch pointer to M3 structure layer ID subsystem configuration flags channel use the same flags as with channel list number of samples from this device subsystem channel buffer for address of this entry in the device map address of this entry in the device map invalid pBcb or pBcb is not a M3 no device at given index or device does not support M3 mode bad value for other parameter translation list size is too big pBcb is busy successful completion low level IOM error The function adds an entry transfer list entry to a transfer list Note 98 PowerDNA API Reference Manual Release 4 0 Using this function one can request multiple consecutive values from the same channel While this option cannot guarantee continuity of data it can be helpful if the user is interested in the average value of the channel 3 9 5 DgMmSetLayerConfig Syntax int DgMmSetLayerConfig pDQBCB pBcb int dev int ss uint32 flags float rate float actual Command DQE Input pPDQBCB pBcb pointer to M3 structu
219. PWM to soft start 0 gt 1 transition use PWM to soft stop 1 gt 0 transition use PWM to soft start and soft stop use output in PWM mode C GA b 4 k OH In the soft start soft stop mode lt duty_cycle_length gt defines the length of full soft start soft stop cycle The lt duty_cycle_length gt should be no more than 255 lt period_us gt In PWM mode lt duty_cycle_length gt defines the duty cycle on the output with 1 256 resolution 8 bit where 0 corresponds to 1 256 and 255 to 100 210 PowerDNA API Reference Manual Release 4 0 4 18 DNA DIO 448 layer 4 18 1 DqAdv448Read Syntax int DqAdv448Read int hd int devn int read_db uint32 data DQ_DI0O448_PORTS Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int read_db Read channel levels after debouncing Output uint32 pointer to two 32 bit array to store channel data data DQ_D1I0448_PORTS Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 448 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error D
220. PowerDNA API Reference Manual Release 4 0 A United Electronic vV Industries The High Performance Alternative PowerDNA API Reference Manual Release 4 1 June 1st 2010 Edition Copyright 2003 2010 United Electronic Industries Inc All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form by any means electronic mechanical by photocopying recording or otherwise without prior written permission 2 1 2 1 1 2 1 3 2 1 4 2 2 2 2 1 2 2 3 2 2 4 2 2 5 2 2 6 2 2 7 2 2 8 2 2 9 2 2 10 2 2 11 2 2 12 2 2 13 2 2 14 2 2 15 2 2 16 2 2 17 2 2 18 2 2 19 2 2 20 2 2 21 2 2 22 2 2 23 2 2 24 2 2 25 2 2 26 2 2 27 2 2 28 2 2 29 2 2 30 2 2 31 2 2 32 2 2 33 2 2 34 2 2 35 2 2 36 2 2 37 2 2 38 2 2 39 PowerDNA API Reference Manual Release 4 0 INTTODUCTION siececrte re aasiassstenata diententeenteiiieccccecten ieee 1 Five ways to communicate with IOM uu cssccccccceennnnnecceeeeeneecennnnnnnsseneees 1 Pre defined Types and Error Codes csssececcceseeeeeeeeeeeeeeeeeeeeeeeseeeseeeseeeenseneeeeeeess 2 Pre defined Ee 2 Devices and subsystems EE 2 DaqBIOS Packet Gtruchures uk 3 ele EE 3 fe UE PUNCUONS EE 4 Dg rears EE 5 Bolali BINE El c EE 5 Do GleanWU PD AGQEND E 5 Ree 6 DaOpenl EE 6 DG GIGS EE 7 Be 7 DoGetDevnBy TEE 8 DO SCIP EE 8 DO SOL UMC OU E 9 Bes 9 BEE TE 10 DqReadAlChannel EEE 11 Been 11 DOGMGE CMO E 12 B
221. PowerDNA User Manual e Vref Reference voltage Volts Vb Vmeas for Rb Volts Rb Resistance of shunt resistor Rb plus 5k constant Ohms e Vexc Excitation voltage Volts e Vs Vmeas for Rs Volts e Rs Switch resistance Ohms e Vx Vmeas for Rx Volts es Rx Mux resistance Ohms e Va Vmeas for Ra Volts e Ra Resistance of shunt resistor Ra plus 5k constant Ohms e e Before the function can measure these parameters the user should specify measurement conditions e channel Channel used for measurements e ExcA Excitation level A even channels 16 bit e ExcB Excitation level B odd channels 16 bit e Ra Shunt A level 8 bit 256 positions from 0 to 200k e Rb Shunt B level 8 bit 256 positions from 0 to 200k Here are the structures used calibration measurements typedef struct double Vref reference voltage Volts double Vexc excitation voltage Volts double Vs Vmeas for Rs Volts double Rs switch resistance Ohms double Vx Vmeas for Rx Volts double Rx mux resistance Ohms double Va Vmeas for Ra Volts double Ra Resistance of shunt resistor Ra plus 5k constant Ohms double Vb Vmeas for Rb Volts double Rb Resistance of shunt resistor Rb plus 5k constant Ohms DQ2Z08CPRM pDQ208CPRM calibration measurements parameters typedef struct uint32 channel c
222. Q_BAD_DEVN device indicated by devn does not exist or is not an SL 501 or SL 508 DQ BAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets a baud rate other than that defined by DQ_SL501_BAUD_XXX Range should be between 300bps 1 5Mbps This function may also be used to set the baud using the on layer PLL This applies to SL 501 layers with logic revision 0x0102006 or higher To use the PLL first call the DqAdv501SetChannelCfg function with 1L lt lt DQ_SL501_BAUD_PLL_SH added to the config value The upper baud limit using the PLL is 2Mbps Note 224 PowerDNA API Reference Manual Release 4 0 The requested baud and actual baud rates will be different depending on speed The user should compare baud with realbaud to ensure that the rate is within application specific error limits 4 21 6 DqAdv501SetTimeout Syntax int DgAdv501SetTimeout int hd int devn int chnl uintl6 timeout Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int chnl Device Channel uint16 timeout Receive FIFO timeout in milli
223. Q_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function disables all counters on the layer Counters will hold the last value until enabled again Note None 4 26 5 DqAdv601StartCounter Syntax int DgAdv601StartCounter int hd int devn int counter Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 7 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 DQ_BAD_PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration 319 PowerDNA API Reference Manual Release 4 0 DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function starts the specified counter Can be used as a soft start for counters with startmode DQ_PL601_SMSOFT Note None 4 26 6 DqAdv601StopCount
224. R pEV553_ID gt evtype SL553_PORT_BCI_EIRQ SL553_PORT_BCI_MTD Entry Error problem with one or more enabled entry Memory access timeout was detected hardware error EV553_ID gt tstamp IO 10us resolution timestamp pEv553_ID gt sts Port status see description above data 0 SL553_PORT_BCISRC Error source data 1 SL553_ PORT_BCERR Error code EV553_BC_BUS bus controller bus error In lt None gt Out pDQEVENT gt event EV553_BC_BUS pEV553_ID gt evtype SL553_PORT_BCI_BIA SL553_PORT_BCI_MTO Critical IRQ indicates bus activity when idle state is expected Maximum 1553 access time 313 PowerDNA API Reference Manual Release 4 0 exceeded pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above data 0 SL553_PORT_BCISRC Error source data 1 SL553_PORT_BCERR Error code EV553_BC_IRQ bus controller user requested IRQ In lt None gt Out pDOEVENT gt event EV553_BC_IRQ PEV553_ID gt evtype SL553_PORT_BCI_UIRQ User requested IRQ in a minor frame entry pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above data 0 SL553_PORT_BCISRC Error source data 1 SL553_PORT_BCERR Error code
225. ROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description Writes a simulated position of a synchro or resolver or special data for selected channels For a synchro the simulated position is calculated as A S1 sin 30 max_amplitude B S2 sin 150 max_amplitude C S3 sin 270 max_amplitude The reason for this transformation is that an AI 255 controls voltages on S1 S2 and S3 for the purpose of creating the following functions Vsis2 sin Vs253 sin 120 Vs3s1 sin 240 If sin is greater than zero the output is in the same phase as the excitation voltage otherwise it is rotated by 180 For a resolver the simulated position is calculated as A S1 sin max_amplitude B S2 cos max_amplitude 185 PowerDNA API Reference Manual Release 4 0 If sin or cos is greater than zero the output is the same phase as the excitation voltage otherwise it is rotated by 180 Notes The proper device type should be selected in DgAdv255SetMode Amplitude is the maximum momentary value of the signal The sinewave signal is relative to zero 4 10 10 DqAdv255ConvertSim Syntax int DAQLIB DgAdv255ConvertSim int hd int devn int CLSize uint32 c
226. RROR DO SUCCESS Other negative values FALSE disable device operations error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function enables and disables operations on the layer on IC per IC basis Description Notes Recommended for debug purposes only 4 24 20 DqAdv566SetChannelList Syntax int DqAdv566SetChannelList int hd int devn int chan uint32 ss int32 size uint32 entries Command IOCTL Input int hd int devn int ss int chan int32 size uint32 entries Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERRO DO SUCCESS Other negative values RS Handle to IOM received from DqOpenIOM Layer inside the IOM Subsystem Channel Size of the channel list Channel list entries error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at th
227. SDI filtering Rx only DQ_AR_SDI_ENABLED SDI filtering is enabled DQ_AR_SDI_DISABLED SDI filtering is disabled g Rx Timestamp enabled Rx only DQ_AR_TIMESTAMP_ENABLED write data packet into the receive FIFO along with the timestamp DQ_AR_TIMESTAMP_DISABLED no timestamp When timestamp is enabled each received message generates two entries in the FIFO one is the actual message and the second one is a timestamp with 100us resolution The timestamp is cleared when the layer is enabled for operation h Tx Slow slew rate enabled Tx only DQ_AR_SLOWSLEW_ENABLED enable slow slew rate DQ_AR_SLOWSLEW_DISABLED 0 i Enable on chip SDI mask Rx only DQ_AR_SDIMASKO bit 0 DQ_AR_SDIMASK1 bit 1 249 PowerDNA API Reference Manual Release 4 0 j for Rx FIFO control Rx only DQ_AR_LB_CHECK_PARITY include parity check into loopback comparison DQ_AR_ADD_TIMESTAMP add timestamp into FIFO data k frame counter mode Rx only DQ_FRCNT_COUNT_ALL count all frames DQ_FRCNT_COUNT_GOOD only correctly received frames DQ_FRCNT_COUNT_FIFO only placed into the FIFO DQ_FRCNT_COUNT_TRIGGER count frames that triggered scheduler DQ_FRCNT_COUNT_PAR_ERR count frames with parity error 1 control zero label and FIFO priority behavior Tx only DQ_AR_ALLOW_ZERO_LBL allow scheduler to output zero labels DQ_AR_ALLOW_FIFO_HIGH set FIFO priority higher than sc
228. SRC1 DO LN STREAMING A DQ_FIFO_MODEFIFO 139 PowerDNA API Reference Manual Release 4 0 4 6 DNA AI 217 layer 4 6 1 DgAdv217Read Syntax int DgAdv211Read int hd int devn int CLSize uint32 cl uintl6 bData double fData Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels LEE eel pointer to channel list uint32 bdata pointer to raw data received from device double fData pointer to store converted voltage data NULL if not required Output uint32 bData raw data received from device double fData converted voltage data Return DQ_NO_MEMORY error allocating buffer DQ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 217 DQ_BAD_PARAMETER CLSize is not between and DO_MAXCLSIZE bData is NULL or a channel number in c1 is too high DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description When this function is called for the first time the firmware stops any ongoing oper
229. SYNCO DQ_EXT_SYNCI1 0 to release Output None Return DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_PARAMETER line has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function routes the clock input on the Sync connector to one of the SYNCX lines Call DqCmdSetSyncRt after calling this function to make connection Note For DNR racks and 1GB cubes only 4 32 7 DqAdvRouteSyncClockOut Syntax int DgAdvRouteSyncClockoOut int hd int line 365 Input in int Output None Return cti DO DO DAD DQ_ DOSS PowerDNA API Reference Manual Release 4 0 hd li ne LL GA HANDLE DOS DA RAME TE ENI D_ERRO DO T IM EOUT_ OM_ ERROR UC CESS ERROR Other negative values Description Handle to IOM received from DqOpenIOM Signal to assign Use one of the following DQ_EXT_SYNCO DQ_EXT_SYNCI1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 DQ_EXT_GPIO_LOGICO DQ_EXT_GPIO_LOGICI1 DQ_EXT_PUSH_BUTTON 0 to release illegal IOM Descriptor or communication wasn t established lin
230. SYNCx interface lines Note This function selects what to output to the SYNCx line Input from the line is selected from appropriate functions Use devn Oxff to access the CPU layer SYNCx lines When EXTx lines are in use the user should select the source for these lines on the isolated side or use the default designation 4 33 6 DqAdvWriteSignalRouting Syntax int DgAdvWriteSignalRouting int hd int devn pSGNLS psignals Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM pSGNLS psignals pointer to receive current configuration of signal routing on the 375 PowerDNA API Reference Manual Release 4 0 Output PSGNLS psignals Return DQ_NO_MEMORY DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_SUCCESS Other negative values Description DQ_TLLEGAL_ HANDLE layer can be NULL if not required current configuration of signal routing on the layer error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function transfers signal assignments to IOM firmware Note None 4 34 PowerDNA buffer control 4 34 1 DqAdvSetScansPerPkt
231. Se aa 258 Ee e een 259 Eet ie VE fee Pieler Dee aie aa hide ee a ade ia ee ag 260 DqAdv566EnableByChip DEE 261 DqAdv566SetChannellList asic tats el til oes et ce eas eee de eect aoe 262 RI RE 263 DgqAdv553SetMode ses ee ete et al lee das Seal ide cite te datas cu deste 264 Bee EN Bala e an E E TE iy teste ar tr rear eee iment renner ere iene eere 265 Tops te ele Le EE 266 ee coyote Lee rte 267 DqAdv553ConfigBMSetFilter E 268 DogAdv553ContigBMSett rig eters ste tASEEEEENENdee cabs cededeaiacdennagcuveceodacteeneacedoct 269 DqAdv553RecvBMMessages AANEREN 270 4 25 8 4 25 9 4 25 10 4 25 11 4 25 12 4 25 13 4 25 14 4 25 15 4 25 16 4 25 17 4 25 18 4 25 19 4 25 20 4 25 21 4 25 22 4 25 23 4 25 24 4 25 25 4 25 26 4 25 27 4 25 28 4 25 29 4 25 30 4 25 31 4 25 32 4 25 33 4 25 34 4 26 4 26 1 4 26 2 4 26 3 4 26 4 4 26 5 4 26 6 4 26 7 4 26 8 4 26 9 4 26 10 4 26 11 4 26 12 4 26 13 4 26 14 4 26 15 4 26 16 4 26 17 4 26 18 4 26 19 4 26 20 4 26 21 PowerDNA API Reference Manual Release 4 0 GAUDY ee E IR NEE 271 DaAdv553S6tRTWatehdOg WE 273 Dag ACV ee E E 274 DOAGV SSS WV GF T BUNOT ena aea e aa a E EE e a 275 Do Adv SS 3RCACR TBU EN oisein nren ega orea ee E Ea a ei 276 DG AON SS E E 277 ste SS SICA EE 278 DoAdv558ReadStatu Ss R ine aeaa e aa a AE E a 280 DO AGV SS SC OMMGEG E 282 Do Adv S53W riteMIDeSCri e 285 Do AV S53W riteMN DGS GriDIORS swisi02 2 seaioces cevitveca tact ucvencasece acne desesupeceedenrgecu
232. Size uint32 cl uint32 bData double fData Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels uint32 rel pointer to channel list uint32 bData ptr to raw data received from device double fData pointer to store converted voltage data NULL if not required Output uint32 EL channel list uint32 bData received binary data double fData received voltage data Return DO NO MEMORY error allocating buffer DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 207 DQ_BAD_PARAMETER CLSize is not between 1 and DQ_MAXCLSIZE bData is NULL or a channel number in c1 is too high DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function uses DgReadAIChannel but converts data using internal knowledge of input range and gain of every channel When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it in accordance with the channe
233. T Measure frequency and level on input D 175 PowerDNA API Reference Manual Release 4 0 ret DgAdv255MeasureWF hd0 DEVN CHANNEL COARSE amp exc_rate amp exc_level amp exc_offs exc_level 11 8 lt level for the stator coils from the datasheet ret DgAdv255SetMode hd0 DEVN CHANNEL mode flags exc_rate exc_level 4 10 1 DqAdv255SetMode Syntax int DAQLIB DgAdv255SetMode int hd int devn uint32 channel uint32 mode uint32 flags uint32 meas_pts double exc_freq double Se_level Command IOCTL Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 channel Channel to apply mode to uint32 mode Mode of operation uint32 flags Additional flags reserved double exc_freq Expected excitation frequency for external excitation and simulation modes need not to be exact ignored for internal excitation modes double Se_level Expected excitation level RMS to use for gain selection For simulation mode this is an initial excitation level in Volts 0 80Vpp Output uint32 meas_pts Number of data in the generated sinewave Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ_BAD_PARAMETER CLSize isnot
234. T global trigger status QDU_TOM_STD TRIGOUT start trigger detected pulseQDU_TOM_DIR B47 e Output Return PowerDNA API Reference Manual Release 4 0 int gtstart_en int gtstop_en int out_width int qe_mode int qe_delay int qe_err int qe_swap int ts_mode int end_mode int inc int cfg int cfg DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DO BAD PARAMETER ODU TOM DIR TRIGOUT direction O clockwise 1 counter clockwise QDU_TOM_EM TRIGOUT EM event Enable global start trigger Enable global stop trigger 16 bit value in 16 5Mhz clocks specifying CLKOUT TRGOUT pulse width One of the QDU_QEM_XXX end mode constants 16 bit value in 16 5Mhz clocks specifying encoder delay TRUE to enable encoder error detection TRUE to enable A B input swapping One of the QDU_TS_XXX timestamp mode constants only in buffered modes QDU_TSM_NOTS no timestamps QDU_TSM_TSADD add timestamp to every sample copied at EM event QDU_TSM_TSONLY put only timestamp into the FIFO at EM event One of the QDU_EM_XXX end mode constants QDU_EM_CRO end when CR lt CRO QDU_EM_CRI1 end when CR gt CR1 QDU_EM_CRO1 end when counter value is less then CRO or more then CRI QDU_EM_IE end on event index or user QDU_EM_TBR end when time base counter reaches 0 QDU_EM_INC end when counter changes by pre defined number QDU_EM_INF indefinite wrap around counter 16 bit value used to specify CLKOUT or
235. TER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function reads data from the RT SA status memory which holds RT SA and channel bus status lt rt_size gt is a number of entries in lt rtsa_list gt Each entry in this list is defined as follows DQ_1553_RT_RT N DO_L553_RT_STSO DO L553 SE Srel DO_LS53_RT_STS2 DOQ_L553_RT_CHSTAT DQ_1553_RT_BERRORS DQ_1553_RT_DATA_RDY DO L b3 RI DATA GENT N amp 0x1f lt lt 6 RT number Tizi Last command hi and status low word 2 Last SYNC hi and Transmitter low shutdown 3 Last mode command low 16 bits 4T2412 Channel status RT SA ignored 5 6 7 Bus errors RT SA ignored RT status that data has been received BC gt RT RT status that data has been send BC lt RT DQ_L553_CHSTAT has the following bits available define SL553_PORT_STS_BSF 1L lt lt 31 RT Current bus that driving BM FIFO 1 BUS A define SL553_PORT_STS_BSR 1L lt lt 30 RT Current bus that driving RT 1 BUS A define SL553_PORT_STS_ENB 1L lt lt 29 RT Bus B Encoder is enabled in RT Engine define S L553_PORT_STS_ENA 1L lt lt 28 RT
236. TMR1 0 is a single pulse define DQ_LN_CLKID_DUTYO 1L lt lt 6 Duty cycle of TMRO 0 is a single pulse define DQ_LN_CLKID_TMR1 1L lt lt 5 TMR1 burst clock define DQ_LN_CLKID_TMRO 1L lt lt 4 TMRO conversion base clock define DQ_LN_CLKID_CVIN 1L lt lt 3 CV Input SS clock define DQ _LN_CLKID_CVOUT 1L lt lt 2 CV Output SS clock define DQ_LN_CLKID_CLIN 1L lt lt 1 CV Input SS clock define DQ _LN_CLKID_CLOUT 1L lt lt 0 CV Output SS clock Note None 2 2 27 DqCmdSwTrigger Syntax int DgqCmdSwTrigger int Iom uint32 Mask Command DOCMD_START 0x138 Start Stop Devices by Mask Input int Iom Handle to the IOM returned by DqOpenIOM uint32 Mask layer mask Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description The function issues a software start trigger pulse If the configuration defines a software trigger the layer will be programmed but idle from the moment of switching into operation state to the moment of receiving a software trigger command i e will not produce any data The software trigger command causes the logic to issue a start trigger pulse to start data
237. T_IR_BCH pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above 309 EV553_BUS_ CHANGED Communication bus was switched PowerDNA API Reference Manual Release 4 0 In lt param gt None Out PpDOEVENT gt event EV553_BUS_CHANGED pEV553_ID gt evtype SL553_PORT_IR_BCH pEV553_ID gt tstamp 10us resolution timestamp pEV553_ID gt sts Port status see description above Mode commands these are mode commands received at the highest level decoder without information about which terminal it belongs to Due to the fact that DNx 1553 553 is comprised of 32 RTs these are commands that received on a single RT affect the behavior of all terminals If you are interested in per terminal information use EV553_MD event instead EV553_MD SHUTDOWN Bus shutdown mode command In lt param gt None Out PpDOEVENT gt event EV553_MD_SHUTDOWN pEV553_ID gt evtype SL553_PORT_IR_STS SL553_PORT_IR_OTS SL553_PORT_IR_DBC SL553_PORT_IR_DBA Mode command Selected transmitter shutdown received with data Mode command Override selected transmitter shutdown received with data Mode command Dynamic bus change request received in mode command Mode command Dynamic bus change request accepted pEV553_ID gt tstamp 10us resolu
238. T_IR_TFW 1L lt lt 20 Bus Too few words were received within RX message suppress status define SL553_PORT_IR_ICD 1L lt lt 19 Bus Message error detected illigal illogical command error send status define SL553_PORT_IR_BCH 1L lt lt 18 Bus Bus was changed command arrived on different bus define SL553_PORT_IR_CDA 1L lt lt 17 Bus Command data received on A bus define S L553_PORT_IR_CDB 1L lt lt 16 Bus Command data received on B bus define SL553_PORT_IR_BCR 1L lt lt 15 Bus Broadcast command received define SL553_PORT_IR_BDR 1L lt lt 14 Bus Broadcast data received define SL553_PORT_IR_RTD 1L lt lt 13 Bus RTRT Timeout detected define L553_PORT_IR_RVF 1L lt lt 12 Bus RTRT Validation failed define SL553_PORT_IR_DWG 1L lt lt 11 Bus Gap within data word detected use only when xxRTR_DGP gt 0 define SL553_PORT_IR_DOA 1L lt lt 10 Logic 1553 bus A B data was overriten critical IRQ indicates that main state machine define SL553_PORT_IR_DOB 1L lt lt 9 Logic stuck somewhere and new 1553 command data arrived before it previous processed define S L553_PORT_IR_EMT 1L lt lt 8 Logic External memory access timeout define SL553_PORT_IR_SDW 1L lt lt 7 Mode command Synchronize with data word received on one of the terminals IRQ request define SL553_PORT_IR_STS 1L lt lt 6 Mode command Selected transmitter shutdown received with data wo
239. UCCESS Other negative values Description DqAdv500SetTxCondition int hd DqgAdv500SetTxCondition int devn uint32 cmd uint8 Handle to the IOM received from DqOpenIOM Layer inside the IOM what to set value to write error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a V 500 cmd is not one of the DOL TOCTL500_SET_MSG values or value is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 220 PowerDNA API Reference Manual Release 4 0 Sets the method by which transfer back to the host the device divides the received data stream into discrete messages for The following values are defined for the cmd parameter define DQL_IOCTL500_SE1 define DQL_IOCTL500_SET define DQL_IOCTL500_SE Note None MSG_TIMER 1 set timer interval _MSG_TERM 2 set msg terminator null terminated char T_MSG_LEN 3 set msg length 4 21 DNA SL 501 and DNA SL 508 layers DNA SL 501 and DNA SL 508 are serial layers SL 501 layer has four serial 232 422 485 ports and SL 508 has eight ports 4 21 1 DqAdv501BaseClock int DgAdv501SetChannelCfg int hd int devn int chnl int Syntax baseclock Command
240. UF_SAMPS_PER_PKT STS_FW_BUF_RING_SZ sTS_FW_BUF_pREFuF_sz Set in ACB or Burst mode signify that the requested buffer settings cannot be accepted in the current configuration The reason may be an incorrect parameter for that particular layer or an inability to allocate a proper buffer or function compatible with other layers in the stack The flag sts_rw_sap_conric is set when a layer configuration is improper for this layer or a combination of layers The flags sts_rw_sur_over and srs_rw_sur_unpeR are set for input and output subsystems in situations in which an internal buffer becomes full and there is no room to store more data and one or more samples are lost or when an output buffer becomes empty output stopped These flags make sense in ACB mode only The flags sts_rw_tyR_F1ro_over and stTs_Fw_LyR_FIFO_UNDER are similar to previous flags but report underrun overrun status of FIFO circuitry located on each layer The flag sts_rw_eeprom ratr is set when the layer E7PROM 32 bit cyclic redundancy code CRC32 calculated during the initialization stage does not match the CRC32 stored in the last four bytes of the 2048 byte E7PROM chip The flag os eu euni part reports a general layer failure of unknown source detected by the firmware The flag sts_rw_oper_mopz is set when a layer is in operating mode The layer enters operating mode for DMap ACB Msg M3 and Burst operations The first two error flags CLK_OOR and SYNC_ERR are u
241. VN DO DQ_ DO BAD_PARAMETER DQ_SEND_ERROR TIMEOUT_ERROR OM_ERROR DQ_SUCCESS Other negative values Description DqAdvReadCalData int hd int devn BYTE CalData uint32 Handle to the IOM received from DqOpenIOM Layer inside the IOM pointer to store retrieved calibration data may be NULL if caller doesn t want to receive data pointer to store size of calibration data retrieved may be NULL if CalData is NULL pointer to calibration data retrieved size of calibration data retrieved error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or does not support calibration data CalSize is NULL but CalData is not NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function retrieves calibration data and stores it inside DLL Note Data is stored in the DLL memory and shouldn t be changed 52 PowerDNA API Reference Manual Release 4 0 3 2 Advanced Circular Buffer ACB Functions These are functions specific to ACB mechanisms 3 2 1 DgAcbCreate Syntax int DgAcbCreate pDQE pDgqe int iom uint32 devn uint32 ss PDOBCB pBcb
242. VmapGetlnputData Syntax int DgqRtVmapGetInputData int handle int vmapid int trl_index uint32 max_size int data_size int avl_size uint8 data Input int handle Handle to the IOM int vmapid Identifier of the VMAP to read from int trl_index Index of the VMAP entry uint32 max_size Size of the data buffer Output int data_size Number of bytes actually read Int avl_size Number of un read bytes still sitting in the device s input FIFO uint8 data Buffer containing the received bytes Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Copies data from the input packet and returns number of bytes copied and available size in the input FIFO 3 5 9 DgRtVmapStart Syntax int DgqRtVmapStart int handle int vmapid Input int handle Handle to the IOM int vmapid Identifier of the VMAP to start Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_SUCCESS command processed successfully Description This function starts operation 3 5 10 DqRtVmapStop Syntax int DgRtVmapStop int handle int vmapid Input int handle Handle to the IOM int vmapid Identifier of the VMAP to stop 81 PowerDNA API Reference Manual Rele
243. YNC or data bit time L lt lt 24 Bus Bit timing error was detected on bus A B one of the invalid combination on the input 265 SL553_PORT_IR_BEB ca timeout detected suppress status SL593_PORT_IR_TFW 1 suppress status SL55S_PORT_TR_1Cp 1 error send status 8L553_PORT_IR_BCH i SL553_PORT_TR_RTD KE SL553_PORT_ xxRTR_DGP gt 0O Lal SL553_PORT_STS_B el Di el gt SL553 PORI SIS B SL553 PORT_STS_P zal w SL553 FORI SIS S A gt SL553_PORT_STS E E SL553_P0 Ke 4 d n 3 d We KS bi W SL553_PORT_STS_TMW SL553_PORT_STS_TFW SL553_PORT_IR_MED 1 SL553_PORT_IR_TMW 1 SL553_PORT_IR_RVF EA R_DWG 1 PowerDNA API Reference Manual Release 4 0 L lt lt 23 L lt lt 22 L lt lt 21 Lee zt L lt lt 19 tezisi ngegia Koetz Lett L lt lt 9 L lt lt 8 LT L lt lt 6 LESS L lt lt 4 L lt lt 3 L lt lt 2 fi Z ff ti Z fy td fe e L Bus Bis Bus Bus Bus Bus Bus Bus Buss BUS BUS BUS BUS RI RI SI RE rising falling edge timing is invalid bit timing Message error detected data error suppress status Too many words were received within RX message Too few words were received within RX message Message error detected illigal illogical command Bus was changed command
244. _BCI_MRBF At least one Mode TX command with data word failed SL553_PORT_BCI_MBRF At least one Mode RX command with data word failed SL553_PORT_BCI_RBF At least one RT gt BC transmission failed SL553_PORT_BCI_BRF At least one BC gt RT transmission failed pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above data 0 SL553_ PORT_BCISRC Error source data 1 SL553_PORT_BCERR Error code Note 1 Maximum event rate is limited to 50us or 20kHz to avoid interrupt overrun If this interrupt rate is exceeded interrupt routine disables events and firmware status flag STS_FW is set to STS_FW_OVERLOAD 4 25 33 DqRtAsync553WriteRT Syntax int DAQLIB DqRtAsync553WriteRT int hd int devn int channel int request_ack uint32 rt_size uint32 rtsa_list uintl16 data Command Write remote terminal data using asynchronous socket with or without acknowledge Input int hd Handle to the IOM received from DgAsyncOpenIOM int devn Device number int channel Channel 0 or 1 315 PowerDNA API Reference Manual Release 4 0 int request_ack uint32 rt_size Size of the following RT SA list uint32 rtsa_list Array of RT SA to write to uint16 data Pointer to the array of pointers to the data for each entry in rtsa_list Output Returns DQ_NO_MEMORY error allocating buffer DQ_TLLEGAL_ HANDLE illeg
245. _ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ SUCCESS Other negative values Description Immediate flag can be or ed with the first two flags Received packet raw error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function receives a packet of data from the Rx interface Note A DNA 429 566 uses channels Rx6 Rx11 as loopback channels for Tx0 Tx5 4 24 15 DqAdv566RecvFifo Syntax int DgAdv566RecvFifo int hd int devn int chan int maxsz uint32 data uint32 copied uint32 remains Command IOCTL Input int hd int devn int chnl int maxsz uint32 data uint32 copied uint32 remains Output None Return DQ_NO_MEMORY DO ILLEGAL HANDLE DQ _BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DO TOM ERROR DQ_SUCCESS Handle to IOM received from DqOpenIOM Layer inside the IOM Channel Maximum number of messages to retrieve Array for received messages Number of packets the function was able to retrieve from the channel FIFO Number of messages remains in the FIFO
246. _P30_N30_24W DQ_913_P45_N45_36W DQ_913_P45_N15_24W DQ_913_P15_N45_24W Note None 4 30DNR PWR layer 4 30 1 Syntax set power off 1 5V 12Watts 10V 24Watts 15V 36Watts 15V 5V 24Watts 1 5V 15V 24Watts set power off JI 12V 20Watts JI 24V 40Watts set power off AM 15V 12Watts A 30V 24Watts A 45V 36Watts AM 45V 15V 24Watts AM 15V 45V 24Watts DqAdvDnrpRead int DqgAdvDnrpRead int hd int devn int CLSize uint32 cl uint32 bData double fData Command IOCTL Input int hd devn int CLSize vuint32 el uint32 bData double fData int Output uint32 cl uint32 bData double fData Handle to the IOM received from DgOpenIOM Layer inside the IOM number of channels pointer to channel list ptr to raw data received from device pointer to store converted voltage data NULL if not required channel list received binary data received voltage data 355 PowerDNA API Reference Manual Release 4 0 Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 208 DQ_BAD_PARAMETER CLSize is not between 1 and DOQ_MAXCLSIZE bData is NULL or a channel number in c1 is invalid DQ_SEND_ERROR unable t
247. _SEL_CHAN_3 0x08 define AI211_SEL_CHAN_ALL 0x0f More than one channel may be specified by oring multiple channel flags together lt mask gt flag bits that select which parameters will be written The following flags are defined define DQAI211_CFGCH_DEFAULTSET 1L lt lt 11 if 1 set all values to default state define DQAI211_BIASDRIVESE 1L lt lt 0 1 to set biasdrive parameter define DQAI211_BIASONOFFSE 1L lt lt 1 1 to set biasonoff parameter define DQAI211_COMPHISE 1L lt lt 2 1 to set comphi parameter define DQATI211_COMPLOSE 1L lt lt 3 1 to set complo parameter define DQAI211_ALARMCTRLSE 1L lt lt 4 1 to set alarmctrl parameter define DQAI211_HPFSE 1L lt lt 5 1 to set hpf parameter define DQAI211_OFFSETSE 1L lt lt 6 1 to set offset parameter define DQAI211_ANAFILTSET 1L lt lt 7 1 to set anafilt parameter 132 PowerDNA API Reference Manual Release 4 0 define DQAI211_MAINENBSET 1L lt lt 8 1 to set main_enb parameter define DQAI211_SECENBSSET 1L lt lt 9 1 to set secenbs parameter define DQAI211_SECNSET 1L lt lt 10 1 to set secn parameter The DQAI211_CFGCH_DEFAULTSET flag bit is used to easily set all of the channel configuration values to their default state Before setting up a custom con
248. _avail Command DQE Input pDOBCB pBcb pointer to Msg queue uint32 msg_avail pointer to receive the number of messages in the message queue uint32 space_avail pointer to receive the number of messages that there is available space for in the message queue Output uint32 msg_avail returns the number of messages in the message queue uint32 space_avail returns the number of messages that there is available space for in the message queue Return DQ BAD PARAMETER if any parameter is NULL DQ_ITLLEGAL_HANDLE ifpBcb does not reference a Msg queue DQ_SUCCESS successful completion Description The function tells how many messages are in a queue and how many messages can be added to the queue before it is full Note None 3 9 Mapped Messaging Mode M3 Functions No longer supported in 3 8 0 releases These are functions specific to mapped messaging mode mechanisms 3 9 1 DgMmCreate Syntax int DgqMmCreate pDOQE pDge int iom uint32 dir uint32 config uint32 queueSize PDOQBCB pBcb Command DQE Input PDQE pDqe pointer to the previously created instance of DQE int iom IOM Descriptor uint32 dir Direction for message queue either DQ_MSG_DIRECTION_RECEIVING or DQ_MSG_DIRECTION_SENDING uint32 config configuration layer specific uint32 queueSize maximum num
249. a NULL if not required Output int32 Ze channel list uint32 bData received binary data double fData received voltage data Return DO NO MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 208 DQ_BAD_PARAMETER CLSize is not between 1 and DQ_MAXCLSIZE bData is NULL or a channel number in c1 is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command 358 PowerDNA API Reference Manual Release 4 0 DO SUCCESS successful completion Other negative values low level IOM error Description This function reads voltage current and temperature parameters from DNR power layer Layer uses a 24 bit converter that reads data once a second Following cannels are defined as well as macros to convert data ADC allocation 0x40 define DQ_L4_ADC_TEMP2 15 Temperature Code 644 Code 0x800000 149nV 0 00295K define DO LA ADC_I_1_5 14 1 5V output current Code 0x800000 7 45uA define DQ_L4_ADC_TEMP1 13 Temperature Code 644 Code 0x800000 149nV 0 00295K define DQ LA ADC_I_3_ 3 12 3 3V output current Code 0x800000 7 45uA define DQ LA ADC_GND_3 11 internal reference ground define DQ LA ADC_I_IN 10 Input
250. a an array of 5 values NULL if not required illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a PC 91x unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function returns the status and ADC readings from a 91x series layer PC 91X ADC channel assignments indices for bdata and fdata DQ_PC91X_CH_EXT_V 0 volts external JIO connector 353 PowerDNA API Reference Manual Release 4 0 DQ_PC91X_CH_INPUT_I 1 JI amps current used by DC DC converters DQ_PC91X_CH_INT_V 2 volts internal DNx system power DQ_PC91X_CH_DCDC_INPUT_V_ 3 volts voltage at input to DC DC DQ_PC91X_CH_THERM 4 degrees C temperature of the ADC IC bit defines for status information returned to status DQ_91X_STS_JMAIN_ON 1L lt lt 2 1if JMAIN DNA is used as a power source DQ_91X_STS_JIO_ON 1L lt lt 1 1 if JIO Front connector is used as a power source DQ_91X_STS_JIO 1L lt lt 0 JIO Input Power status 0 fault no power Note None 4 29 2 DqAdv91xSetConfig Syntax int DgAdv91xSetConfig int hd int devn uint32 src uint32 vsel Command DQE Input int hd Handle to IOM received from DqOpenIOM int
251. able to write to the channel FIFO uint32 available Number of entries still available in the FIFO Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function puts packets of data into the Tx FIFO Note This function returns after data is transmitted on the interface If data cannot be transmitted in the timeout period the function returns a DQ_TIMEOUT_ERROR 4 24 14 DqAdv566RecvPacket Syntax int DgAdv566RecvPacket int hd int devn int chan int where uint32 data Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int chnl Channel int where Mode of operation DQ_AR_Rx_LATEST get latest data from the interface DQ_AR_Rx_FIFO get a sample from the FIFO queued DQ_AR_RxIMMEDIATE immediate return if no data 256 PowerDNA API Reference Manual Release 4 0 uint32 data Output None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_SEND
252. ackets You can adjust the depth in DgRtAsyncOpenIOM 3 11 10 DqRtAsyncReceive Syntax int DAQLIB DgqRtAsyncReceive int handle uint32 flags pDQPKT buffer int size pDORTRCQUEUE paRcQueue int packets_in_queue Command Receive event packet Input int handle int flags pDQPKT buffer int size pDQRTRCQUEUE paRcQueue int packets_in_queue Output Handle to the IOM received from DqgAsyncOpenIOM Define behavior of the function Pointer to the received packet Size of the received packet Pointer to the queue entry associated with the received packet Number of packets in the queue including the received one 112 PowerDNA API Reference Manual Release 4 0 None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_SEND_ERROR DQ_TIMEOUT_ERROR DO TOM ERROR DQ_SUCCESS Other negative values Description error allocating buffer illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function receives a packet from the queue and marks this entry as processed lt flags gt DQ_RTRE_WAIT_PACKET wait for incoming packet If this flag is not set function returns a packet from the packets already stored in t
253. ail DOBCB pBcb char data uint32 avail uint32 size uint32 BCB containing the desired ACB pointer for the data buffer desired data buffer size in scans minimum size of the data to return to the user buffer in scans If the ACB can t return a buffer of minimal size the function returns 0 in returned and NULL in data buffer for the number of scans actually available buffer for the number of scans worth of data remaining in the buffer 59 PowerDNA API Reference Manual Release 4 0 Output uint32 returned the actual size of the buffer accessible from dat a in scans uint32 avail the number of scans worth of data remaining in the buffer not including the returned data buffer Return DO DAD PARAMETER data is NULL DQ_SUCCESS successful completion Description This function was created to avoid copying data from the ACB buffer to the user buffer It returns a pointer to the ACB buffer where requested number of scans is available This function returns in data a pointer to a data buffer internal to the ACB from which the user can take acquired data The returned parameter indicates how much data is in the returned buffer in scans avail indicates the amount of remaining data not including the amount in the returned buffer If a data buffer large enough to hold at least rqsizemin scans of data cannot be returned the function returns NULL in the data parameter and 0 in
254. al IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO DAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function writes data to the RT SA memory which is used to send out data upon receiving a Transmit command from a BC See DqAdv553WriteRT for full description 4 25 34 DqRtAsync553ReadRT Syntax int DAQLIB DqRtAsync553ReadRT int hd int devn int channel uint32 rt_size uint32 rtsa_list uintl6 data Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_size Size of the following RT SA list uint32 rtsa_list Array of RT SA to read from uint16 data Pointer to arrays to store data from the specified sub addresses Output Returns DQ_NO_MEMORY error allocating buffer DQ_TLLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device
255. al IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 211 DQ BAD PARAMETER No channel specified decimation ratio is illegal value tapsize is illegal value or data is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_TOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description 137 PowerDNA API Reference Manual Release 4 0 This function can be used to perform FIR configuration and control functions for the AI 211 when the user desires to specify his own filter coefficients and decimation rates In the normal case these configuration settings are set automatically by the DgAcbInitOps function Use these settings to override standard behavior for special applications The user may configure as many parameters as he chooses Any parameter that is not enabled by a lt mask gt bit will retain its present value lt channel gt parameter indicates which channels will get their FIR configuration changed The following flags are defined define AI211_SEL_CHAN_0 0x01 define AI211_SEL_CHAN_1 0x02 define AI211_SEL_CHAN_2 0x04 define AI211_SEL_CHAN_3 0x08 define AI211_SEL_CHAN_ALL Ox0f More than one channel may be specified by oring multiple channel flags together lt mask gt paramet
256. al voltage between S and S with shunt applied Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 208 DQ BAD PARAMETER one of parameters supplied are bad DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion DQ_EXECUTION_ERROR Error while working with shunt cal most likely connections Other negative values low level IOM error Description The function performs shunt calibration measurements Notes 1 The function takes approximately 5 seconds to execute with 10 cycles PS should be connected to S on the screw terminal Otherwise the shunt cannot be measured and only a four wire interface is supported 3 Shunt A is applied between S and P shunt B between S and AGND 4 Measurement range of r_shunt can be from 10k to 170k shunt has 5k 0 1 resistor and 200k digital potentiometer with good ppm C but with 30 tolerance Some layers may be capable of providing shunt calibration with a resistance exceeding 170k 4 5 DNA AI 211 layer 4 5 1 DgAdv211Read Syntax int DgAdv211Read int hd int devn int CLSize uint32 cl uintl6 bData double fData Command 130 PowerDNA API Reference Manual Release 4 0
257. alid reg is not one of the QDU constants or value is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error DqgAdv604WriteRegisterValue DqAdv604WriteRegisterValue int hd int devn int counter Handle to IOM received from DqOpenIOM Layer inside the IOM Counter number 0 3 One of the DO_CTU_XXxX constants indicating which register to write Value to write illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 604 counter number is invalid reg is not one of the QDU constants or value is NULL QD604_QDU_STR QD604_QDU_CTR QD604_QDU_CCR QD604_QDU_CR QD604_QDU_LR QD604_QDU_CRO QD604_QDU_CR1 QD604_QDU_TBR QD604_QDU_QED QD604_OD IFWR Note None 4 27 7 Syntax int uint32 reg uint32 value Command DQE Input int hd int devn int counter int reg uint32 value Output None Return DQ_ILLEGAL HANDLE DO DAD DEVN DO DAD PARAMETER DQ_SEND_ERROR unable to send the Command to IOM 843 PowerDNA API Reference Manual Release 4 0 DQ_TIM OUT DO OM_ERROR DQ_SUCCESS Other negative values Description ERROR nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful comp
258. alue before write illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 604 counter number is invalid unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error Updates status of all digital out lines returning last value Note None 4 28 DNA CT 651 layer 4 28 1 DqAdv651GetRegister int DgAdv651GetRegister int hd int devn uint32 reg uint32 Syntax value Command DQE Input int hd int devn uint32 reg Output uint32 value Return DQ_ILLEGAL_HANDLE DO DAD DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_EKRROR Handle to IOM received from DqOpenIOM Layer inside the IOM Register to get Value of register illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 651 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command 351 PowerDNA API Reference Manual Release 4 0 DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads gets a configuration or status register from a CT 651 layer The input reg must be one of the followi
259. alues low level IOM error Description This function reads channels specified in DORDCHNL structures The IOM firmware scans incoming data and passes subsystem and channel information to the appropriate device driver Firmware relies on user to set up DO_LASTDEV for the last device structure in the packet and proper size of data accordingly to the layer type For example an AI 201 returns uint16 for every channel requested and an AJ 205 and an AI 225 return uint 32 See user manual for a complete list Neither firmware nor the library performs network to host data conversion The user is responsible for converting data according to the layer types involved DOCMD_RDCHNL transfers data in the following format DQCMD_RDCHNL typedef struct uint8 dev uint8 ss 54 2 PowerDNA API Reference Manual Release 4 0 uint8 chnl DQRDCHNL pDQRDCHNL Note Use device l 0x80 to indicate that this is the last device in the list Since DMap mode is provided there is only marginal use for this function This function interface is prone to user errors 2 2 26 DqCmdSetClock Syntax int DgqCmdSetClock int Iom pDQSETCLK pDQSetClk float CloseFreq uint32 entries Command DQCMD_SETCLK 0x134 Set Clock Rate Input int Iom Handle to the IOM returned by DqOpenIOM pDQSETCLK clock settings pointe
260. and DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 dout Output parameter that receives the din value Output uint32 dout din value Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 604 DQ BAD PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function returns the status of all digital out lines Note None 4 27 12 DqAdv604WriteDioOut Syntax int DgAdv 604WriteDiocOut int hd int devn uint32 dout uint32 last_dout 350 Command DQE Input int hd int devn Output Return uint32 last_dout DQ_ILLEGAL_ DQ_BAD_DEVN PowerDNA API Reference Manual Release 4 0 uint32 dout uint32 last_dout HANDLE DO BAD _ PARAMETER DQ_SEND_ERROR ERROR DQ_TIMEOUT_ DQ_SUCCESS DQ_ITOM_ERROR Other negative values Description Handle to IOM received from DqOpenIOM Layer inside the IOM Dout value to write Output parameter that receives the previous dout value Previous dout v
261. and S3 for the purpose of creating the following functions Vsis2 sin Vs253 sin 120 Vs3s1 sin 240 If sin is greater than zero the output is in the same phase as excitation voltage otherwise it is rotated by 180 For a resolver a simulated position is calculated as A S1 sin max_amplitude B S2 cos max_amplitude If sin or cos is greater than zero the output is in the same phase as excitation voltage otherwise it is in rotated by 180 Notes Don t forget to allocate arrays for lt act_cl gt and lt bdata gt four times as large as CLSize for a resolver and six times as large as CLSize for a synchro Pass NULL as lt bdata gt for creating a channel list for DgRtDmapAddChannel 4 10 11 DqAdv255WriteBin Syntax int DgAdv254WriteBin int hd int devn int CLSize uint32 cl uint32 bdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize Reserved uint32 cl Channel of interest uint32 bdata Binary gain or phase data Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ BAD PARAMETER Configuration parameters are incorrect 187 PowerDNA API Reference Manual Release 4 0
262. are clock triggers the line itself If device is configured to use software start and or stop triggers DqeEnable also sends the DOCMD_START command ppBcb is an array of BcbNum size that contains a list of all operations you would like to start or stop If broadcast parameter is set to TRUE DqgeEnable uses a broadcast type of DOCMD_START to start all devices nearly simultaneously Otherwise it sends DOCMD_START commands according to the device order in the list supplied Note None 3 10 2 DqeSetEvent Syntax int DgeSetEvent pDQBCB och uint32 evtFlags Command DQE Input pDOBCB pBcb pointer to a previously allocated BCB uint32 evtFlags event flags Output None Return DQ_INIT_ ERROR failed to create an event 102 Description DO GUCC PowerDNA API Reference Manual Release 4 0 Cl SS successful completion This function sets up event flags about which the user wants to be informed Normal execution flow assumes that user application waits for events by calling DqWaitForEvent and relinquishes control to the OS The PowerDNA header file defines the following event flags BCB events define define define define define define define define define define define define define define define define define DQ_eDataAvailable 1L lt lt 0 Data is available Dap com
263. ase the label array is overwritten with the data retrieved from the layer 4 24 7 DqAdv566SetScheduler Syntax int DgAdv566SetScheduler int hd int devn int chnl uint32 cmd uint32 from uint32 size uint32 flags uint32 data Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int chal Channel uint32 cmd Command see description uint32 from Start entry uint32 size Number of entries to set get uint32 flags Array for scheduler flags table uint32 data Array for scheduler data table Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function writes to or reads from scheduler table s The following commands are valid DQ_AR_SETSCHED_PUT change scheduler entries DQ_AR_SETSCHED_ GET retrieve stored scheduler entries DQ_AR_SETSCHED_DATA_ONLY works with scheduler data only DQ_AR_SETSCHED_FILL_TABLE fill scheduler table with data provided Data is taken from flags O a
264. ase 4 0 Return DQ_ILLEGAL HANDLE invalid IOM handle DO SUCCESS command processed successfully Description This function stops operation 3 5 11 DqRtVmapRefresh Syntax int DgqRtVmapRefresh int handle int vmapid int flags Input int handle Handle to the IOM int vmapid Identifier of the VMAP to refresh int flags For future extension of VMAP mode Return DQ_ILLEGAL_ HANDLE invalid IOM handle DO SUCCESS command processed successfully Description This function refreshes the host s version of the map by downloading the IOM s map 3 5 12 DqRtVmapRefreshOutputs Syntax int DgqRtVmapRefreshOutputs int handle int vmapid int flags Input int handle Handle to the IOM int vmapid Identifier of the VMAP to refresh int flags For future extension of VMAP mode Return DQ_ILLEGAL HANDLE invalid IOM handle DO SUCCESS command processed successfully Description This function initiates a VMAP refresh by sending the output values to the IOM and returns immediately You need to call DgRtVmapRefreshInputs to complete the refresh and retrieve the input values from the IOM Note The pair DgRtVmapRefreshOutputs DqRtVmapRefreshInputs can be used instead of DqRtVmapRefresh This frees the task to do something useful while the VMAP refresh packets are transfer
265. at gt parameter sets the decimation rate Zero no decimation Setting a value of 1 discards one reading for every one kept three discards three readings for every one kept etc When the AI217_FIR_SET_DECIMATION_RATE flag bit is set in actions parameter The value in lt decrat gt is set The default value is automatically determined by the chosen sampling rate and should not need to be set by the user If the decimation value is changed it must be set to the same value in all 4 banks The decimation value is normally never set to a value less than 3 as explained below lt tapsize gt and lt data gt parameters are used to load user defined filter coefficients to the selected FIR filters When the DQ_A1217_FIR_COEFF_LOAD flag bit is set in the lt act ion gt parameter the lt tapsize gt and lt data gt values are set lt tapsize gt is the number of coefficients expected in the array of double precision coefficients pointed to by lt data gt In practice the ADC sampling and the FIR filtering always run at a rate that is between 60KHz and 120KHz A decimation value of 3 or more is always applied to make the output data rate be 30KHz or less When configuring the coefficients calculate their value based upon this higher rate The maximum number of coefficients is 128 The coefficients should be in the 1 0 1 0 range The sum of all the coefficients should equal 1 0 or very near to 1 0 depending on the value of the returned
266. ata DOFIFO pDQFIFO Note Maximum data size is 514 bytes ACB operations performed by DQE are based on exchanging DQCMD_WRF IFO packets Please see User Manual for internal working of DQE 2 2 34 DqCmdReadFIFO Syntax int DqCmdReadFIFO int Iom pDQFIFO pDQFifo Command DQCMD_RDFIFO 0x154 Read Device Data from the FIFO Input int Iom Handle to the IOM returned by DqOpenIOM pDOFIFO pDOFifo pointer to store input data Output pDOQFifo gt size number of bytes actually transferred 28 PowerDNA API Reference Manual Release 4 0 pDOFifo gt data data received Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function requests data from the FIFO on the layer The subsystem pDOFifo gt ss field can represent either a physical subsystem DQ_SSOIN for example or a virtual channel DQ_FIFO_GET_DATA 0x10 defines a channel for writing data to the layer DO_FIFO_GET_CAL 0x20 defines a channel for retrieving calibration data The following structure is used in the proce
267. ata array error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 208 CLSize is not between 1 and DOQ_MAXCLSIZE bData is NULL or a channel number in c1 is invalid unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up the following parameters DQ_L2_SET_CONFIG this option allows turning off fans only in case the controller is cooler than 45C and 24V DC DC powers isolated sides of most analog input and output layers Use constants DQ_L2_STS_FANOFF and DQ_L2_STS_DC240OFF to do that DQ_L2_SET_LED allows you to turn on turn off user defined LEDs DQ_L2_LED_USR DQ_L2_LED_IO DQ_L2_LED_ATT The rest of LEDs are controlled by the periodic routine which is executed once a second To shut automatic update off and get compete access to LEDs use DQ_L2_LED_STOP_UPDATE flag along with LED flags A write without this flag restores periodic status indication LED allocation define DQ_L2_LED_VI the limit off failed define DQ_L2_LED_II define DQ_L2_LED_1_5 define DQ L LED Ei define DQ L LED Up define DQ_L2_LED_IO define DQ _L2_LED_OVRT define DQ_L2_LED_ATT define DQ _L2_LED_24 DNR 1L lt lt 0 input voltage on if exists bli
268. ation DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function gets a message received by a 503 layer on a CAN network Note When the bus is in error state error_code contains one of the following values e DQ_CANS03_ERR_WARN warning bus errors were detected e DQ_CANS503_ERR_AE Arbitration error two nodes tried to send at the same time e DQ_CANS503_ERR_BE The number of bus errors is greater than 128 bus is now in error state e DQ_CANS503_ERR_OR Receive FIFO overflowed e DQ_CANS503_ERR_TO Timeout no message was received 4 22 3 DqAdv503SendMessage Syntax int DgAdv503SendMessage int hd int devn int chan uint32 id uint8 data uintl6 size int success uint8 error_code Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int chan channel number uint32 id id value of message Lower 11 or 29 bits are used depending on standard or extended packet uint8 data message data uintl6 size number of bytes in data parameter int success returns 0 if the CAN port or bus is in error state uint8 error_code returns the error code for this CAN bus Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CAN 503 DQ_BAD_ PARAMETER chan is an invalid chan
269. ation modes of operation Following constants are used in lt config gt 178 PowerDNA API Reference Manual Release 4 0 DQ_AI255 ENABLE EXC_A 1L lt lt 0 enable excitation channel A DQ_AI255_ENABLE_EXC_B 1L lt lt 1 ditto B DQ_AI255_ ENABLE _EXC_C 1L lt lt 2 ditto C DQ_AI255_ENABLE_EXC_D 1L lt lt 3 ditto D Notes 4 10 4 DgAav255GetWFMeasurements Syntax int DgAdv255GetWFMeasurements int hd int devn uint32 config PWFMEASURE_255 prms PWFPRM_255 chan_m Command IOCTL Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 channel Channel to use PpWFMEASURE 254 prms Measurement parameters Output DWEDRM 2234 chan_m Results of measurements for all channel Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DO _ BAD _DEVN device indicated by devn does not exist or is not an AI 255 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function measures parameters of the waveform pr
270. ation on the device specified and reprograms it according to the channel list supplied The user cannot perform this function call when the layer is involved in any streaming or data mapping operations If the user specifies a short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every call to the function returns the latest acquired data If one would like to cancel ongoing sampling call the same function with Oxffffffff asa channel number 4 6 2 DgqAdv217GetPgaStatus Syntax 140 int uint32 newdata PowerDNA API Reference Manual Release 4 0 Command DQE Input int hd int devn Output uint32 errchan uint32 newdata uint32 pgadata Return DO NO MEMORY DQ_TLLEGAL HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ _TOM_ERROR DQ_SUCCESS Other negative values Description DqAdv217GetPgaStatus int hd uint32 pgadata int devn uint32 errchan Handle to the IOM received from DqOpenI Layer inside the IOM OM Bit field that indicates which PGA channels have errors Bit field that indicates which PGA channels have new data since the last read by this function Array of 16 PGA status readings See below for description
271. atus of the DIO 432 433 layer lt portocs gt bits represent channels with the measured current above specified limit lt portucs gt bits represent channels with the measured current below the specified limit or negative current flowing in opposite direction Channel 0 is represented by bit 0 etc lt rdcnt gt returns the programmed value of how many consecutive over or under current measurements the layer should make before the electronic circuit breaker disables this channel lt disdiv gt returns the programmed value of the re enable divider Re enable divider is derived from 66MHz timebase and specifies number of 15 15ns clock cycles before trying to re enable channel lt dout gt returns actual value driven by DOut port taking disabled channels into consideration lt vccis gt reports whether external power was applied to the DIO 432 433 card lt adc_i gt is an array of raw 24 bit values from current measuring A D converters lt adc_v gt is an array of raw 24 bit values from voltage measuring A D converters Next structure returns actual calibrated currents and voltages on each channel typedef struct double current DQ_DI0O432_CHAN Current value of the measured current Amperes double voltage DQ_D1I0432_CHAN Current value of the measured voltage Volts DQDIO432CVID pDQDIO432CVTD Note 1 Use DqAdv40xWrite to write output values for DIO 432 433 layers Use channel 0 of DQ_SSOOUT to include writing to this
272. atus reception define BC1553_BCB_FLAGS1_RUD 1L lt lt 12 Retry on unexpected data reception define BC1553_BCB_FLAGS1_RWB 1L lt lt 11 Retry on wrong bus response define BC1553_BCB_FLAGS1_RIS 1L lt lt 10 Retry on illegal bits set in status define BC1553_BCB_FLAGS1_RBB 1L lt lt 9 Retry on busy bit in status define BC1553_BCB_FLAGS1_RTE 1L lt lt 8 Retry on bus timing error define BC1553_BCB_FLAGS1_RWC 1L lt lt 7 Retry on word count define BC1553_BCB_FLAGS1_RME 1L lt lt 6 Retry on message error bit in status define BC1553_BCB_FLAGS1_RNR 1L lt lt 5 Retry on no response define BC1553_BCB_FLAGS1_ERE 1L lt lt 4 Enable re transmit on alternative bus each retry define BC1553_BCB_FLAGS1_ESR 1L lt lt 3 Enable periodic status request command when count reached maximum allowable limit define BC1553_BCB_FLAGS1_ERRC N N amp 7 Specify maximum number of retry attempts 292 PowerDNA API Reference Manual Release 4 0 4 25 21 Syntax int DAQLIB DgAdv553ReadBCCB int hd mn_block uint32 index DgAdv553ReadBCCB int devn int channel uint32 mn_frame uint32 size pBCCB_Status descriptor Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 mn_frame Minor frame number 0 15 uint32 mn_block Minor frame block number 0 or 1 or both to store data uint32 index Descriptor
273. be NULL if Mode is DQSETLOCK_CHECK uint32 IP pointer to receive the IP address of the locking host if Mode is DOSETLOCK_CHECK 46 PowerDNA API Reference Manual Release 4 0 Output uint32 IP the IP address of the locking host if Mode is DQSETLOCK_CHECK Return DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO DAT PARAMETER Mode is DOSETLOCK_CHECK and IP is NULL DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description Locks the IOM to the current host unlocks locked IOM or retrieves IP address of locking host For locking and unlocking the Password parameter must contain the IOM s user level password The following mode constants are defined define DQSETLOCK_LOCK 0 Lock IOM to host define DQSETLOCK_UNLOCK 1 Unlock IOM define DOQSETLOCK_CHECK 2 Get locking host IP Note None 47 PowerDNA API Reference Manual Release 4 0 3 High Level API The high level API is based on the use of DQEngine a programming environment that takes care of handling streams of data and that performs error correction The
274. ber of entries in message queue pDOBCB pBcb receives a newly allocated bcb structure 96 PowerDNA API Reference Manual Release 4 0 Output PDQBCB pBcb return pointer to allocated bcb structure Return DQ_NO_MEMORY memory allocation error DQ_BAD_PARAMETER NULL or 0 as a parameter queueSize is less than DQ MG MIN _QUEUE_SIZE or dir is neither DQ_MSG_DIRECTION_SENDING nor DQ_MSG_DIRECTION_RECEIVING DQ_TLLEGAL_HANDLE invalid non NULL value for iom DO DEVICE BUSY layer already taken DQ_SUCCESS successful completion Description Allocates a new M3 queue type BCB Note None 3 9 2 DqMmInitOps Syntax int DgMmInitOps pDQBCB pBcb int scan_rate_hz int scans_per_packet Command DQE Input pDQBCB pBcb pointer to a previously allocated M3 structure int scan_rate_hz rate at which to obtain scans int scans_per_packet number of scans to collect in one packet before sending Output None Return DQ_ILLEGAL_HANDLE illegal pBcb DQ_IOM_ERROR IOM reports command execution error DQ_SEND_ERROR cannot send packet DQ_TIMEOUT_ERROR IOM reply wasn t received within timeout period DQ_NO_MEMORY memory allocation error DQ_INIT_ERROR error processing PowerDNA cube parameters DQ_SUC
275. between 1 and DQ MAXCLSIZE ora channel number in c1 is incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function sets up one of six operating modes supported by AI 255 layer The Supported modes are DQ_AT255_MODE_SI_INT 0 Synchro input int exc DQ_AT255_MODE_RI_INT 1 Resolver input int exc DQ_AT255_MODE_SI_EXT 2 Synchro input ext exc readback Co F E Co F D 176 PowerDNA API Reference Manual Release 4 0 DQ_AI255_MODE_RI_EXT 3 Resolver input ext exc readback DQ_AT255_MODE_SS_INT 4 Synchro drive simulation int exc fully sourced DQ _AI255_MODE_RS_INT 5 Resolver drive simulation int exc fully sourced DQ_AT255_MODE_SS_EXT 6 Synchro drive simulation ext exc readback DQ _AI255_MODE_RS_EXT 7 Resolver drive simulation ext exc readback Notes See wiring description for the proper wiring in various modes 4 10 2 DqgAdv255SetExt Syntax int DAQLIB DgAdv255SetExt int hd int devn uint32 channel uint32 mode uint32 flags pDO255SetExt params
276. ble to send the Command to IOM 368 PowerDNA API Reference Manual Release 4 0 DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function feeds Trigger Output from the layer to Sync2 line Note When using a CT 601 layer the clock output of Counter timerl may be routed to any sync line with this function To route the output of Counter timer0 use the DgAdvRouteClockOut function Like all commands in this series call DgCmdSetSyncRt after calling this function to make connection 4 32 12 DqCmdSetSyncRt Syntax int DgqCmdSetSyncRt int hd pSYNCPLL pSyncPll pSYNCRT pSyncRt Input int hd Handle to IOM received from DqOpenIOM PSYNCPLL pSyncP11 Pointer to the Pll interface specification If this parameter is NULL the function will use the default specification produced by the DgAdvRoutePII function PSYNCRT pSyncRt Pointer to the synchronization interface specification If this parameter is NULL the function will use the default specification automatically setup by the DqgAdvRoute series of functions Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_PARAMETER pSyncP1lo
277. bytes Command Setting minimum size is possibly not useful Limit maximum size for faster response PowerDNA API Reference Manual Release 4 0 DAQLib Input char filename file name of S19 S Record file int relative TRUE to honor addresses read from the file FALSE to read data sequentially and ignore addresses uint32 size size of user buffer char buffer pointer to user buffer uint32 bytes pointer to receive number of bytes written to buffer Output char buffer raw data from S19 S Record file uint32 bytes number of bytes written to buffer Returns DO DAD PARAMETER if any parameter is NULL DQ_SUCCESS successful completion Description Reads S Record S19 file and converts it to binary data If relative is TRUE This function considers the first address it encounters as the beginning of the buffer and all other addresses relative to the beginning of the buffer Any addresses outside the range the buffer can hold will be silently dropped If relative is FALSE This function will read all data sequentially into the buffer despite the addresses indicated in the S Records Note None 2 2 12 DgqGetLastStatus Syntax int DgqGetLastStatus int iom uint32 data uint32 size Input int iom Handle to the IOM uint32 data buffer to copy status data into uint32 size size of buffer
278. bytes sent to the device Int avl_size Number of bytes that the output FIFO can accept Return DQ_TLLEGAL_ HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Returns how many bytes were copied from the output packet and how much more room is available in the output FIFO 3 5 7 DqgRtVmapRqInputDataSz Syntax int DgRtVmapRqInput uint32 rq_size int act_size uint8 indataptr Input int handle Handle to the IOM int vmapid Identifier of the VMAP to read from int trl_index Index of the VMAP entry int rq_size Number of bytes to read from the device Output int act_size Maximum number of bytes that can possibly be transferred might be smaller than the requested number uint8 indataptr Pointer to the buffer where the received data will be accessible once the refresh is complete Return DQ_TLLEGAL_ HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Requests the maximum number of bytes to read from the device 80 tDataSz int handle int vmapid int trl_index PowerDNA API Reference Manual Release 4 0 3 5 8 DgRt
279. channel list 213 PowerDNA API Reference Manual Release 4 0 Upon startup the firmware programs low and high levels from the values stored in E PROM separately for each 24 bit port These default values are 5 6V for low and 11 25V for high level The hysteresis is programmed to change the detected logic level from low to high when the input signal is above low and high limits The logic level changes back to low when the input level is below low level If the signal is below high level but above low level the detector keeps the previous logic level This feature increases immunity of the layer to digital noise in the input lines Note 4 18 5 DqAdv448SetDebouncer Syntax int DqAdv448SetDebouncer int hd int devn uint32 clsize uint32 cl uint32 debouncer Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM uint32 clsize Channel list size uint32 cl Channel list channels 0 0x2f are valid uint32 debouncer 16 bit debouncer value in 100us intervals Output Return DQ_TLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 448 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command
280. cifies a short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every call to the function returns the latest acquired data If one would like to cancel ongoing sampling call the same function with OxffffffFff asa channel number 4 5 2 DqAdv211SetCfgChannel Syntax d int Dohdnve llGercCfochannel nt hd int devn pDQCFGCH_211 cdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM pDOCFGCH_211 cdata Pointer to 211 channel config structure see below Output 131 PowerDNA API Reference Manual Release 4 0 None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 211 DQ DAD PARAMETER Illegal value in DQCFGCH_211 structure DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function sets up the channel configuration pa
281. ckIn int hd int devn int line Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int line all DQ_EXT_SYNC1 layers DQ_EXT_SYNC3 DQ_EXT_INTO 0 to release int line DQ_EXT_SYNCx counter timer 0 to release Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_PARAMETER line has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function selects the clock source for the layer Note Clock comes from Ext line on the layer ClockIn Our intent is if this line is not available and trigger does not use Eat line to use Ev line Clock can be fed to the counter timer inputs Counter timer 0 can received clock from SYNCO etc 4 32 2 DqAdvRouteClockOut Syntax int DgAdvRouteClockOut int hd int devn int line Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int line all DQ_EXT_SYNC1 layers DQ_EXT_SYNC3 O to release 362 int line counter timer Output None Return DQ_BAD_D DQ_BAD_ PA DQ_SEND DQ_TIMEO DO TOM DQ_SUCCE PowerDNA API Refer
282. cket also contains a flag field as well as the number of bytes actually written actually received and optionally the number of bytes available in the receive FIFO and the room available in the transmit FIFO This feature allows flexibility in allocating packet slices for different channels Each time packets are exchanged between host and IOM the user application can select different sizes for outgoing and incoming data taking into consideration the amount of data required to be sent and the size of data accumulated in the receiving FIFO If you don t use a channel at this time then set size to send and size to receive to zero The header has a fixed width set up before starting VMap operation and the user cannot change the header size on the fly even if the channel is no longer in use Here is a quick tutorial on using the RTVMAP API handling of error codes is omitted Initialize the VMAP to refresh at 1000 Hz DqRtVmapInit handle amp vmapid 1000 0 Configure device input output ports using the appropriate DqgAdv function For example the following configures an ARINC 429 device DEVN input and output ports 0 to run at 100kbps with no parity and no SDI filtering DgAdv566SetMode handle DEVN DQ_SSOOUT 0 DQ_AR_RATEHIGH DQ_PARITY_OFF DqAdv566SetMode handle DEVN DQ_SSOIN 0 DQ_AR_RATEHIGH DQ_PARITY_OFF DQ_AR_SDI_DISABLED Add input port 0 to VMAP set flag to retrieve the status of the input FIFO afte
283. communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description 298 PowerDNA API Reference Manual Release 4 0 This function writes data to Tx FIFO A write to the FIFO translates to a write to the 1553 bus Tx FIFO provides access to the low priority FIFO of the 1553 encoders a write to this FIFO actually translates to TX activity on the enabled 1553 buses A or B but not both This feature allows use of the RT BM as a simple bus controller BC In such a case the TX data should be placed directly into the TX FIFO Note that a programmable data gap between the transfers allows strict hardware timing The software should be responsible for the receiving all data from the 1553 decoder and should follow the 1553 data exchange protocol The results of the command can be monitored by enabling BM mode The data format used in TX RX FIFO operations is as follows PAR WT DLY 0 Delay Data 31 30 29 27 16 15 0 DLY means that the register contains a
284. conversion Every bit in Mask represents a layer in the device stack where bit 0 corresponds with device 0 etc For example to issue a software start trigger for layer 1 Mask 1L lt lt 1 Note None 2 2 28 DqCmdSetChannelList Syntax int DgCmdSetChannelList int Iom pDQSETCL pDQSetCl uint32 entries Command DQCMD_SETCL 0x13C 293 2 PowerDNA API Reference Manual Release 4 0 Input int Iom Handle to the IOM returned by DqOpenIOM pDQSETCL pDQSetCl array of channel list entries uint32 entries number of entries Output uint32 entries number of entries actually processed Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Timeout duration DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description Sets up the device channel list This function parses the presented channel list and fills the input and output channel lists Note Channel list entries are stored in the DOSETCL structures typedef struct uint8 dev device number uint8 ss subsystem uint32 entry channel list entry DQSETCL pDQSETCL The channel list has following format 31 16 15 12 11 0 lt flags gt lt gain mode gt lt ch number g
285. ction sets the data averaging factor for any channel The averaging factor may be set to any value from 0 to 20 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 20 1024576 Please note that the rate at which the data changes decreases as the averaging goes up With an average factor of 20 the data will change only once every two seconds approx Averaged data may be read by performing a DqgAdv224Read using channel numbers 4 thru 7 instead of the usual 0 thru 3 lt channel gt parameter indicates which channels will get their averaging factor changed The following flags are defined defi defi defi defi defi ne ne ne ne ne A1I224_SEL_CHAN_0 0x01 AI224_SEL_CHAN_1 0x02 AI224_SEL_CHAN_2 0x04 AI224_SEL_CHAN_3 0x08 AI224_SEL_CHAN_ALL 0x0f More than one channel may be specified by oring multiple channel flags together 148 PowerDNA API Reference Manual Release 4 0 Note 4 7 3 DgAdv224SetBridgeCompletion Syntax int DgAdv224Set BridgeCompletion int hd int devn uint32 channel double ref_level Command DQE Input int hd int devn uint32 channel double ref_level Output none Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ BAD DEN DO BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DgOpenI
286. ction sets up a timebase for writing output packets to the Tx FIFO Note None 4 24 10 DqAdv566SetChannelCig Syntax int DqAdv566SetChannelCfg int hd int devn int ss int chan uint32 actions Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem int chan Channel int actions What to select DQ AR_ENABLE_Tx enable transmit operations Tx DO AR_ENABLE_Rx nable receive operations Rx DQ_AR_ENABLE_SCHEDULER nable scheduler Tx DQ _AR_ENABLE_ LOOPBACK loopback validation of transmitted packets is enabled Tx DO Ap ENABLE FILTER nable receive operations Rx DO _AR_ENABLE RxFIFO nable receive FIFO Rx DO Ap ENARBLE TxFIFO enable transmit FIFO Tx 253 PowerDNA API Reference Manual Release 4 0 Output None Return DQ_NO_MEMORY DQ_ILLEGAL HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values DQ_AR_LOGIC_LOOPBACK for internal logic tests internal to HI 3282 error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration
287. d define BC1553_BCB_ERRSTSO_S1F 1L lt lt 3 Error Status 1 compare failed define BC1553_BCB_ERRSTSO_DCF 1L lt lt 2 Error Data compare failed define BC1553_BCB_ERRSTSO_TFW 1L lt lt 1 Error Too few words received also will set TEW bit in PORT_STS define BC1553_BCB_ERRSTSO_TMW 1L lt lt 0 Error Too many words received also will set TMW bit in PORT STS a 4 25 22 DqAdv553ReadBCStatus Syntax int DAQLIB DgAdv553ReadBCStatus int hd int devn int channel int List size uint32 list uint32 status Input int hd Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 list Status request list int list_size Status request list size Output uint32 status Array to store status information of list_size size Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ_BAD_PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command 294 PowerDNA API Reference
288. d from Number of messages to write Array of messages to write Number of messages written to the channel FIFO Number of entries still available in the FIFO How many messages try to read Array to store read messages Number of messages read Number of messages remains in the FIFO error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function writes and receives packets from the specified channel FIFO Note 258 PowerDNA API Reference Manual Release 4 0 The function returns after da ta is received on the interface If a timestamp was enabled for that channel the function returns two uint32s per packet one for the packet and one for the timestamp 4 24 17 DqAdv566ReadWriteAll Syntax int DgAdv566ReadWriteAll int hd int devn uint32 tx_ch uint32 Ca Ch uint32 tx_chan_a uint32 tx_wrt uint32 rr uint32 tx_data_arr uint32 tx_size tx_avl uint32 rx chan art uint32 rx_data_arr uint32 rx_size uint32 rx_read uint32 rx_rmns Command DQCMD_WRRDFIFO Input int hd int devn uint32 tx_ch uint32 rs ch uint32 tx_chan_arr uint32 Las data arr uint32 tx_size uint32 tx_wrt uint32 t
289. d incompatibility in structures defined in library and firmware A special mode is used to store or retrieve named parameters Named parameters cannot be stored in EEPROM but instead can be used to affect operations of the PowerDNA cube To set up or retrieve named parameters pass IoMODE_NAMEDPRM as mode and one of the following named parameters as uint32 field in the value buffer define DQ _IOPRM_NBUFS 0x100 number of buffers for streaming define DO IOPRM_CLPERINT 0x200 number of channel lists per interrupt define DQ_IOPRM_ADDLDELAY 0x400 additional delay control define DQ_IOPRM_RQID 0x1000 Request id for streaming RDFIFO Note Named parameters are layer dependent Not all of them are implemented 2 2 42 DqCmdGetParameters Syntax int DgqCmdGetParameters int Tom PpDQGETPRM pDQGetParm uint8 data Command DOCMD_GETPRM 0x171 Get Power up Values Input 35 PowerDNA API Reference Manual Release 4 0 int Iom Handle to the IOM returned by DqOpenIOM pDOQGETPRM specified parameters pDQGetParm uint8 data pointer to uninitialized data Output uint8 data retrieved data Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_TOM_ERR
290. d number of samples is acquired Each device can specify a pre and post trigger number to acquire Devices must be configured with the DQ_LN_BURST flag in their config word before calling this function pDQBURST has the following structure typedef struct uint8 dev device uint8 ss sub system uint32 pre A time uint32 post pre time uint32 trigger trigger flags DQBURST pDQBURST Upon completion of the configured acquisition interval s normal ACB operation mechanisms are used to transfer the data from the IOM to the host application It is necessary for the host application to wait for both the DQ_eBufferDone and DQ_eFrameDone flags The DQ_eBufferDone flag will be raised when the layer has completed transfer of the last buffer from the ACB buffer Note None 3 3 Direct Data Mapping DMap Functions These are functions specific to DMap mechanisms 62 PowerDNA API Reference Manual Release 4 0 3 3 1 DqDmapCreate Syntax int DqDmapCreate pDQE pDge int iom pDQBCB pBch int period char dmapin char dmapout Command DQE Input pDOQE pDge pointer to the previously created instance of DQE int iom IOM Descriptor pDQBCB pBcb pointer to receive allocated DMap structure int period base DQE periodic clock divider defines update rate as DQEngine rate divided by lt period gt
291. d to call DgRtDmapRefreshOutputs first to initiate the refresh and send the output values to the IOM Note The pair DgRtDmapRefreshOutputs DqRtDmapRefreshInputs can be used instead of DqRtDmapRefresh This frees the task to do something useful while the DMAP refresh packets are transferred in the background 3 4 18 DqRtDmapClose Syntax int DqRtDmapClose int handle int dmapid Input int handle Handle to the IOM int dmapid Identifier of the DMAP to close Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_SUCCESS command processed successfully Description This function frees all resources allocated by the DMAP operation on the specified IOM 3 5 Real time Variable size Data Mapping VMap Functions VMap is a protocol developed for control applications in which the ability to get immediate realtime data is equally important as receiving a continuous flow of the data With messaging devices serial CAN ARINC 429 interfaces the data is a stream of bytes logically divided into frames messages strings etc There are two distinct features of messaging devices that make use of the DMap protocol inefficient if not impossible 1 The data is a stream and losing part of the data may change the meaning of the message 2 Unlike digital or analog data the timing of data availability depends on the external stream of messages and one cannot make a 75 PowerDNA API R
292. de command pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above For each flagged RT data i 0 Command and status 31 16 command data i 1 SYNC transmitter shutdown override word EV553_BCST TX broadcast comman d transmitted In lt None gt Out PpDOEVENT gt event EV553_BCST_TX pEV553_ID gt evtype 1 in the bitfield that corresponds to each RT that have transmitted message pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description 312 PowerDNA API Reference Manual Release 4 0 above For each flagged RT data i 0 Command and status 31 16 command EV553_BCST_RX broadcast comman dis received In lt None gt Out PpDQEVENT gt event EV553_BCST_TX pEV553_ID gt evtype 1 in the bitfield that corresponds to each RT that have transmitted message pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above For each flagged RT data i 0 Command and status 31 16 command Bus controller events EV553_BC_ ERROR bus controller error In lt None gt Out PpDQEVENT gt event EV553_BC_ERRO
293. delay in lus intervals When this bit is equal to 1 a 29 bit lus resolution delay counter is used When this bit is equal to 0 a 12 bit 15 15ns delay counter is used A 15ns delay counter is started after data is sent over the bus a lus delay counter starts immediately after adelay word is proceseds in the FIFO PAR parity 0 or 1 WT word type 1 is command status and 0 is data Delay 11 bit delay counter in 15 15ns resolution decrements before data is transferred on the bus bus is kept in idle state during this delay Data data to send on the bus Following format applies Command Word Terminal Address T R Sub address Mode Word Mode Count 15 11 10 9 5 4 0 Data Word 16 bit data 15 0 Status Word Terminal Address ME INS SRQ reserved BC BUSY SS DBA TERM 15 11 10 9 8 H 6 5 4 3 2 1 0 ME Message Error INS Instrumentation bit SRQ Service Request bit BC Broadcast Command 299 PowerDNA API Reference Manual Release 4 0 BUSY Terminal is busy SS Subsystem flag DBA Dynamic Bus Acceptance flag TERM Terminal Flag 4 25 26 DqAdv553Enable Syntax int DAQLIB DgAdv553Enable int hd int devn uint32 actions
294. des double Se_level Expected excitation level RMS to use for Sa Se division in 4 wire modes For simulation mode this is an initial excitation level in Volts 2 22V 158 PowerDNA API Reference Manual Release 4 0 Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 254 DQ_BAD_ PARAMETER CLSize isnot between 1 and DQ MAXCLSIZE ora channel number in c1 is incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up one of six operating modes supported by an AI 254 layer The AI 254 layer has two hardware registers that are required to scale the output of calculations of S Sp Sa Sp for 5 6 wire configuration or S a b Se for 4 wire configuration The result of this division is scaled from 0x0 to Oxffffff 24 bit representation into 1 0 to 1 0 by the DqCmd254Read function lt usr_offset gt defines the fine tuning offset This offset is set in the range of 1 0 all Sb no Sa to 1 0 opposite side of LVDT and can be used to adjust t
295. devn Layer inside the IOM int src Voltage source selector internal JIO or JIO w autoswitch int vsel Select the voltage options or turn power off Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a PC 91x DQ_BAD_PARAMETER Src or vsel are not one of the specified constants DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function sets the operating state of the PC91x Use one of the following defined constants for src DQ_91X_INTERNAL_ POWER use internal power from DNx system DQ_91X_EXT_JIO_POWER use power from DB 37 JIO connector DQ_91X_EXT_JIO_AUTOSWITCH A use power from DB 37 JIO connector but switch to internal power when JIO voltage is too low approx 9V Use one of the following defined constants for vsel Use the constants that apply to your particular PC 91x model 354 PowerDNA API Reference Manual Release 4 0 For PC 911 DQ_91X_POWER_OFF DQ_911_P5_N5_12W DQ_911_P10_N10_24W DQ_911_P15_N15_36W DQ_911_P15_N5_24W DQ_911_P5_N15_24W For PC 912 DQ_91X_POWER_OFF DQ_912_P12_20W DQ_912_ P24 40W For PC 913 DQ_91X_POWER_OFF DQ_913_P15_N15_12W DQ_913
296. dicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description DNx 1553 553 layer minor frames are divided into two blocks for double buffered operations This function allows you to select which block should be set as an active i e used by the Bus Controller for input and output lt block_mask gt contains a bitmask on per minor frame types to select which block to use please note that in DgAdv553 WriteBCCB a user can select which block to write data to or both 296 PowerDNA API Reference Manual Release 4 0 lt status gt returns a bitmask that defines which minor blocks were already executed from major frame descriptors Bits 0 thru 15 represent pending buffer selector value last value written to BCSWP register Bits 16 through 31 represent current buffer selector value If not equal to PBS the swap cycle is still pending and will be executed at the next major frame clock 4 25 24 DqAdv553BCDebug Syntax int DAQLIB DgAdv553BCDebug int hd major_idx int minor_idx bc_status int devn int current_major_d int channel uint32 todo int current_minor_d u int int32
297. ding and receiving one packet of 1518 bytes each This allows you to transmit and receive 58 messages per packet for six channels maximum This is not a significant limitation ARINC 429 interface allows you to send 2777 messages a second Thus the function should be called 2777 60 46 times a second or every 22ms For realtime operation one should use VMap mode 4 24 18 DqAdv566GetStatus Syntax int DgAdv566GetStatus int hd int devn int ss int chan uint32 request uint32 errors uint32 count Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem int chnl Channel int request What status to return flags can be or ed DQ_AR_STATUS_CLEAR_ERROR clear sticky error flags all channels together AR566_EISR DQ_AR_STATUS_CLEAR_COUNT clear Rx packet counter 260 PowerDNA API Reference Manual Release 4 0 uint32 errors uint32 count Output None Return NO Q Q Q BAI MEMORY LLEGAL_ D_DEVN HANDLE Q_SEND_ERR OR Q TIMEOUT ERROR Oo OM_ERRO Eu ea ET ta a DQ_SUCCESS R Other negative values for the channel 1 DQ_AR_STATUS_GET_TOTAL get total number of packets received for the channel 12 DQ_AR_STATUS_GET_FRM_CTR get frame counter for Rx
298. dv217SetCjcAvg int hd int devn int factor handle to the IOM received from DqOpenIOM layer inside the IOM 141 PowerDNA API Reference Manual Release 4 0 int factor Value to select the number of averaged CJC readings Output none Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 217 DQ BAD PARAMETER Factor is not in the range of 1 0x14 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function can be used to override or restore the default averaging factor used by the CJC channel Factor value setting of CJC readings averaged 1 Use default factor value 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 9 512 Oxa 1024 Oxb 2048 Oxc 4096 Oxd 8192 Oxe 16384 Oxf 32768 0x10 65536 0x11 131072 0x12 262144 0x13 524288 0x14 1048576 The AI 217 s default factor value is automatically set when the factor value setting is 1 The factor value varies depending on the samp
299. e Return DO NO MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established 171 PowerDNA API Reference Manual Release 4 0 DQ_BAD_DEVN DO BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description device indicated by devn does not exist or is not an AI 254 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up a custom waveform for excitation channels P1 and or P2 It may be useful in certain circumstances such as when a standard sinewave needs to be replaced with a custom waveform In such a case the function DgAdv254SetWForm should be used instead of DqAdv254SetExcitation Notes 4 9 14 Syntax int DqAdv254ReadDIn int hd Command DQE Input int hd int devn Output EN e din Return NO MEMORY REGAL HANDLE ERROR Q_SUCCESS Other negative values Description DgAdv254ReaaDIn int devn uint32 din Handle to the IOM received from DgOpenIOM Layer inside the IOM Digital input value error allocating buffe
300. e AI 255 channel number to the constant defined above to form a full channel number Zero crossing results are returned as two uint16 values packed into one uint32 field where ZCO occupies the lower part of the word and ZC1 occupies the upper one DQ_AI255_LAST_x returns the last immediate value converted by A D converters for channels A thru C respectively DQ_AI255_LAST_Sx returns the last immediate value from the integrator accumulated over the last period of the input sinewave Notes Use the same channel identifications to specify channels for DMap operation 4 10 9 DgAdv255Write Syntax int DqAdv255Write int hd int devn int CLSize uint32 cl double amplitude double fdata Command 184 PowerDNA API Reference Manual Release 4 0 DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM double amplitude Voltage of the simulated stator signals relatively to rotor excitation 0 80Vpp int CLSize Channel list uint32 cl Channel of interest double fdata Output position in radians from 0 to 2 Pi Rad 0 6 2830 Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ_BAD_PARAMETER configuration parameters are incorrect DQ_SEND_ER
301. e IOM when performing this command successful completion low level IOM error 262 PowerDNA API Reference Manual Release 4 0 Description This function sets up the channel list for ARINC 566 operations in messaging mode Notes This function sets up a channel list separately for transmitters and receivers The channel list can have a timestamp flag to handle ARINC packets with the timestamp information Rx only Use this function before calling DqgMsgInitOps 4 25 DNA 1553 553 layer The DNA 1553 553 layer is designed to support MIL STD 1553A and MIL STD 1553B interfaces Two dual redundant independent channels are available The layer can support up to 32 remote terminals RTs one Bus Monitor BM and one Bus Controller BC The layer has two independent channels and each channel incorporates all that is needed to communicate with a dual redundant 1553 bus Bus coupling transformer direct is software selectable As shown on the picture each channel has dual 1553 decoders that are capable of decoding independent streams of 1553 Manchester words and passing them to upper level subsystems Decoders can detect various timing errors on the bus and also keep track of the gap interval between messages as well as data parity errors and type of received data words command status or data When data is stored into the 1024 32 bit word FIFO BM mode it is stored from both A and B bases and each control status word may be optionall
302. e PS to AGND DQL_IOCTL208_READ_5k measure 5k resistance DQL_IOCTL208_READ_PSM measure S thru the PS line Because the resistance can differ from channel to channel because current is flowing through different channels of the same multiplexer which can have different resistances one should set up the channel number to be used This function returns the number of samples requested to perform averaging Data is returned in raw format 4 4 DNA AI 208 layer 4 4 1 DgAdv208Read Syntax int DgAdv208Read int hd int devn int CLSize uint32 cl uint32 bData double fData Command DQE Input int int int uint uint hd devn CLSize 32 SG 32 bData double fData Output U1lLNT uint doub Return BDZ Cal 32 bData le fData DQ_NO_MEMORY DO LLEGAL_ HANDLE DQ_B AD_DEVN DQ_B DQ_S AD_PARAMETER END_ERROR DQ_T IMEOUT_ERROR DO OM_ERROR DQ_S Other Description UCCESS negative values Handle to the IOM received from DgOpenIOM Layer inside the IOM number of channels pointer to channel list ptr to raw data received from device pointer to store converted voltage data NULL if not required channel list received binary data received voltage data error allocating buffer illegal IOM Descriptor or communication
303. e connection All readings are performed relative to AGND The user has to use the read back excitation voltage from the terminal because of DACs there is a voltage drop in the strain gage leads and DAQ output quantization error amounts to 1 1024 of the range Note This function must be called before starting acquisition or reading channels to set up a proper excitation voltage source 4 4 4 DgAdv208ReadChannel Syntax int DgAdv208ReadChannel int hd int devn uint32 measurement uint32 clentry int samples uint32 data double volts Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 measurement what to measure uint32 clentry channel and gain settings int samples number of samples requested must be between 1 and 120 uint32 data pointer to buffer for retrieved binary data 18 bit double volts pointer to buffer for value in volts can be NULL Output int samples number of samples retrieved uint32 data pointer to retrieved binary data 18 bit double volts pointer to value in volts Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 208 DQ_BAD_PARAMETER measurement is not one of the valid DQL_IOCTL208_READ constants
304. e data word is expected and T R_N bit set to 0 5553_MEMVAL_MD_TX_EN 1L lt lt 25 Enable corresponding mode command with T R_N bit set to 1 553_MEMVAL_MD_RX_EN 1L lt lt 24 Enable corresponding mode command with T R_N bit set to 0 553_MEMVAL_TX_IRQ_EN 1L lt lt 23 Enable TX IRQ on the selected sub address 5553 _MEMVAL_RX_IRQ_EN 1L lt lt 22 Enable RX IRQ on the selected sub address 15553 _MEMVAL_TX_EN 1L lt lt 21 Enable TX on the selected sub address 5553 _MEMVAL BS EN 1L lt lt 20 Enable RX on the selected sub address 5553_MEMVAL_TX_WCMAX_MSB 1L lt lt 19 Maximum word count for the TX 553 _MEMVAL_ TX _WCMAX_LSB 1L lt lt 15 0 32 1 31 i si 5553_MEMVAL_TX_WCMIN_MSB 1L lt lt 14 Minimum word count for the TX 553 _MEMVAL TX _WCMIN_LSB 1L lt lt 10 0 32 1 31 1 31 553_MEMVAL_RX_WCMAX_MSB 1L lt lt 9 Maximum word count for the RX 553 MEMVAL RX _WCMAX_LSB 1L lt lt 5 0 32 1 31 1 31 553_MEMVAL_RX_WCMIN_MSB 1L lt lt 4 Minimum word count for the RX 553_MEMVAL_RX_WCMIN_LSB ff O 32 1 31 1 31 U U EE U US ECK ET E EH GE SC Et Er EE We ST lizo If a request to receive or to transmit data cannot be validated against conditions stored in the validation list an error and a status condition will be set and the command will be rejected 4 25 9 DqAd
305. e desired event s triggered DO SUCCESS successful completion 104 PowerDNA API Reference Manual Release 4 0 Description This function waits for either an event to happen or for a timeout to occur Set WaitAl1 to TRUE to wait for all events included in ppBcb AND mode or set it to FALSE to return if any of events included in ppBcb occur OR mode ELY to never timeout Set timeout to time in ms or to DO_WAIT_INDEFIN pEvents is a pointer to a bit field in which to store event flags that have been triggered for the first BCB only If NULL event flags are not returned and DgeGetEvent must be called to retrieve the event flags In either case DgaeGetEvent must be called to retrieve the flags for BCBs other than the first one Note This function encapsulates an OS specific function to wait for an event to make the user application portable In Windows this function calls Wait ForMultipleEvents In Linux this function calls pthread_cond_timewait or pthread_cond_wait which restricts us to waiting for one event DMap produces only two types of events DO_eDat aAvailable when transfer is completed and DO_ePacket Lost when transfer has failed 3 11 Asynchronous Event Functions For the realtime operations with multiple cubes it is critical that cubes send packets to the host only in upon host request This limitation comes from th
306. e has a value other than the appropriate constants listed above unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function routes one of the selected signals S YNCX lines logic states or pushbutton to the clock output on the Sync connector Call DqCmdSetSyncRt after calling this function to make connection Note For DNR racks and 1GB cubes only DgAdvRouteSyncTrigin 4 32 8 Syntax int Input int hd int line Output None Return DQ_ILLEGAL HANDLE DO DAD PARAMETER DQ_SEND_ERROR DgqAdvRouteSyncTrigin int hd int line Handle to IOM received from DqOpenIOM Line to assign Use one of the following DQ_EXT_SYNCO DQ_EXT_SYNCI1 0 to release illegal IOM Descriptor or communication wasn t established line has a value other than the appropriate constants listed above unable to send the Command to IOM 366 PowerDNA API Reference Manual Release 4 0 DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_SUCCESS Other negative values Description nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function routes the trigger input line on the Sync connector to one of the SYNCX lines Call DqC
307. e need to avoid network collisions in case two or more cubes would try to send packets at the same time In the most cases this is not a real limitation If the host application needs to know the status of a layer it has to send a request In other words if something has happened on the layer while operating in realtime the host would not know about it until request for status information is sent This behavior might present a problem in the situations when there is no reason to query the cube frequently because of infrequent changes in the data however host needs to react quickly if some special event for example an error has happened on the cube To fusion these two conflicting requirements asynchronous mode was developed Asynchronous mode uses a separate communication channel to receive packets originated upon certain events on the cube The function set for these operations starts from DqRtAsync prefix These functions use the same IP address as all other functions to communicate with the cube but a different UDP port The default UDP port for these operations is 6344 and can be changed using cube configuration commands There are two major applications for asynchronous operations 1 Event notification receiving a certain message type for example 2 aDMap aVMap application when data packets are originated from the cube side upon the timer or a trigger event 105 PowerDNA API Reference Manual Release 4 0 To use async
308. ease 4 0 This function stores a copy of the message in the message queue thus the caller is responsible for freeing the memory of the passed in message 3 9 8 DgMmCount Syntax int DgqMmCount pDQBCB pBcb uint32 msg_avail uint32 space_avail Command DQE Input pDOBCB pBcb pointer to M3 queue uint32 msg_avail pointer to receive the number of messages in the message queue uint32 space_avail pointer to receive the number of messages that there is available space for in the message queue Output uint32 msg_avail returns the number of messages in the message queue uint32 space_avail returns the number of messages that there is available space for in the message queue Return DQ BAD PARAMETER if any parameter is NULL DQ_ITLLEGAL_HANDLE if pBcb does not reference a Msg queue DQ_SUCCESS successful completion Description The function tells how many messages are in a queue and how many messages can be added to the queue before it is full Note None 3 10 ACB and DMap Control and Event Functions These are control and event functions common to both ACB and DMap mechanisms 3 10 1 DqeEnable Syntax int DgeEnable uint32 enable pDQBCB ppBcb int BcbNum int broadcast Command DQE Input uint32 enable TRUE to enable FALSE to disable PDQBCB ppBcb pointer to an array o
309. ed define DQ_211_MAIN_FLOW_OFF 0 define DQ_211_MAIN_FLOW_ON 1 lt sec_enbs gt Provides control over the secondary A D converter used by the visual alarm LED function When the DQAT211_SECENBSSET flag bit is set in lt mask gt The value in lt sec_enbs gt is set The following defines are provided define DQ_211_SEC_ENB_OFE 0 SECondary converter OFF define DQ_211_SEC_ENB_LED 0x1 SEC converter updates LED comparison The converter must be turned on using the DQ_211_SEC_ENB_LED value in order for the visual alarm LED to function lt secn gt This value sets the number of main converter reads per secondary converter read When the DQAI211_SECNSET flag bit is set in lt mask gt The value in lt secn gt is set The following defines are provided define DQ_211_SEC_N_STD 100 Number of main reads per SECondary read define DQ_211_SEC_N_OFF 0 Disable secondary data flow The secondary converter s monitoring of the status of the iepe sensor connection for the setting of the visual alarm LED does not need to occur at the same rate as the primary A D converter This setting allows the user to set the rate at which the secondary converter does this monitoring The secondary data is also transferred across the isolation barrier at this same rate to be made available for some 134 PowerDNA API Reference Manual Release 4 0
310. eeler 12 DoGMGHWROSGE EE 13 DoGMOW ite EE 14 DoGmdRead TE 14 DqCmdWriteMultipleValues scsi c2c ti ctedesdeusersiaieels ice seceeeeetba aeenia ahadantieuenacaeed 15 DaGmdRead EI le ET 15 Pa mA EIO g EE 16 DoGmdRead Status prere a a au a aA 18 Re ue Ur EE 20 Beeler ein EE 21 DoGMOSSICIOCK EE 22 DoGMOSw Ke EE 23 DaGmodSetG E ET 23 Bee EE 25 DqaCmdWriteAll EE 25 GG CAC EE 26 DaGmaowWiriteReagA EE 27 Reg aler FIFO EE 28 DGG MOR CAGE EC E 28 Re ae UE EO 5 ices ois cecicticn acta aden chs cacti Sadan secession eactuetelaaestawdsebenys 29 DqCmdWriteToFlashBuffer E 30 DqCmdUpdateFlashBuffer E 31 Re ue EE 32 DaCmdSetNamMe EE 33 k Ss sak OD JO Om P ob 3 2 PowerDNA API Reference Manual Release 4 0 DOG MOGEUN ANG iencassci E 33 DOG tee 34 Re eeler 35 D GmdSav ParameterS degen ESA Sege 37 D CmdSetCalibrati oM ss EE 37 D GmdSetMode EE 38 DOGMOSSUR GB ly Max EE 40 DOG IMOS CUP ASSWOMG E 40 Ke tele EE EE 41 DG GIO lOGE ix a c5 rs EE 42 D CmdGetGapabiltie S sro chap ia suetieus udvsttecerestixienceseg 43 DG CPO IMO EE 44 DOG INOS SUING e EE EE 45 DGC IMOS CUA EE 46 eeler EAU E 48 Common ACB DMap and Msg functions ccccsseeeeee eee eeeeeeeeeeeeeeeeeseeeeeeeeneneees 48 DOACDISSUPPOMed EE 48 DqDmaplsSupported EE 48 Ree ET le 49 DqMsglsSupported ME 49 DgStartDQENGINE EE 50 DO StOPD GE ne Un EE 51 Dig Pare QE AGUA ceo cdc Soe ccc eege cea ech caves eeeeee Ee 51 Reie Gad Cal Ave eck aicaces ch cscecesls tec sit c
311. ef struct uint32 uint32 uint32 uint32 uint32 uint32 uint32 uint32 uint32 uint32 uint32 uint32 double double double DQACBCFG f lags mode and dirflags must be specified samplesz raw sample size bytes valuesz converted value size bytes scansz scan size samples values framesize number of scans in the frame max frames frames in the buffer ppevent packets per DQ_ePacketDone event mode mode of operations Single Cycle Recycled error handling dirflags transfer direction and additional flags maxpktsize how much data to accumulate in the packet before sending 0 default hwbufsize how much data to keep on the cube 0 default hostringsz number of packets in the host ring buffer 0 default wtrmark percent of the ring buffer queue packets kept in case IOM reports an error eucoeff engineering unit coefficient to multiply voltage data by euoffset engineering unit offset euconvert uint32 chan double value callback to convert from V to EU pDQACBCFG 57 PowerDNA API Reference Manual Release 4 0 Set up framesize in number of scans per frame dirflags is a combination of a direction constant with a data representation constant Possible options are Defines for data conversion function dirflags direction define DQ_ACB_DIRECTION_INPUT 0x0 dir in define DQ_ACB_DIRECTION_OUTPUT 0x1 dir out data conversion type d
312. eference Manual Release 4 0 prediction of when and how much data will become available and also whether or not there are some receiving transmitting errors on the bus Messaging layers are supported by the Msg protocol which shares the same buffering mechanism as the ACB protocol Inherently the Msg protocol buffers received packets and delays releasing newer packets to the user application until it re requests and receives all the packets in the message stream Although this protocol does provide a gapless stream of messages it is not suited for realtime operation VMap provides a realtime vehicle for messaging devices at the expense of restricting the ability to recover lost packets and shifting the decision whether or not to recover the lost packet to the user application At the high level VMap is very similar to DMap A user must create VMap with output and input buffers and add channels layers of interest to it VMap packets have additional fields First of all there is a flag field required to guarantee continuity of the messaging data Second an output buffer adds a pair of fields for each channel in the map at its header The first field provides the IOM with information on how much data is to be transmitted for that channel and the second field defines the maximum size of data to be received from that channel The offsets of the output data in the buffer should be in agreement with the size of the data in the buffer header An input pa
313. efine DQ_ACB_DATA_SINGL define DQ_ACB_DATA_DOUBL 0x100 data in the ACB is lt float gt 0x200 data in the ACB is lt double gt Ee define DQ_ACB_DATA_RAW 0x300 data in the ACB is Raw define DQ_ACB_DATA_EUNITS 0x400 double in engineering units define DQ_ACB_DATA_ENHANCED 0x800 enhanced resolution 18 bit in 32 bit format if converter has 18 bit native resolution data processing type define DQ_ACB_DATA_TSCOPY 0x1000 copy timestamp into ACB is available define DQ ACB_NOCALIBRATION 0x2000 do not perform software calibration The user can mix direction flags with data conversion flags and data processing flags mode user can select one of three available operating modes ACB supports following modes define DQ_ACBMODE_SINGLE 1 stop after buffer is full empty define DQ_ACBMODE_CYCLE 2 wrap buffer around define DQ _ACBMODE_ RECYCLED 4 clear use unprocessed frames Single Mode treats an ACB buffer as linear Acquisition or output stops when all data is transferred from to the buffer Cycle Mode expresses a buffer as a ring Acquisition or output continues indefinitely However if the tail of the buffer reaches its head operation stops and a DO_eBufferError flag is returned This flag means that the buffer became full on input or empty on output Please note that the buffer system employs a ring buffer as well an ACB In case of an input stream the DQE will s
314. eived from DgOpenIOM int devn layer inside the IOM int chan device Channel Output uint8 data received message uint1l6 size length of message received int success TRUE if message was written uint8 errorcode if success FALSE returns 501 specific error code int avail TRUE if more messages are available 234 PowerDNA API Reference Manual Release 4 0 Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DO DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description For immediate mode usage only Gets a message received by a 501 layer Note Maximum message size is limited to 470 bytes in a 576 byte Ethernet frame and 1412 bytes in a 1518 byte frame 4 21 18 DqAdv501SendMessage Syntax int DgAdv501SendMessage int hd int devn int chan uint8 data uintl6 size uintl6 written int success uint8 errorcode Command DQE Input int hd handle
315. el IOM error Description This function sets the layer acquisition rate The AI 225 supports a fixed rate set from 5 to 3000Hz Possible values for TrigMode are given by these defines define DQ_LN_PTRIGEDGE1 1L lt lt 9 stop trigger edge MSB define DQ_LN_PTRIGEDGEO 1L lt lt 8 stop trigger edge 00 software 01 rising 02 falling define DQ_LN_STRIGEDGE1 1L lt lt 7 start trigger edge MSB define DQ_LN_STRIGEDGEO 1L lt lt 6 start trigger edge 155 PowerDNA API Reference Manual Release 4 0 00 software 01 rising 02 falling Note Affects DqAdv225Read function only 4 9 DNA AI 254 layer DNA AI 254 layer is an all digital LVDT RVDT input and simulator It has two A Ds and two D As per channel each capable of sampling at the rate up to 330kHz Once sampled all readings from secondary windings of an LVDT RVDT sensor are processed in the digital domain The same applies to simulation all processing occurs in the digital domain and the D As convert a digital representation of the simulated signal into an analog waveform at the last stage of the processing There are six modes of operation supported by this layer Three major modes are 1 Input with internal excitation AI 254 provides the required excitation voltage to an LVDT RVDT sensor and reads back the output of its secondary windings 2 Input with external excitation when t
316. elease illegal IOM Descriptor or communication wasn t established line has a value other than the appropriate constants listed above unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command 363 PowerDNA API Reference Manual Release 4 0 DQ_SUCCESS successful completion Other negative values low level IOM error Description This function programs and routes PLL clock output to one of the SYNCX lines If the optional DQ_EXT_IMMEDIATE flag is used the PLL will be programmed and immediately connected to the SYNCX line when the DqCmdSetSyncRt command is issued Note 4 32 4 DqAdvRouteSyncin Syntax int DgAdvRouteSyncIn int hd int line Input int hd Handle to IOM received from DqOpenIOM int line Line to assign Use one of the following DQ_EXT_SYNCO DQ_EXT_SYNCI1 0 to release Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_PARAMETER line has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function
317. ence Manual Release 4 0 DQ_TLLEGAL_ HANDLE EVN RAMETER ERRO UT ERRO ye SS ERROR Other negative values Description This function feeds Clock Output from the layer to Sync1 or Sync3 line DQ_EXT_SYNCx O to release illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist line has a value other than the appropriate constants listed above unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error When using a CT 601 layer the clock output of Counter timer0 may be routed to any sync line with this function To route the output of Counter timer1l use the DgAdvRouteTrigOut DqAdvRoutePIl Note function 4 32 3 Syntax int line Input int hd double frequency double f_actual int line Output None Return DQ_ILLEGAL HANDLE DO DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DqAdvRouteP11 int hd double frequency double f_actual int Handle to IOM received from DqOpenIOM Desired frequency Actual frequency Line to assign Use one of the following DQ_EXT_SYNCI1 DQ_EXT_SYNCI1 DQ_EXT_SYNCI1 DQ_EXT_IMMEDIATE DQ_EXT_SYNCI1 DQ_EXT_IMMEDIATE 0 to r
318. end the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function writes and receives packets from the specified channel FIFOs This function enables sending and receiving of data for the whole device in one packet Currently the function is limited to sending and receiving one packet of 1518 bytes each Note 4 22 DNA CAN 503 layer 237 4 22 1 Syntax int Input int int int Output PowerDNA API Reference Manual Release 4 0 hd devn enable None Return DO DO DO DQ_TIM DU DQ_SUCCESS LL BAD __ D EVN EGAL_HANDLE DqAdv503Enable int hd END ERRO EO o ER F RO OM_ ERROR Other negative values Description Starts Stops all configured channels on the CAN 503 DqAdv503RecvMessage int hd uint16 size Note None 4 22 2 Syntax int uint8 data avail Input int hd int devn Output int chan uint32 id uint8 data uintl6 size int success uint8 error_code Int avail Return DQ NO MEMORY DQ_ILLEGAL_HANDLE DQ BAD DEVN DQ DAD PARAMETER DQ_NOT_ENOUGH_ROOM DqAdv503Enable int devn int enable Handle to the IOM received from DqOpenIOM Layer inside the IOM TRU
319. er Syntax int DgAdv601StopCounter int hd int devn int counter Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 7 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 DQ_BAD_PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function stops the specified counter Note None 4 26 7 DqAdv601ClearCounter Syntax int DgAdv601ClearCounter int hd int devn int counter Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 7 Output None Return 320 PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 DQ_BAD_PARAMETER counter number is invalid DQ_SEND_ERROR unable to
320. er flag bits that select which parameters will be written The following flags are defined define AI211_ FIR_SET_DEFAULT define AI211_FIR_COEFF_LOAD set and enable the default filter pe load taps and coefficients define AI211_FIR_SET_DECIMATION_RATE 0x2 set decimation rate define AI211_FIR_ENABLE 0x1 enable fir filter define AI211_FIR_DISABLE disable fir filter define AI211_FIRFIRST_ENABLE 0x0 perform FIR before averaging define AI211_FIRFIRST_DISABLE 0x10 perform FIR after averaging The AI211_FIR_SET_DEFAULT flag bit is used to easily set all of the FIR configuration values to their default state Before setting up a custom configuration it is recommended to first set all channels to their default state by setting lt channel gt to AI211_SEL_CHAN_ALL setting lt mask gt to AI211_FIR_SET_DEFAULT and calling DqgAdv211SetFIR When the AI211_FIR_SET_DEFAULT flag is set all of the other lt mask gt parameter bits are ignored The A1211_FIR_ENABLE and AI211_FIR_DISABLE defines are used to enable or bypass the FIR filter when a custom FIR filter has been loaded When standard default settings are used the system will automatically load and enable the FIR filter No additional enabling is required The AI211_FIRFIRST_ENABLE and AI211_FIRFIRST_DISABLE defines are used to set the order in which the FIR filtering and the averaging takes place When standard default set
321. er for PWM output generation Note CRT specifies the PWM period and remains fixed while CRO is updated 4 26 19 DqAdv601CfgForT PPM Syntax int DgAdv601CfgForTPPM int hd int devn int counter int startmode int tbr int dbg int dbc int iie int gie int re int end_mode int ebe Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int counter Counter number 0 7 int startmode DQ_PL601_SM const Int tbr Interval divider for timebase register int dbg Input debouncing gate register value int dbc Input debouncing clock register value int iie TRUE to turn on pre inversion of the input pin int gie TRUE to turn on pre inversion of the gate pin int re TRUE to enable re load continuous operation int end_mode One of the DO EM NNN end mode constants int ACG Output parameter that receives the configuration value Output int cfg the configuration value Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 Sana PowerDNA API Reference Manual Release 4 0 DQ_BAD_ PARAMETER counter n
322. er inside the IOM int channel device channel int config channel configuration Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DQ DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Waits for TX FIFO to complete and then changes parameters for selected channel Note Tx FIFO output can take a long time if it is full The cube will not reply until the output is completed The worst case is almost 7s for 2048 characters at 300 baud 4 21 3 DqgAdv501ChangeChannelParity Syntax int DgAdv501ChangeChannelParity int hd int devn uint32 channel int config Command DQE Input int hd handle to the IOM received from DqOpenIOM int devn layer inside the IOM uint32 channel device channel int config parity setting Output None Return 222 DQ_SEND_E DQ TIMEOUT DQ_IOM_ERRO DQ_SUCCESS PowerDNA API Reference Manual Release 4 0 DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ DAD DEV DQ BAD PARAMETER ER T ERROR N Ot
323. error allocating buffer DQ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device number indicated by devn does not exist or is not an AO 302 AO 308 AO 332 or AO 333 DQ_BAD_ PARAMETER CLSize is not between 1 and DQ_MAXCLSIZE takeraw is TRUE and data is NULL or takeraw is FALSE and fdata is NULL or a channel number in c1 is too high DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function works using an underlying DgCmdIoct1 It uses aDQCMD_IOCTL command with a DOTOCTL_CVTCHNL function under the hood When this function is called for the first time the firmware stops any ongoing operation on the device Then the firmware parses the channel list and writes the passed values one by one accordingly It always uses a 10V output range 190 PowerDNA API Reference Manual Release 4 0 Thus the user cannot perform this function call when the layer is involved in any streaming or data mapping operations Every write to the channel take approximately 3 3us Thus the execution time for this function depends on the number of channels in the channel list
324. error occurred at the IOM when performing this command successful completion low level IOM error DqAdv566Enable int devn uint32 actions Handle to IOM received from DqOpenIOM Layer inside the IOM TRUE enable device operations FALSE disable device operations error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not 429 566 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error Description Set up operating mode for each channel Notes None 4 24 11 Syntax int DgqAdv566Enable int hd Command IOCTL Input int hd int devn int actions Output None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description This function enables and disables operations on the layer Notes 254 PowerDNA API Reference Manual Release 4 0 None 4 24 12 DqAdv566SendPacket Syntax int DgAdv566SendPacket int hd int devn int chan int priority uint32 data Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem int los Channel int priority DQ_AR_TxPRIORITY_HIGH h
325. es hd0 DEVN bc_port for j 0 j lt messages j for i 0 i lt pMsg gt size i printf Sx pMsg gt data i rx_size 303 pMsg amp messages PowerDNA API Reference Manual Release 4 0 printf n To finish up call DgAdv553Enable hd0 DEVN FALSE This call will disable all I O operations on the layer 4 25 31 Configuring DNx 1553 553 for Remote Terminal Mode 1 Set operation mode for the channel mode D DQ_L553_MODE_RT flags_0 DQ_L553_TRANSFORMER ret DqAdv553SetMode hd0 DEVN CHAN mode D flags_0 2 Configure remote terminal mode a fill channel list with information as to what remote terminals and what subadresses are included in operations for i FIRST_RT i lt LAST_RT i for j FIRST_SA j lt LAST_SA j rt_valid_list rt_rt_size 0 rt_rtsa_list rt_rt_size DQ_L553_RT_SA i j printf port d rt d sa d n rt_port i j rt_rt_sizett b select bus mode enable both buses to listen and to transmit A remote terminal will reply on the same bus the Bus Controller used to send a command busmode_rt DQ_L553_BM_LSTN_A allow listening on both channels DQ_L553_BM_LSTN_B A DQ_L553_BM_TX DQ_L553_BM_TX_B DQ_L553_STORE_TS DQ_L553_STORE_FLAGS c Either program a validation list or set it to NULL if you don t want to impose any limitations
326. es low level IOM error Description This function returns information about a layer s capabilities which is described with text data If the capabilities data cannot fit in one packet the moredata flag is set In this case the command should be sent repeatedly to get all of the data until moredata returns FALSE Subsequent packets retrieve additional pieces of information which can be concatenated to the original string using strcat A call with different or invalid layer number resets the packet counter and data will be retrieved from the beginning of the text Note None 4 Finite Input Response digital filter 43 PowerDNA API Reference Manual Release 4 0 2 2 51 DqCmdlnitiOM Syntax int DgqCmdInitIOM int Tom uint8 Layer uint32 ParamID uint32 Data Command DOCMD_INITIOM 0x194 Sets up initial parameters for IOM and layers Input int Iom uint8 layer uint32 Data Output uint32 Data Return uint32 ParamID DQ_ILLEGAL_ HANDLE DQ_SEND_ERRO DQ_TIMEOUT_ DQ_ITOM_ERROR DQ_ SUCCESS ERROR Other negative values Description Handle to the IOM returned by DqOpenIOM layer ID Parameter ID Pointer to parameter data Returns previous value for parameter illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred a
327. es not exist or is not an AI 254 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function is used to set up internal excitation frequency and amplitude in internal excitation modes of operation The following constants are used in lt config gt define DQ_AI254 _ ENABLE EXC_A 1L lt lt 0 enable excitation channel A define DQ_AI254_ ENABLE _EXC_B 1L lt lt 1 ditto B Notes 4 9 4 DgAdv254GetWFMeasurements Syntax int DgAdv254GetWFMeasurements int hd int devn uint32 channel PWFMEASURE_254 prms PWFPRM_254 chan a PWFPRM_254 chan bi 161 PowerDNA API Reference Manual Release 4 0 Command IOCTL Input int hd int devn uint32 channel PWFMEASURE_254 prms Output pWFPRM_254 chan a pWFPRM_254 chan bh Return DO MO MEMORY DQ_ILLEGAL_HANDLE DQ _BAD_DEVN DO DAD PARAMETER DQ_SEND_ERROR DQ _TIMEOUT_E DO IO ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DqOpenI Layer inside the IOM Channel to use Measurement parameters OM Results of measurements for channel
328. es passed in pDQSetCfg 16 PowerDNA API Reference Manual Release 4 0 Output uint32 Status Array of status values for the devices uint32 entries Returns number of entries actually processed Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function sets up configuration of the PowerDNA cube You must supply an array of DQOSETCEFG structures The following structure is used in DOCMD_SETCFG command to set up configuration of the layer Multiple structures in the packet are allowed The last device number must be or ed with LASTDEV 0x80 DQCMD_SETCFG typedef struct uint8 dev device uint8 ss subsystems uint32 cfg DQSETCEFG pDQSETCFG Configuration flags are divided into a standard part common for all layer types and a layer specific part Common flags are Standard part lower 16 bits of layer configuration word define DQ_LN_RAW32 1L lt lt 18 copy timestamp along with the data define DQ_LN_MAPPED 1L lt lt 15 For WRRD DQDMAP devices define DQ_LN_STREAM
329. es seers ainca candid achetntdony ds dota ceased cates anldsceas 52 Advanced Circular Buffer ACB FUNCTIONS eceeceeeeeeeeeeeeeeeeeeeeeeeeseeenees 53 Bet ee 53 DGACOD CS TROY susie sein enrera r eee Meath Sadan aeai e aeaa o pe DRaa Eia aT 53 Rettel ege EE 54 DOACOGEISCANS EE 58 DIO INC OSC EE 59 DGACDRUIS Cans COPY EG 60 DGACOP US CANS EE 61 Bet reegt 62 Direct Data Mapping DMap Functions cccseseeeeeeeeeseeeeeeeeeeeeeneeneeeeeeeeeeeeneees 62 Biel ene 63 DG Dra UO e EE 63 Reien le IR e E 64 DaDmapAddENY EE EE 64 D DmapAddMu ltipe Entes sssi orpine depenen aneia a ene ses aa A a 65 Real time Data Mapping Dmap Functions cccccesseeeneeeeeeeeeeeeneeeeeeeeeeeeeeees 66 Biet RTD pO Ee 67 DaRiDmapAddehannel prs erines eae eaaa aa EE a EA 68 Beta Bin rer Edel ET BEE 68 DaRiDmapGetlMpuiMapS Ze aier lt 2 sehe Gerda ssetocencvsttecorestv iencesepteseparstengnvueseine deaugvesabenetes 68 DaRiDmapGetOutputMaD EE 69 Da RiDmapGetOUlourM a S Ze uaser cher cesuesctun as tenoe dea ve tence segtesapavsupeganvenanerdesepPesabereces 69 DaRiDmapReadScaledData EE 70 DaRiDmapReadRaw Datel E 70 DaRiDinapRedd Raw Dates EE 71 PowerDNA API Reference Manual Release 4 0 3 4 10 DqRtDmapWriteScaledData WE 71 3 4 11 DqRtDmapWriteRawData16 EE 72 3 4 12 DqRtDmapWriteRawData32 EE 72 SAS DORID MAD SIAN EE 73 SAI DORUDM AD SOD oeer eseese egare aaeeea a Ea O a RA A E EEOSE 73 3 410 Tee eege ege 74 3 4 16 RE Rene EE
330. escription The function reads the current state of digital ports The DIO 448 layer has two digital ports each 24 bits wide packed into 32 bit words lt read_db gt selects between reading current data FALSE 0 and debounced value TRUE 1 Debouncer delay is programmed using DgAdv448SetDebouncer lt data gt array to store two uint32s representing the current state of digital inputs for ports 0 and 24 lines per port Note 4 18 2 DqAdv448ReadAdc Syntax int DqAdv448ReadAdc int hd int devn uint32 clsize uint32 cl uint32 rdata double vdata uint32 status Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM uint32 clsize Channel list size 211 PowerDNA API Reference Manual Release 4 0 LTPES sert Channel list Output uint32 rdata Raw data from A D converter double vdata Array to store measured voltage on the specified channels uint32 status Pointer to store status word from the layer DIO ISO lines NULL if not required reserved Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 448 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this comma
331. esented on the inputs A thru D of the lt channel gt The waveform parameter measurements are required for setting up proper excitation frequency in DqAdv255SetMode for modes with external excitation and simulation The function requires input that specifies the parameters of measurement typedef struct uint32 changain channel and gain uint32 zero zero level default 0x8000 uint32 clock A D rate 0 maximum rate uint32 uzb TRUE use ZC on channel S2 uint32 uaz TRUE auto zero uint32 s_e if divider is set not zero use Sa Se uint32 period_ms maximum expected waveform period uint32 phase_meas channel to use as reference exc input WEMEASURE_255 pWFMEASURE_255 179 PowerDNA API Reference Manual Release 4 0 Not all parameters are required to be supplied Set up lt changain gt parameter only to the same value as in lt channel gt The rest of parameters can be set to zero Auto zero is a function of the hardware which is useful when the input waveform can show some offset Auto zero resets zero level automatically by subtracting the minimum level from the maximum level and dividing the result by two Alternatively a user can specify zero level implicitly in lt zero gt User can also set up A D sampling rate The proper range of sampling rates is between 64 and 256 times the expected waveform frequency The function returns basic parameters of the waveform
332. established device indicated by devn does not exist or is not an AI 224 No channel specified in ch_mask decimation ratio is illegal value tapsize is illegal value or data is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error lt ch_mask gt parameter indicates which channels will get their FIR configuration changed The following flags are defined define DQ_AI224 SEL _CHAN_0O 0x01 define DQ_AI224 SEL _CHAN_1 0x02 define DQ_AI224 SEL CHAN 2 0x04 define DQ_AI224 SEL _CHAN_3 0x08 define DQ_AI224 SEL _CHAN_ALL Ox0f More than one channel may be specified by bitwise ORing multiple channel flags together lt stage gt parameter selects which FIR lt action gt parameter consists of flag bi flags are defined filter will be acted upon Use 0 for FIRO and 1 for FIR1 ts that select which parameters will be written The following define DQ_AI224 FIR_SET_DEFAULT 0x8 set and enable the default filter define DQ_AI224 FIR_COEFF_LOAD 0x4 load taps and coefficients define DQ _AI224 FIR_ENABLE define DQ_AI224 FIR_DISABLE define DQ AI224 FIR SET DECRATE 0x2 set decimation rate 0x1 enable fir filter 0x0 disable fir filter D The DQ_A1I224_FIR_SET_DEFAULT flag
333. et is lost The DqEngine is necessary on desktop oriented operating system to ensure that the DMap is refreshed periodically but is overkill on real time operating systems The DqEngine needs its own thread and the user must synchronize it with its own processing loop The RtDmap API gives easy access to the DMAP operating mode without needing the DqEngine Here is a quick tutorial on using the RTDMAP API handling of error codes is omitted 66 PowerDNA API Reference Manual Release 4 0 Initialize the DMAP to refresh at 1000 Hz DqRtDmapInit handle amp dmapid 1000 0 Add channel 0 from the first input subsystem of device 1 chentry 0 DqRtDmapAddChannel handle dmapid 1 DQ_SSOIN amp chentry 1 Add channel from the first output subsystem of device 3 chentry 1 DqRtDmapAddChannel handle dmapid 3 DQ_SSOOUT amp chentry 1 Start all devices that have channels configured in the DMAP DqRtDmapStart handle Update the value s to output to device 3 outdata 0 5 0 DgRtDmapWriteScaledData handle dmapid 3 outdata 1 Synchronize the DMAP with all devices DqRtDmapRefresh handle dmapid Retrieve the data acquired by device 1 DgRtDmapReadScaledData handle dmapid 1 indata 1 Stop the devices and free all resources DgRtDmapStop handle dmapid DqRtDmapClose handle dmapid 3 4 1 DqRtDmapinit Syntax
334. eturn DQ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 403 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function writes data to DIO 403 ports Firmware writes data into ports regardless the state of the port input or output The user can write set the state of the output line by writing into ports and then enable outputs on all ports simultaneously Note Use DI0403_ENPORTx in DgAdv403SetIo to select inputs and outputs 4 14 3 DqAdv403Read Syntax int DgAdv403Read int hd int devn uint8 data DQ_DI0403_PORTS Command DQE 198 Input in EF pi in PowerDNA API Reference Manual Release 4 0 hd devn uin Output t8 da Call uin Return t8 da tal LL DO EVN DQ_S EGAL HANDLE DQ_BAD_D END ERROR DQ_TIM OUT DO OM_ERROR DQ_SUCCESS ERROR Other negative values Description Handle to the IOM received from DqOpenI Layer inside the IOM byte array for all ports OM output values for all ports illegal IOM Descriptor or communication wasn t e
335. events to come and store packets in the queue Input 111 PowerDNA API Reference Manual Release 4 0 int handle int flags uint32 timeout_ms int packets_in_queue Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DgAsyncOpenIOM Define behavior of the function Timeout ms Number of packets currently in the queue error allocating buffer illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function waits for the event associated with the specified handle If a handler for an event is assigned using DqRtAsyncAssignEvent it gets called before the control is returned to the thread flow lt flags gt DQ_RTRE_WAIT_PACKET wait for incoming packets until socket is not empty The function always waits for the first packet If the flag is set the function will wait for all packets until it won t time out on waiting for the last of the DQ_RTRE_REFRESH_QUEUE if this flag is not set wait for a single packet only The maximum number of received packets is limited by the depth of the queue default 64 p
336. excitation connected to D B Common connected to A A S2 to B S4 28Vrms 400Hz and D connected to A and A optionally to B 4kHz optionally use A and B R2 and R4 to B B orCin Optionally S3 to and B two parallel C windings per rotor Input external N C S1 to A S2 to N C S1 to A S3 to excitation B Common A S2 to B S4 28Vrms from connected to A to B Excitation A C bus and B readback to Optionally S3 to D D C Excitation readback to D D Output internal S1 to A S2 to N C S1 to A S3 to N C excitation B S3 to C R1 A S2 to B S4 28Vrms to D R2 to D to B and Common to R1 to D R3 to AGND D and Common to AGND Optionally R2 to C and R4 to C Output external S1 to A S2 to Excitation S1 to A S3 to Excitation excitation B S3 to C and readback to D A S2toB and readback to D 28Vrms from Common to D S4 to B D A C bus internal AGND drive resolver only 174 PowerDNA API Reference Manual Release 4 0 Mode Input internal excitation DQ_AT255_MOD SI_INT T F Bi T F E DQ_AT255_MOD RI_INT exc_rate exc_level adc_rate 400 0 lt excitation frequency is the same for both calls 26 0 lt level for the rotor coil 0 gt returns actual sampling rate ret DqAdv255SetExcitation hd0 DEVN CHANNEL exc_level DQ_AT255_ENABLE_EXC_A A channel only exc_rate exc_level amp adc_
337. excitation voltage for DAC A channel to measure excitation voltage for DAC B pointer to buffer for actual excitation voltage read back from DACA pointer to buffer for actual excitation voltage read back from DAC B actual excitation voltage read back from DAC A actual excitation voltage read back from DAC B illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 208 illegal ExcVo1ltA ExcVol1tB chA and or chB value or readbackA or readbackB is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 125 PowerDNA API Reference Manual Release 4 0 Set excitation voltage for excitation sources A and B and measure it back using specified channels The AI 208 layer is capable of providing two sources of excitation voltage Excitation A is connected to even channels and B is connected to odd channels The excitation voltage can be selected and set at any level from 1 5V to 10V This function sets up excitation voltage as close as possible to the requested level and reads it back from the selected channels The user can select either channels 0x10 through 0x17 to read the excitation voltage from the Px terminal four wire connection or channels from 0x20 thru 0x27 to read the excitation voltage from PSx terminals six wir
338. exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function programs one of two programmable scheduler timebases at a time Note None 4 24 9 DqAdv566SetFifoRate Syntax int DqAdv566SetFifoRate int hd int devn int ss int chnl int timebase uint32 rate_us Command IOCTL 252 PowerDNA API Reference Manual Release 4 0 Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem int chad Channel int timebase Select timebase 0 DQ_AR_SCHED_PSTBO or timebase 1 DQ_AR_SCHED_PSTB1 uint32 rate_us delay in ms between output packets 0 as soon as a slot becomes available Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This fun
339. f BCB points to ACBE or DMap int BcbNum array size int broadcast if TRUE start simultaneously using software trigger Output None 101 PowerDNA API Reference Manual Release 4 0 Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_IOM_ERROR IOM reports command execution error DQ_SEND_ERROR cannot send packet DQ_TIMEOUT_ERROR IOM reply wasn t received within timeout period DQ_SUCCESS successful completion Description This function enables and disables acquisition output Set enable TRUE to start operation or FALSE to stop it If DqeEnable starts operation it issues a DOCMD_SETMD command to switch listed devices into operating mode If DgeEnable is about to stop operation it switches devices into configuration mode A device can be switched into operation mode and back to configuration mode independently Switching one device to a different mode doesn t affect other devices in the same IOM Thus one device can perform ACB streaming operation while another can be configured in DMap mode After a device is switched into operation mode it waits for any trigger to start operation If the configuration calls for a hardware trigger the layer waits for an edge on the trigger line If a software trigger is selected this trigger pulse can be issued by using the DOCMD_START command Upon this command the firmw
340. factor gt to 1 retains 1 of every 2 samples setting 2 retains 1 of every 4 samples 3 retains 1 of 8 etc The maximum value for lt dec_factor gt is 16 which retains out of every 65536 samples When the DQAI211_DECFACTORSET flag bit is set in lt mask gt the value in lt dec_factor gt is set The DQAI211_FIR_BY_DECFACTOR flag bit also uses the data in lt dec_factor gt If the DQAI211_FIR_BY_DECFACTOR bit is set and DQAI211_DECFACTORSET is also set the default FIR filter coefficients will be adjusted to provide the correct low pass filter response with the factor of 2 lower data rates that come with each increment of the decimation factor 4 5 4 DgAdv211SetFIR Syntax int DgAdv211SetFIR int hd int devn int channel int mask int decrat int tapsize double data Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int channel bit field to select channel see below int mask bit field to select which FIR setting functions to perform see below int decrat desired decimation ratio NULL if not required see below int tapsize number of taps in filter length of the following data NULL if not required see below double data pointer to filter taps data NULL if not required see below Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illeg
341. far off that host cannot insert this packet into the ring buffer e DQ _eStatusError is set when the Heartbeat mechanism sends aDQCMD_RDSTS command to the IOM and the IOM responds with error flags set You can then call DqGetLastStatus to get the received status flags e DQ eNoHeartReply is set when the Heartbeat mechanism sends aDQCMD_RDSTS command to the IOM and the IOM fails to respond within the timeout period Note None 3 10 3 DqeGetEvent Syntax int DgeGetEvent pDQBCB pBcbh uint32 evtFlags Command DQE Input PDQBCB pBcb pointer to a previously allocated BCB uint32 evtFlags buffer for event flags associated with pBcb Output uint32 evtFlags event flags associated with pBcb Return DQ_SUCCESS successful completion Description This function gets event notification flags indicating events that have occurred associated with BCB Note None 3 10 4 DqeWaitForEvent Syntax int DgeWaitForEvent pDQBCB ppBcb int num int WaitAll int timeout uint32 pEvents Command DQE Input pDOQBCB ppBcb pointer to an array of BCB int num size of ppBcb array int WaitAll wait mode int timeout wait timeout uint32 pEvents buffer for event flags associated with ppBcb Output uint32 pEvents event flags associated with ppBcb Return DQ_TIMEOUT_ERROR timeout passed before th
342. fer Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description This function writes 16 bit wide raw data to the specified device Note The data written is actually transferred to the device on the next call to DgRtDmapRfresh This function should only be used with devices that generate 16 bit wide digital data such as the DIO 4xx series layers 3 4 12 DqRtDmapWriteRawData32 72 PowerDNA API Reference Manual Release 4 0 Syntax int DgRtDmapWriteRawData32 int handle int dmapid int dev unsigned int rawBuffer int bufferSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP to write to int dev ID of the device where the channels are located int bufferSize Number of elements in rawBuffer unsigned The buffer containing the scaled data to send to the device short rawBuffer Return DQ_ILLEGAL_ HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DO SUCCESS command processed successfully Description This function writes raw data to the specified device as 32 bit integers Note The data written is actually transferred to the device on the next call to DgRtDmapRfresh This function should only be used with devices that acquire 32 bit wide digital
343. ference Manual Release 4 0 Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int ss Subsystem DQ_SSOIN for Rx or DQ_SSOOUT for Tx int chal Channel 429 566 Rx 0 5 Tx 0 5 loopback Rx 6 11 429 512 Rx 0 11 uint32 cmd Command see description below Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function configures the mode of operation for each channel of an ARINC 429 layer The following commands they must be logically added are valid a rate control Rx Tx DQ_AR_RATEHIGH set I O rate to 100kbaud DQ_AR_RATELOW set I O rate to 12 5kbaud Rate can be selected on per chip basis It means that Tx0 Rx0 and Rx6 Tx1 Rx1 and Rx7 of DNA 429 566 and Rx0 Rx1 Rx2 Rx3 of DNA 429 512 layers must share the same bit rate b Parity control Rx Tx DQ_AR_PARITYODD odd parity DQ_AR_PARITYEVEN even parity DQ_AR_PARITYOFF no parity check generation in hardware c
344. ference Manual Release 4 0 4 22 9 DqgAdv503MakeVmapMsg Syntax int DgAdv503MakeVmapMsg uint32 mode uint32 identifier uint8 buf int len uint8 tx Input uint32 mode Current mode of CAN port same flags passed to DqAdv503SetChannelCfg uint32 identifier CAN frame ID uint8 buf CAN frame payload up to 8 bytes int len Number of bytes stored in payload buffer Output uinte x Buffer formatted for transmission Return The number of bytes stored in the TX buffer Description This function formats a CAN message from from frame ID and payload to 16 byte per message hardware representation Note This is a helper function to use the CAN 503 layer in VMAP mode 4 23 DNA CAR 550 layer 4 23 1 DqAdvSetWirelessState Syntax d DqAdvSetWirelessState int hd int devn uint32 cmd uint32 data Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM uint32 cmd what parameter to set uint32 data value depending on cmd parameter if cmd is DO_CAR550_ WIRELESS EN DIS data is 32 bit value to enable or disable wireless system Zero to disable wireless non zero to enable Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CAR 550 245 PowerDNA API Reference Manual Release 4 0
345. ff user defined LEDs DQ_L4_LED_USR DO LA LED IO DQ_L2_LED_ATT The rest of LEDs are controlled by the periodic routine that is executed once a second To shut automatic update off and get compete access to LEDs use the DQ_L4_LED_STOP_UPDATE flag along with LEDs flags A write without this flag restores periodic status indication define DQ L LED _OVRT 1L lt lt 0 Overtemperature red define DO LA LED_ATT 1L lt lt 1 Attention red define DO LA LED Du 1L lt lt 2 Read write define DQ_L4_LED_USR 1L lt lt 3 User controlled define DQ_L4_LED_IO 1L lt lt 4 Communication active define DQ_L4_LED_3_3 DNR 1L lt lt 5 DNR sid 2 2 define DQ_L4_LED_PG 1L lt lt 6 Power good define DQ_L4 LED 24 DNR 1L lt lt 7 DNR side 24V define DO L LED BLINK N lt lt 16 IN up and blink DO LA SEI LI ITS sets under and over the limit levels used if interrupt detection is enabled currently not supported Format is straight binary 24 bit use 32 channel 32 bit array 16 over limit and 16 under limit values 360 PowerDNA API Reference Manual Release 4 0 Note None 361 PowerDNA API Reference Manual Release 4 0 4 32PowerDNA simplified layer signaling 4 32 1 DgAdvRouteClockIn Syntax int DgAdvRouteClo
346. ffset Value to write error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error DqAdv601GetRegister 317 int reg uint32 value Command DQE Input int hd int devn Int counter uint32 reg uint32 value Output uint32 value Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ BAD _ DEVN DQ_BAD_ PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ _TOM_ERROR DQ_SUCCESS Other negative values Description PowerDNA API Reference Manual Release 4 0 DqAdv601GetRegister int hd int devn int counter uint32 Handle to IOM received from DqOpenI Layer inside the IOM Counter number 0 7 Register offset Pointer to hold value to read OM value read error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 value is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function reads value from the selected reg register
347. fgForHalfPeriod RE 330 DgAdv601CfgForPeriodMeasurme nt eee ee eeeeee erect eeeeeeee eee teeeenaeeeeeeeeenneeeeeeeees 331 PRACT Cr E 332 PAC VGO TCI ORT PPM E 334 POGACVGOT SCRA ee 335 Ee ie Neie SE 336 4 26 22 4 27 4 27 1 4 27 2 4 27 3 4 27 4 4 27 5 4 27 6 4 27 7 4 27 8 4 27 9 4 27 10 4 27 11 4 27 12 4 28 4 28 1 4 28 2 4 29 4 29 1 4 29 2 4 30 4 30 1 4 30 2 4 31 4 31 1 4 31 2 4 32 4 32 1 4 32 2 4 32 3 4 32 4 4 32 5 4 32 6 4 32 7 4 32 8 4 32 9 4 32 10 4 32 11 4 32 12 4 32 13 4 33 4 33 1 4 33 2 4 33 3 4 33 4 4 33 5 4 33 6 4 34 4 34 1 PowerDNA API Reference Manual Release 4 0 Bet e ANE e 338 DNA QUAD 604 layer E 339 Riet e et Ee le 339 Ree e Stop OUE einser eaa e aea a a E denseneadunuaseeade 340 Reie ee RTE EE 340 DG AV OO 4 E 341 D Ady604SetChannelCfg EE 341 Ree el e EE WE TE 342 DGACVG04W hIIGREGISTCNV UE 343 Ree e ee e Ree EE 344 DGAGVG04SOIW AISI IM EE EE 349 DG AONB O4R GAG e KEE E 349 Do AdvG04Read DRA EE 350 Do ACVGOAW tile DIO OUE EE 350 DNA CT 651 la Ve Eege ENEE EEN ENEE 351 Beete Ee EE 351 D Ady651S6tRegiSte EE EE 352 DNA PCO 911 9 12 913 la VON cis cccsctiscensvecsiencsceeevcecnneenucuncenubanduiavecninaenseaveriwonaeaavt 353 GAS he ee DE 353 Ree SEI OMG EE 354 DNR PWR TEE Sege gege ctcanteecdanistnceuteddcacndubcunadabneatadaweedstiuadandai 355 DOAGY Dar CAG aiaiai eaea ee a aE Ea E e aa EEEa EE aE TANE 355 Reie geleet e DE EE 356 DNX POWER 1G EE 358 DG REV
348. figuration it is recommended to first set all channels to their default state by setting lt channels gt to AI211_SEL_CHAN_ALL setting lt mask gt to DQAI211_CFGCH_DEFAULTSET and calling DqgAdv211SetCfgChannel lt biasdrive gt Sets the amount of drive current for the iepe sensor When the DQAI211_BIASDRIVESET flag bit is set in lt mask gt the lt biasdrive gt value is set The following scaling macro is defined to allow for easy translation to the correct values define DQ211_DRIVE_CURRENT I 1 8 0 255 drive current scaling macro The driver accepts values from zero to 255 which map to drive currents from zero to 8mA Values less than zero or greater than 8 0 will return an error lt biasonoff gt Turns the drive current for the iepe sensor on or off When the DQAI211_BIASDRIVESET flag bit is setin lt mask gt The value in lt biasonoff gt is set The following two values are defined for this purpose define DQ_211_BIAS_ON 1 define DQ_211_BIAS_OFF 0 lt comphi gt Sets the 12 bit comparison value for the open sensor detector When the DQAI211_COMPHISET flag bit is set in lt mask gt The value in lt comphi gt is set Two defines are provided define DQ_211_COMP_HI_STD Oxfa0 standard value for doing comparison define DQ_211_COMP_HI_DEFAULT Oxfff default value disables comparison It is suggested to keep the values between Oxf00 and Oxff0 Setti
349. fleece le Q_SUCCESS successful completion Other negative values low level IOM error 270 PowerDNA API Reference Manual Release 4 0 Description This function retrieves messages stored in BM FIFO typedef struct uint8 channel channel uint8 stat status uint8 size size of the following data bytes uint32 datal variable size data DOBM553Message pDOBM553Message Depending on how a BM was configured the data can be delivered with or without additional information like timestamps and flags The data has the following format 31 30 29 16 15 0 Command Status PAR 1 GAP1553 DATAI553 Timestamp opt 0 30 bit timestamp 15 15ns resolution Flags opt 0 BUS Data 0 PAR 0 GAP1553 DATAI553 E BAR 0 GAP1553 DATAI553 Data N PAR 0 GAP1553 DATAI553 Timestamp optional time when command or status word is received optional bit 31 If Command Status this bit is set to 1 BUS the bus from which data was received if both buses A and B are enabled optional PAR parity bit GAP1553 time interval from the previous packet received in 15 15ns resolution 248us maximum If delay is longer than that the GAP1553 counter stays at Ox3ffff DATA1553 actual data received on the bus Zero status is considered to be normal Error status is define DQ L553 _BMSTATUS_OVER 0x80 BM FIF
350. following defines are used to select gain DQ_AT224 GAIN_1 DQ_AT224 GAIN_2 DQ_AT224 GAIN_4 DQ_AT224 GAIN_5 DQ_AT224 GAIN_8 DQ_AT224 GAIN_10 DQ_AT224 GAIN_20 DQ_AT224 GAIN_40 DQ_AT224 GAIN_50 DQ_AT224 GAIN_80 147 Note DO A PowerDNA API Reference Manual Release 4 0 DQ_AT224 GAIN_100 DQ_AT224 GAIN_200 224 GAIN_400 Channels are numbered from 0 to 3 4 7 2 DqAdv224SetAveraging Syntax int uint32 Command DQE Input int int uin Output uini t32 factor hd devn t32 channel none Return DO DO NO MEMORY LLEGAL_H DQO BAI D DEV Le DO DO DQ_S DQ_TIMEOU OM_ERRO DQ_SUCCESS BAI D_PA R END_ERRO T_ERROR ve Other negative values Description DqAdv224SetAveraging int hd int devn uint32 channel factor Handle to the IOM received from DgOpenIOM device number bit field of which channels to set desired averaging factor error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 224 channel or factor have values that are illegal unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This fun
351. fore return an error uint32 retries_receive number of retries while receiving stream before placing filler uint32 retries_send number of retries while sending stream upon dumping packet uint32 max_inbound_packet maximum packet size from IOM uint32 max_outbound_packet maximum packet size send to IOM uint32 abort_after when streaming abort operation after number of lost packets uint32 use_protocol RESERVED uint32 packets_at_once maximum number of packets to one IOM upon one tick DQEPRM pDQEPRM Note We recommend using default DQE parameters unless there is a need to change settings 3 1 6 DgStopDQEngine Syntax int DgqStopDQEngine pDOQE pDqe Command DQE Input pDQE pDqe pointer to DQE object Output None Return DQ_ILLEGAL_HANDLE invalid pDqe value DQ _ SUCCESS successful completion Description This function performs DQEngine clean up stops main timer routine and kills all listener threads associated with different IOMs Note None 3 1 7 DqParamDQEngine Syntax int DgqParamDQEngine pDQE pDge int setparam PDQEPRM pDgqePrm Command DQE Input pDQE pDqe pointer to DQE object int setparam TRUE to set parameters FALSE to read parameters PDQEPRM dgeprm pointer for the parameter structure Output PDQEPRM dgeprm pointer to the parameter structure read Return DO
352. fset gt and lt usr_gain gt values specified in DgAdv255SetMode lt zc0 gt is a number of 33MHz pulses counted for the positive segment of the waveform counted when waveform level is above lt zero gt level To calculate waveform frequency use zc0 zc1 30 3ns lt zcl gt is a number of 33 MHz pulses for the negative part of the waveform lt zcO_var gt lt zcl_var gt is a variation in counts between last 16 measurements of lt zcO gt and lt zcl gt respectively in 33MHz counts lt raw_var gt is a variation of the position data in counts over last 16 measurements lt clk_frq gt is the sampling clock divider lt ampl gt is the calculated waveform amplitude lt freq gt is the calculated waveform frequency 180 PowerDNA API Reference Manual Release 4 0 lt offs gt is the calculated waveform offset Note Use of this function requires a good knowledge of AI 255 layer design It is very useful for debugging and selecting parameters when programming for a new synchro or resolver input or output For most purposes use the default input settings and use the calculated amplitude and frequency as parameters for DgAdv255SetMode 4 10 5 Syntax DgAdv255MeasureWF int DgqAdv255MeasureWF int hd int devn uint32 changain double frequency_d double amplitude_d double offset_d Command IOCTL Input int hd int devn uint32 changain Output double frequency_d double amplitude_d double offset_d
353. ful completion low level IOM error This function permits user configuration of internal TX and RX FIFO watermarks to better control dataflow from the IOM Note 226 PowerDNA API Reference Manual Release 4 0 Parameter dir is DQL_IOCTLS501_SETTXWM or DQL_IOCTL501_SETRXWM and defaults to 1 and 0 as default Watermark range is between 0 and 2047 4 21 9 DqAdv501SetTermLength Syntax int DgAdv501SetTermLength int hd int devn int chnl uintl6 len Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chal device channel uint16 len transmit termination length Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DQ BAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function sets the transmit termination string length The cube will transmit received data upon receipt of en chars Note The maximum termination string length is limited by packet size and should be less than 4
354. g is required The AI217_FIR_SET_INDEX flag bit allows the user to override the automatic selection of the default FIR filter This gives the user some control over the cutoff frequency of the FIR filter without having to go to the effort of designing and loading custom filter coefficients Normally the index is set automatically by the driver when the sample rate is set The default index is the number of times the sample rate must be doubled to get it to be in the range of 60KHz to 120KHz For example you are sampling the data at 1OKHz but you find the low pass cutoff frequency of the default filter to be too high First determine the default index 1OKHz doubled 3 times is 80KHz which is between 60 Khz and 120Khz so the default index for 1OKHz is 3 As the indices increase the cutoff frequencies get lower making the next lower setting be an index of 4 The A1217_FIR_SET_INDEx bit is always used by itself The present enable disable status will be unchanged by setting the index The new index value 4 in this example is passed in by reusing the lt tapsize gt parameter The normal function of the tapsize parameter is not available when the index is being set The index values range from 0 thru 9 To restore the default filter selection either set an index value of 1 or power cycle the IOM 144 PowerDNA API Reference Manual Release 4 0 lt decr
355. gAdv501SetFrameDelay as follows please note that an additional parameter lt delay_us_major_fifo gt was added to this function since the Stage I release DgAdv501SetFrameDelay hd0 DEVN CHO DQ_SL501_FRAMEDELAY_VMAP_LEN DQ_SL501_FRAMEDELAY REPEAT 0 DQ_SL501_DELAYMODE_INTERNAL delay_us_secondary_fifo delay_us_major_fifo In other words one should specify lt delay_us_major_fifo gt as an inter frame delay and lt delay_us_secondary_fifo gt as a delay if you would like to put multiple sub frames into the secondary FIFO and specify delay between them Due to the fact that DQ_SL501_FRAMEDELAY_VMAP_LEN defines a frame as a single VMap write DQ_SL501_FRAMEDELAY_ZERO_CHAR Or DQ_SL501_FRAMEDELAY_FIXEDLEN constants should be used Note Make sure that if the delay is enabled it is longer than duration of the transmitted character including start and stop bits Implemented in logic version 02 0F 01 or later baud 230 PowerDNA API Reference Manual Release 4 0 4 21 12 DqAdv501SetParity9 Syntax int DgAdv501SetParity9 int hd int devn int chnl uint32 parity_mode Command DQE Input int hd handle to the IOM received from DqOpenIOM int devn layer inside the IOM int chal device channel uint32 parity_mode parity mode Output
356. gOpenIOM int devn Device number int channel Channel 0 or 1 event553_t event Event type uint32 rtsa Remote terminal and subaddress uint32 param Up to seven additional parameters depends on event type Output None Returns DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ DAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function configures events to be sent from the layer 305 event553_t PowerDNA API Reference Manual Release 4 0 The following events are defined typedef enum EV553_BC_ER EV553_BC_BU EV553_BC_I EV553_BC_C RQ EV553_BC_OV RO S R ERRUN D_ERR EARTB EAT EV553_BC_H event553_t no activity on the bus over certain input FIFO overrun output FIFO underrun or half empty bus or protocol errors clear all events BM
357. ge is too high 152 PowerDNA API Reference Manual Release 4 0 Note 4 7 7 DgAdv224SetShunt Syntax int DgAdv224SetShunt int hd int devn uint32 channel uint32 config uint32 position double r_shunt Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 channel channel number and gain value see below uint32 config configuration word see below uint32 position position of the digital shunt Ost OST 5K 205K Output double r_shunt calculated value of shunt potentiometer Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_BAD_PARAMETER error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 224 channel is not in range of 0 3 config is not one of the specified constants position is not in range of Ox0 Oxff DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function is used to enable or disable and adjust the setting of the digital shunt potentiometer The shunt may be inserted across either the P to S or the P to S bridge resistance lt channel gt contains the channel number 0 3 and is optionally bit packed with the gain nu
358. gital inputs Notes 4 10DNA AI 255 layer The DNA AJI 255 layer is a two channel all digital synchro and resolver input output module Modes of operation supported by an AI 255 1 Synchro Input 2 Resolver Input 3 Synchro Output Simulator 4 Resolver Output Simulator Modes of operation are defines as follows define DQ_AT255_MODE_SI_INT 0 Synchro input int exc define DQ_AT255_MODE_RI_INT 1 Resolver input int exc define DQ_AI255_MODE_SI_EXT 2 Synchro input ext exc readback exc on D define DQ_AT255_MODE_RI_EXT 3 Resolver input ext exc readback exc on D 173 define DQ_AI255_MODE_SS_INT define DQ_AT255_MODE define DQ_AI255_MODE_SS_EXT define DQ_AI255_MODE_RS_EXT PowerDNA API Reference Manual Release 4 0 RS_INT YHA US k Synchro drive simulation int Resolver drive simulation int exc Synchro drive simulation ext Resolver drive simulation ext exc exc exc fully sourced fully sourced readback exc readback exc on D on D A synchro has three stator coils S1 S2 S3 connected in a star fashion to the Common The rotor primary coil exciter has wires R1 and R2 Resolver stator coils are S1 S3 and S2 S4 Rotor coil is R1 R3 and R2 R4 in the case of two rotor windings Wiring Synchro three 120 coils Resolver two 90 coils AOut Aln AOut Aln Input internal R1 and R2 S1 to A S2 to RI and R3 S1 to A S3 to
359. gnSyncx int hd int devn uint32 sync_line uint32 signal Input 374 PowerDNA API Reference Manual Release 4 0 int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 sync_line DQ_EXT_SYNCO DQ_EXT_SYNC1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 uint32 signal DQ_EXT_EXTO connect EXTO line to SYNCx line DO ENT EXT connect EXT line to SYNCx DQ_EXT_START_TRIG start trigger pulse DQ_EXT_STOP_TRIG stop trigger pulse DQ_EXT_CLIN input channel list clock DQ_EXT_CLOUT output channel list clock DQ_EXT_CVIN input conversion clock DQ_EXT_CVOUT output conversion clock DQ_EXT_BURST TMRI1 DQ_EXT_CLOCK TMRO DQ_EXT_TSTD timestamp generator Output None Return DQ_BAD_DEVN DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist DO BAD PARAM ETER sync_line or signal has a value other than the appropriate constants listed above DQ_SEND_ERRO R unable to send the Command to IOM DQ_TIMEOUT_ G DQ_ITOM_ERRO DQ_SUCCESS R RROR nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion Other negative values low level IOM error Description This function selects the output source to drive the
360. hannel to measure at uintl6 ExcA excitation level A even channels 16 bit uintl6 ExcB excitation level B odd channels 16 bit uint8 Ra Shunt A level 8 bit 256 positions uint8 Rb Shunt B level 8 bit 256 positions DQ208CCOND pDQ208CCOND Note The device should be in configuration mode these measurements cannot be done along with acquisition 128 Syntax PowerDNA API Reference Manual Release 4 0 4 4 6 DgAdv208ReadAutogain int DgAdv208ReadAutogain int hd int devn uint32 measurement uint32 clentry int Command DQE Input Output Return int hd int devn uint32 measurement uint32 clentry int samples uint32 dt double df int samples ebe double df DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ BAD DEN DO BAD DARAMEIER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ SUCCESS Other negative values Description This function reads data and automatically selects the proper gain Notes None Syntax samples uint32 dt double df Handle to the IOM received from DgOpenIOM device number what to measure channel and gain settings number of samples requested pointer to buffer for retrieved binary data 18 bit pointer to buffer for values in volts number of samples retrieved retrieved binary data 18 bit values in volts error alloca
361. he data to copy to the output packet Output Returns positive value Number of bytes actually written to the output buffer Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_TLLEGAL_HANDLE invalid non NULL value for iom DQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero Or positive successful completion Description This function copies data from the user buffer to the output VMap packet Note None 87 PowerDNA API Reference Manual Release 4 0 3 7 3 DqRtVmapPlusWriteOutput Syntax int DAQLIB DqRtVmapPlusWriteOutput int handle int vmapid int device uint32 channel uint32 rq_channel int rq_size uint8 data Command RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle int device Device number uint32 channel Channel number as specified in DqgRtVmapAddChannel uint32 rq_channel Requested channel int rq size Requested size uint8 data Pointer the data to copy to the output packet Output Returns positive value Number of bytes actually written to the output buffer Return DO_ILLEGAL_ENTRY vmapid is illegal DQ_TLLEGAL_HANDLE invalid non NULL value for iom DOQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero Or positive successful completion Description This function copies data for the specified lt rq_channel gt from the user buffer to the output VMap packet Note lt channel gt
362. he external clock shall be selected in configuration If EXTx lines are used you have to select a source signal for this line by calling DqAdvAssignIsoDio By default EXTO is assigned to DIOO and EXT is assigned to DIO1 4 33 3 DqAdvAssignisoDio Syntax int DgAdvAssignIsoDio int hd int devn uint32 dio_line uint32 direction uint32 signal Input Handle to IOM received from DqOpenIOM int hd int devn uint32 dio_line Layer inside the IOM DQ_EXT_DIO 0 3 _OFFS Number of available DIO lines depends on layer type See the table below 372 PowerDNA API Reference Manual Release 4 0 uint32 direction DQ EXT _DIO_INPUT select DIO as an input DQ_EXT_DIO_OUTPUT select DIO as an output DQ_EXT_DIO_INVERTED VO signal is inverted or with this bit to invert signal uint32 signal DQ_EXT_ADCCVT ADC conversion clock DQ_EXT_GPIO_LOGICO Fixed level of logic 0 if pin is selected as output DQ_EXT_GPIO_LOGIC1 Fixed level of logic 1 if pin is selected as output DQ_EXT_INTO Route ZNTO line to digital output DQ_EXT_INTI1 Route JNT line to digital output Output None Return DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_ PARAMETER dio_line direction or signal has a value other than the appropriate constants listed above
363. he layer can monitor signals on the existing avionics interface This mode is used when either external excitation is required to excite an LVDT for example when the required current exceeds the capabilities of the AI 254 layer or when an AI 254 is used in the role of a wiretapping device in parallel with the existing LVDT input device 3 Simulation mode when the layer is connected directly into the avionics and simulates or mimics the LVDT sensor itself This mode is used when an external device expects to receive output from an LVDT sensor in response to an applied excitation voltage The AI 254 calculates parameters of the externally applied excitation and generates sinewaves on its outputs in accordance with the requested LVDT position These modes of operation have two variations 1 5 6 wire connection in case of 5 wire circuitry connect common negative to both S1 and S2 lines 2 4 wire connection In this case you have to make sure that the external excitation signal is properly attenuated and applied to the S2 input of the AI 254 ModeO internal excitation of 5 wire LVDT Model internal excitation of 4 wire LVDT Mode2 internal excitation of 5 wire LVDT Mode3 internal excitation of 4 wire LVDT Mode4 simulation of the outputs of 5 wire LVDT Mode5 simulation of the outputs of 6 wire LVDT DQ_AIT254_MODE_INT DQ_AT254_MODE_INT DQ_AT254_MODE_EXT DQ_AI254_MODE_EXT DQ_AT254_MODE_SIM DQ_AI254_MODE_SIM
364. he middle point of the LVDT device This offset is converted into a binary representation and applied in the hardware to the raw values of conversion lt usr_gain gt defines fine tuning gain This gain is set in the range from 0 to 1 99996 and can be used to adjust the response characteristics of an LVDT device This gain is converted into a binary representation and applied in the hardware to raw values of calculated position of the LVDT lt exc_freq gt specifies the expected frequency to be received on S2 input four wire case or S1 input simulation case This parameter can be obtained using DgAdv254GetWFMeasurements and is required to set internal parameters such as the number of points per period and the A D rate to be in the acceptable range for simulation mode lt Se_level gt defines different things in different modes of operation in4 wire mode it defines a constant Se which is used to divide the input RMS voltage in simulation mode it defines initial levels of the simulated output Notes Function returns lt meas_pts gt which is the number of points per period of the sinewave This comes handy when you need to calculate true Vrms of the sinewave Vrms Sa Sb lt meas_pts gt 4 9 2 DqAdv254SetExt Syntax int DAQLIB DgAdv254SetExt int hd int devn uint32 channel uint32 mode uint32 flags pDQ254SetExt params Command IOCTL 159 PowerDNA API Reference Manual Release 4 0
365. he queue If this flag is set and there are no packets in the queue function waits until at least one packet will appear in the queue and then time out DQ_RTRE_REFRESH_QUEUE if this flag is not set wait for a single packet only 113 PowerDNA API Reference Manual Release 4 0 3 11 11 DqRtAsyncSend Syntax int DAQLIB DgRtAsyncSend int handle uint32 flags int okt size pDQPKT buffer Command Send event packet Input int handle int flags int pkt_size pDOPKT buffer Output None Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ _IOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DgAsyncOpenIOM Define behavior of the function Packet size Pointer to the packet error allocating buffer illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sends a packet as a reply to the remote events lt flags gt reserved Notes 114 PowerDNA API Reference Manual Release 4 0 The function sends a standard DQPKT packet using asynchronous socket It is your responsibility to fill the packet with proper data including DQ command because this functions fills only
366. he real time cycle and DqCmdReadAll should be called at the beginning of the next cycle The following structure is used to exchange data during DMap operations DQCMD_WRRD typedef struct uint32 dmapid DMap ID uint32 size size of data uint8 data data DOWRRD pDQWRRD Note None 2 2 32 DqCmdWriteReadAll Syntax d int DqCmdWriteReadAll int Iom pDQWRRD pDQWr PDQWRRD pDQRd Command DQCMD_WRRD 0x14C Write All Data and Read Data Back Input int Iom Handle to the IOM returned by DqOpenIOM PDQWRRD pDQWr data for output DMap PDQWRRD pDORd pointer to store input DMap data Output pDOQWRRD pDORd pointer to received input data Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function initiates exchange of data described by transfer list Caller must fill pDqwWr structure with proper DMap Ids and specify size of input and output data Setting input or output DMap ID to zero disables transferring of data in that direction The following structure is used to exchange da
367. hed DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function defines how to configure a Bus Controller lt bc_mode gt defines what bus to listen to define DQ_L553_BC_USE_A 1L lt lt 0 enable bus A define DQ_L553_BC_USE_B 1L lt lt 1 enable bus B lt bc_mode gt allows you to enable either bus A or B or both lt option_flags gt defines additional operational flags for the Bus Controller Minimum bus idle delay prior to sending data to the bus in uS default delay is 50uS if this field is left empty define SL553_PORT_BCCFG_BCIDLE N N amp 0xff lt lt 16 Disables wait for the bus to clear after error if set ignores BCMAX delay and will only wait until BIT delay expires this bit only affects BC behavior after the error the SL553_PORT_BCMAX register should still be programmed to the expected time of longest single transaction on the 1553 bus in the current configuration define SL553_PORT_BCCFG_DISWI 1L lt lt 15 Use CLI CL clock as the major clock BCMJD will be disabled This flag is required if the major frame clock is derived from the exte
368. heduler Note None 4 24 6 DqAdv566SetFilter Syntax int DqAdv566SetFilter int hd int devn int chnl uint32 cmd uint32 from uint32 size uint32 labels Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int chnl Channel uint32 cmd Command see description uint32 from Start entry uint32 size Number of entries to set get uint32 labels Array of label entries to write read Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function writes to or reads from the label filter The following commands are valid DQ_AR_SETFILTER_PUT change label entries 250 PowerDNA API Reference Manual Release 4 0 DQ_AR_SETFILTER_GET retrieve stored entries DQ_AR_SETFILTER_FILL_TABLE fill the scheduler table with values taken from labels 0 Note You can put and get data from the label filter at the same time by OR ing put and get flags In such a c
369. her negative values Description Waits for TX FIFO to complete and then changes parity for selected channel changes parity only the full config word needs to be supplied error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a SL 501 invalid parameter unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error Tx FIFO output can take a long time if it is full The cube will not reply until the output is completed The worst case is almost 7s for 2048 characters at 300 baud Note 4 21 4 Syntax int config Command DQE Input int hd int devn int chnl uint32 config Output None Return DQ_SEND DQ TIMEOUT DQ_IOM_ERRO DQ_SUCCESS V DQ_BAD_PARAMETER R T DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_DE ERROR Al Other negative values Description This function sets the configuration properties for an individual 501 channel Note DqAdv501SetChannelCfg DgAdv501SetChannelCfg int hd int devn int chnl uint32 handle to the IOM received from DgOpenIOM layer inside the IOM device channel configuration flags error allocating buffer illegal IOM Descriptor or communication wasn t estab
370. hronous mode as a minimum a customer needs to open asynchronous IOM using DqRtAsyncOpenI0M close with DqRtAsyncCloseIoOM This function adds a secondary communication socket to the main one Next the user needs to enable layer specific events for example using DqAdv553ConfigEvents for DNx 1553 553 layer Then the user needs to create a thread which will wait on the function call until an event packet arrives from the IOM or timeout occurs There are a few possible ways of doing it Type 1 Waiting on DqRtAsyncReceive function and process packets as they arrive one by one while stop wait for the packet to arrive DqRtAsyncReceive if ret DQ_TIMEOUT_ERROR continue process packet Type 2 Waiting on DgRtAsyncWaitForEvent function and process all packets that are in the queue while stop wait for the all packets to arrive DqRtAsyncWaitForEvent while packets DqRtAsyncReceive process one packet at a time Type 3 Waiting on DgRtAsyncWaitForEvent function and process all packets in callbacks while stop wait for the all packets to arrive DqRtAsyncWaitForEvent DqRtAsyncProcessEvent In the last case all callbacks or semaphore events must be defined by using DqRtAsyncAssignEvent It is up to the programmer to select which set of functions to use for event processing The selection should be done depends on the architecture of
371. htly different compared to parameters specified in DgAdv254SetExcitation because of hardware limitations and mode of operation Notes 4 9 8 DqAdv254Read Syntax int DgAdv254Read int hd int devn int CLSize uint32 cl uint32 bdata double fdata Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int CLSize Reserved uint32 cl Channel of interest Output uint32 bdata Pointer to store binary 24 bit 2s complement format or NULL double fdata Pointer to store converted position data from 1 0 to 1 0 or NULL Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 254 DQ DAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description 166 PowerDNA API Reference Manual Release 4 0 This function reads calculated position or special data for selected channels Special channels are defined as follows Special channels AIn Special channels AIn tdef
372. id Manchester code during SYNC or data bit time SL553_PORT IR BEA Bit timing error was detected on SL553_PORT_IR_BEB bus A B rising falling edge timing is invalid bit timing timeout SL553_PORT_IR_MED Message error detected data error suppress status SL553_PORT_IR_TMW Too many words were received within RX message suppressed SL553_PORT_IR_TFW Too few words were received within RX message suppressed SL553_PORT_IR_ICD Message error detected illegal illogical command error SL553_PORT_IR_RTD RTRT Timeout detected SL553_PORT_IR_RVEF RTRT Validation failed SL553_PORT_IR_DWG Gap within data word detected use only when xxRTR_DGP gt 0 pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see below 308 Port status bits SL553_PORT_STS_BSF SL553_PORT_STS_BSR SL553_PORT_STS_E SL553_PORT_STS_E SL553_PORT_STS_D SL553_PORT_STS_D SL553_PORT_STS_B SL553_PORT_STS_B SL553_PORT_STS_P SL553_PORT_STS_P SL553_PORT_STS_II SL553_PORT_STS_M SL553_PORT_STS_T after read SL553_PORT_STS_TFW after read SL553_PORT_STS_ERB cleared after read SL553_PORT_STS_ERA cleared after read Z2 Z GEES Ke dE Ela JS a E ezl EV553_FSM_ERROR PowerDNA API Reference Manual Release 4 0 RT Current bus that driving BM FIFO 1 BUS A RT Current bus that driving RT 1 BUS A RT Bus B Encoder is enabled in RT Engine RT Bus A Encoder is enabled in RT Engine
373. ieved and stored in message parameter FALSE if there was no message in the queue uint32 avail returns the number of messages still in the receiving message queue Return DQ_BAD_PARAMETER if any parameter is NULL DQ_ILLEGAL_HANDLE if pBcb does not reference a receiving M3 queue DQ_NOT_ENOUGH_ROOM if the data field of message indicated by the dataSize field is not large enough to store the message DQ_SUCCESS successful completion Description This function gets a message received by one device in the IOM Note Check the got Msg parameter after calling to see if a message was actually retrieved 3 9 7 DaMmSendMessage Syntax int DgMmSendMessage pDQBCB pBcb pDgqMessage message uint32 avail Command DQE Input pDOBCB pBcb pointer to Msg queue pDqMessage messag message to send uint32 avail pointer to receive the number of messages that there is still room for in the sending message queue Output uint32 avail returns the number of messages that there is still room for in the sending message queue Return DQ_BAD_PARAMETER if any parameter is NULL DQ_ILLEGAL_HANDLE ifpBcb does not reference a sending M3 queue DQ_NOT_ENOUGH_ROOM the message queue is full DQ_SUCCESS successful completion Description The function sends a message from one device in the IOM Note 100 PowerDNA API Reference Manual Rel
374. igger scans 1 continue operations DOQSETTRIG pDQSETTRIG Passing NULL switches the device into software triggering mode One can select one or more entries in a triggering table mode specifies whether or not to treat this trigger entry mode applies to the following entry Because the AND operation has higher priority than the OR operation a logic expression is calculated accordingly For example you can specify a trigger expression such as TO AND T1 AND T2 OR T1 AND T2 AND T4 where TO T4 are trigger conditions This expression is equal to TO T1 T2 v T1 T2 T4 CL Channel list entries are stored in the following format typedef struct uint8 dev device number 56 uint8 ss uint32 entry channel list entry DQSETCL pDQSETCL PowerDNA API Reference Manual Release 4 0 subsystem The whole channel list for a device must fit in one packet Thus the maximum number of channel list entries is 85 entries maximum physical channel list on layer is 64 entries Output data entries The number of entries actually sent The channel list entry has following format Bits 31 15 14 12 11 8 7 0 Description Flags Reserved Gain Channel number The following are values for the Flags bits Channel list entries definition lower 16 bits are reserved for channel number gain and special
375. igh priority preempt scheduler DQ_AR_TxPRIORITY_LOW low priority send as scheduler permits DQ_AR_TxIMMEDIATE immediate return from the function do not wait until slot becomes available otherwise wait timeout defined in DqAdv566SetConfig uint32 data Properly formed message see DgAdv566BuildPacket Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not 429 566 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sends a packet to the specified channel Note The function returns after data is transmitted on the interface If data cannot be transmitted in the timeout period the function returns DQ_TIMEOUT_ERROR 4 24 13 DqAdv566SendFifo Syntax int DgAdv566SendFifo int hd int devn int chan int packets uint32 data uint32 accepted uint32 available 255 PowerDNA API Reference Manual Release 4 0 Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int chnl Channel int packets Number of packets to send uint32 data Array of packets uint32 accepted Number of packets the function was
376. including start and stop bits Implemented in logic version 02 0E 05 or later 4 21 11 DqAdv501SetFrameDelay Syntax int DgqAdv501SetFrameDelay int hd int devn int chnl uint32 delay_mode uint32 length uint32 delay_src double delay_us double repeat_us Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chnl device channel uint32 delay_mode mode of frame delays uitn32 length string length if DQ_SL501_FRAMEDELAY_FIXEDLEN selected uint32 delay_src source of the delay clock double delay_us delay between frames in microseconds double repeat_us delay before the last frame gets repeated and also frame rate in DQ_SL501_FRAMEDELAY_REPEAT mode Output None 228 PowerDNA API Reference Manual Release 4 0 Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DO DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Sets delay between Tx frames Select lt de
377. ine DQ_AI254 DIV CAL 0x00 calibrated result of division define DQ _AIT254 DIV_RAW 0x10 raw result of Sa Sb Sa Sb define DQ_AT254 AVG 0x20 average position tdefine DQ_AT254_ZC 0x30 number of counts for both half periods define DO _AIT254 LAST A 0x40 last value from A D A define DQ AI254 MAX A 0x48 maximum value A tdefine DO _AI254 LAST BR 0x50 last value from A D B define DQ _AI254 MAX D 0x58 maximum value B tdefine DQ _AT254 LAST Ga 0x60 last calc value from Sa adder define DQ AI254 MIN A 0x68 minimum value A tdefine DQ_AI254 LAST_Sb 0x70 last calc value from Sb adder tdefine DQ_AT254 MIN P 0x78 minimum value B tdefine DQ_AI254 STATUS 0x18 retrieve status information define DQ_AT254 CHTYPE 0xf8 channel type mask two lower bits are channel define DQ_AT254 CHNUM 0x3 channel number only A user has to add the AI 254 channel number to the constant defined above to form a full channel number Please note that only DQ_AI254_DIv_cat information makes sense in floating point format Zero crossing results are returned as two uint16 values packed into one uint32 field where ZCO occupies the lower part of the word and ZC1 occupies the upper one DQ_AI254_LAST_A and DQ_AI254_LAST_B returns the last immediate value converted by A D converters for channels S1 and S2 respectively DQ_AI254_LAST_Sa and DQ_AT254_LAST_Sb return the last immediate
378. ined as structure for SETPARAM data WRITE typedef struct uint32 cfgmask What parameters to set uint32 cfg 00 Set disconnection mode uint32 discfg 08 Override circuit breaker uint32 adcspd Oc Set ADC Timing uint32 portocm 10 Set over current detection mask uint32 portucm 14 Set under current detection mask uint32 rdcnt 18 Set number of failed samples prior breaker engagement uint32 disdiv 24 66MHz divider for the re enable counter DQDIO432DATAOUT pDQDIO432DATAOUT lt cfgmask gt flags select what parameter should be written Following flags are defined define DQDIO432_CFGSET 1L lt lt 0 1 to set cfg parameter define DQDIO432_DISCFGSET 1L lt lt 1 1 to set discfg parameter define DQDIO432_ADCSPDSET 1L lt lt 2 1 to set adcspdset parameter define DQDIO432_PORTOOCMSET 1L lt lt 3 1 to set portOocmset parameter define DQDIO432_PORTOUCMSET 1L lt lt 4 1 to set portOucmset parameter define DQDIO432_RDCNTSET 1L lt lt 5 1 to set rdcntset parameter define DQDIO432_DISDIVSET 1L lt lt 6 1 to set disdivset parameter lt cfg gt selects the disconnection mode Set the bit corresponding to the desired channel to 0 for user re enable mode i e to re enable output on the channel after overcurrent conditions the user must write to the output port using DqgAdv40x Write Set 1 to allo
379. ines signal amplitude peak to peak 0 11V For 5 6 wire simulation mode the output is always in phase with the excitation signal the amplitude varies from 0 to 100 depending on the simulated position For a 4 wire LVDT the phase is switched from 0 to 180 degrees when the simulated position crosses a zero point 4 9 11 DqAdv254ConvertSim Syntax int DAQLIB DgAdv254ConvertSim int hd int devn int CLSize uint32 cl double amplitude double fdata uint32 act_cl uint32 bdata uint32 act_size Command None Input int mode Mode of operation as set in DgAdv254SetMode int CLSize Reserved uint32 cl Channel of interest doubler amplitude Amplitude for each channel double fdata Simulated position data from 1 0 to 1 0 Output uint32 act_cl Actual channel list required for DMap operations uint32 bdata Binary data uint32 act_size Actual channel list size for use with DMap Return DQ_NO_MEMORY error allocating buffer DQ_BAD_PARAMETER Configuration parameters are incorrect 169 PowerDNA API Reference Manual Release 4 0 DQ_SUCCESS Description successful completion This function is intended to simplify programming of LVDT simulation in DMap mode It converts a 1 0 position into raw data representation for gain and phase control taking into consideration whether 4 or 5 6 wiring is in use An Al 254 requires controlling the gain for both P1 and P2 outputs for a
380. int DgRtDmapInit int handle int dmapid double refreshRate Input int handle Handle to the IOM double refreshRate Rate at which the IOM will refresh its version of the DMAP Output int dmapid Identifier of the newly created DMAP Return DQ_ILLEGAL_HANDLE invalid IOM handle DO NO MEMORY memory allocation error or exceeded maximum table size DQ_SUCCESS command processed successfully Description Initialize the specified IOM to operate in DMAP mode at the specified refresh rate 67 PowerDNA API Reference Manual Release 4 0 3 4 2 DqRtDmapAddChannel Syntax int DgqRtDmapAddChannel int handle int dmapid int dev int subsystem uint32 cl int clSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP to configure int dev ID of the device where the channels are located int subsystem The subsystem to use on the device ex DQ_SSOIN E el Array containing the channels to add to the DMAP int clSize Size of the channel array Return DQ_TLLEGAL_ HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DO DAD PARAMETER the subsystem is invalid for this device DQ_SUCCESS command processed successfully Positive value Description Add one or more channels to the DMAP 3 4 3 DqgRtDmapGet InoutMap Syntax int DgRtDmapGet np
381. intl6 option DQ_MAXDEVN and their option parameters DQRDCFG pDOQRDCFG Calibration and manufacturing dates are represented as OxMMDDYYYY in uint 32 where MM is month DD is day of the month and YYYY is year Note If the configuration from the IOM wasn t requested or if the function returned a configuration retrieval error DQE will attempt to retrieve IOM configuration when Dq InitOps is called 2 2 6 DqCloselOM Syntax void DgCloseIOM int Iom Input int Iom Handle to the IOM returned by DqOpenIOM Output None Return DQ_ILLEGAL_HANDLE invalid IOM Descriptor DQ_SUCCESS successful completion Description The function closes communication with the IOM and de allocates all resources involved Note None 2 2 7 DqGetDevnBySlot Syntax int DqGetDevnBySlot int Iom uint32 Slot uint32 devn uint32 serial uint32 address uintl6 model Input int Iom Handle to the IOM returned by DqOpenIOM 7 PowerDNA API Reference Manual Release 4 0 uint32 Slot The DNR chassis slot to query Output uint32 devn Device number of the device sitting in the specified slot uint32 serial Serial number of the device sitting in the specified slot uint32 address Address of the device sitting in the specified slot uint16 model Model number of the device sitting in the specified slot Return DQ_ILLEGAL_HA
382. ion The function sets up configuration for one device in the IOM Note None 3 8 3 DqMsgDestroy Syntax int DgqMsgDestroy pDQBCB pBcb Command DQE Input PDQBCB pBcb pointer to Msg queue Output None Return DQ BAD PARAMETER pBcb is NULL DQ_TLLEGAL_HANDLE pBcb is already deallocated or is not a Msg queue DQ_SUCCESS successful completion Description The function destroys a Msg queue created by DqMsgCreate Note None 3 8 4 DgMsgRecvMessage Syntax int DqMsgRecvMessage pDQBCB pBcb pDqMessage message int gotMsg uint32 avail Command DQE Input pDOBCB pBcb pointer to Msg queue pbqMessage messag DqMes sage Structure in which to store the received message The dat aSize field should indicate the amount of allocated space in the data field int gotMsg pointer to receive value indicating whether a message was received from the queue uint32 avait pointer to receive the number of messages still in the receiving message queue 94 PowerDNA API Reference Manual Release 4 0 Output pDqMessage messag The data field is filled with the received message The dataSize field s value is set to the data s actual size int gotMsg returns TRUE if a message was retrieved and stored in message parameter FALSE if there was no message in the queue uint32 avail returns the number of messages still in the receiving message queue Return DO BAD PARAMETER if any parameter is NULL DQ_ITLLEGA
383. ion returns the number of samples requested to perform averaging Data is returned in raw format Note None Syntax P 4 4 5 DgAdv208MeasureParams nt Command DQE Input IO D Output IO D Return DQ_NO_MEMO DO DO DAD D DO DO z DQ_T DO DO z hd devn int int R EGAL EVN LL Y HANDL BAD_PARAMETE END_ERR O ERRO IMEOUT_ OM_ERRO UCCESS R Other negative values DqAdv208MeasureParams int hd DQ208CPRM pprm DQ208CCOND pcond DQ208CPRM pprm DQ208CCOND pcond DQ208CPRM pprm int devn pDQ208CCOND pcond D Handle to the IOM received from DqOpen I device number pointer to buffer for measurement conditions pointer to buffer for measured parameters OM measurement conditions measured parameters error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 208 pcond or pprm is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 127 PowerDNA API Reference Manual Release 4 0 Description This function is used to measure a variety of AI 208 front end parameters see channel equivalent diagram in the
384. is no device with the specified number DQ_SUCCESS command processed successfully Description This function reads raw data from the specified device as 16 bit integers Note The data read is the data transferred by the last call to DgRtDmapRefresh This function should only be used with devices that acquire 16 bit wide digital data such as the AI 4xx series layers 3 4 9 DgRtDmapReadRawData32 Syntax int DgqRtDmapReadRawData32 int handle int dmapid int dev unsigned int rawBuffer int bufferSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP to read from int dev ID of the device where the channels are located int bufferSize Number of elements in rawBuffer Output unsigned short rawBuffer The buffer containing the raw data Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description This function reads raw data from the specified device as 32 bit integers Note The data read is the data transferred by the last call to DgRtDmapRefresh This function should only be used with devices that acquire 32 bit wide digital data such as the DIO 4xx series layers 3 4 10 DqRtDmapWriteScaledData Syntax int DgqRtDmapWriteScaledData int handle int dmapid int dev double scaledBuffer
385. it field Do_1553_RT_TX_S1ZI requested transfer If it equals zero all 32 words will be written into the corresponding memory area of that entry We suggest using the following macros to form entries in the lt rtsa_list gt list DO_L553_RT_RxX RT SA SIZ DQ_L553_RT_RX_BLK RT SA SIZI E specify RT SA and data size E BLK specify RT SA data size and block to read data from Additional macros are defined to retrieve most useful status information and avoid using DqAdv553ReadStatusRT in the control loop DQ_L553_RT_RX_DATA_RDY RT BLK retrieve data ready i e data received by RT word from the defined remote terminal and block Retrieved data is a32 bit word that defines what subadresses received data A read clears status bits 279 GC N defines the size of the PowerDNA API Reference Manual Release 4 0 DQ_L553_RT_RX_DATA_SENT RT BLK retrieve data sent Oe data transmitted by RT word from the defined remote terminal and block The retrieved data is a 32 bit word that defines what subadresses transmitted data A read clears status bits DQ_1553_RT_RX_PORT_STS RT retrieve most important status information 32 bit define SL553_PORT_STS_BSF 1L lt lt 31 RT Current bus that driving BM FIFO 1 BUS A define S L553_PORT_STS_BSR 1L lt lt 30 RT Current bus that driving RT 1 BUS A define SL553_PORT_STS_ENB 1L lt lt 2
386. itOps function so that the correct sync x line will be connected by The AI 217 uses clock rates that are higher than the sampling rate and also uses decimation to reduce the effective sampling rate This function will calculate the correct clock and decimation factor for the AI 217 If the sampling rate that is setup by this function is the same as the sample rate that is given to DgAcbInitOps The Config word used by t clock by specifying the DQ_LN_CVCKSRCO constant define CFG217 DQ_LN_ENABLED DQ_LN_ACTIVE A DQ_LN_GETRAW A DQ LN TIBOEN DQ_LN_CVCKSRCO DO LN STREAMING DQ_FIFO_MODEFIFO 4 7 DNA AI 224 layer 4 7 1 DgAdv224Read he second parameter of DqAcbInitOps For example DqAcbInitoOps then the correct decimation factor will be applied automatically Otherwise the decimation factor must be applied using the DqgAdv217SetFIR function after the call to must enable the PLL Syntax int DgAdv224Read int hd int devn int CLSize uint32 cl uint32 bData double fData Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels in channel list 1 to 4 uint32 eel pointer to channel list uint32 bData ptr to raw data received from device double fData pointer to store converted v
387. l DO BAD PARAMETER DO TOM FERRO DQ_SEND_ERROR DQ_TIMEOUT_ ERROR DQ_DEVICE_B Description DQ_NO_MEMOR DQ SUCCESS USY LN_CVCKSRCO actual channel list size actual channel list actual number of scans to handle together 0 default actual buffer parameters illegal IOM Descriptor or communication wasn t established pBcb is NULL or is not an ACB or CLSi ze is too big IOM reports command execution error cannot send packet IOM reply wasn t received within timeout period device is in operating mode memory allocation error successful completion This function sets up layer configuration for ACB operation At the time of calling BCB should have been allocated using DgAcbCreate Config Following configuration flags can be used with ACB operations define define define define define define define define define define define define These flags are hardware oriented The user must set up either Do_LN_TMREN OF DQ_LN_IRQEN DQ _LN_TMREN 1L lt lt 11 enable layer periodic timer DO _LN_IRQEN 1L lt lt 10 enable layer irqs DQ_LN_PTRIGEDGE1 1L lt lt 9 stop trigger edge MSB DQ_LN_PTRIGEDGEO 1L lt lt 8 stop trigger edge 00 software 01 rising 02 falling DQ_LN_STRIGEDGE1 11L lt lt 7 start trigger edge MSB DQ_LN_STRIGEDGEO 1L lt lt 6 start trigger edge 00 soft
388. l double amplitude double fdata uint32 act_cl uint32 bdata uint32 act_size Command None Input int mode Mode of operation as set in DgAdv255SetMode int CLSize Reserved uint32 cl Channel of interest ouble amplitude Amplitude of the output signal 0 80Vpp double fdata Simulated position data from 1 0 to 1 0 Output uint32 act_cl Actual channel list required for DMap operations uint32 bdata Binary data uint32 act_size Actual channel list size Return DQ_NO_MEMORY error allocating buffer DQ BAD PARAMETER Configuration parameters are incorrect DQ_SUCCESS successful completion Description This function is intended to simplify programming of synchro resolver output in DMap mode It converts 0 2pi rad angle into raw data representation for gain and phase control taking in consideration Because of that for each position function produces a pair of pre packaged channel list and binary data ready to be written into DMap fields or for use DgAdv255 WriteBin function A synchro requires control of three amplitudes and three phases Resolver requires control of two amplitude and two phases Data is calculated as follows 186 PowerDNA API Reference Manual Release 4 0 A S1 sin 30 max_amplitude B S2 sin 150 max_amplitude C S3 sin 270 max_amplitude The reason for this transformation is that an AI 255 controls voltages on S1 S2
389. l list supplied This function uses the preprogrammed CL update frequency 10Hz One can reprogram the update frequency by calling the DgqCmdSetClk command after the first call to D9Adv207Read Thus the user cannot call this function when the layer is involved in any streaming or data mapping operations If the user specifies a short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every next call function returns the latest acquired data 121 PowerDNA API Reference Manual Release 4 0 If one would like to cancel ongoing sampling call the same function with Oxffffffff as a channel number Note None 4 3 2 DqAdv207ReadChannel Syntax int DgAdv207ReadChannel int hd int devn uint32 measurement uint32 clentry int samples uint32 data double volts Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 measurement what to measure uint32 clentry channel and gain settings int samples number of samples requested must be between 1 and 120 uint32 data pointer to buffer for retrieved binary data 18 bit double volts pointer to buffer for value in volts can be NU
390. l6 words of the lt xx_scan_size gt or full messages if lt xx_scan_size gt is zero lt ramins gt returns the number of words still in the buffer 4 25 13 DqAdv553WriteRT Syntax int DAQLIB DgAdv553WriteRT int hd int devn int channel uint32 rt_size uint32 rtsa_list uint16 data Input int hd Handle to the IOM received from DqOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_size Size of the following RT SA list uint32 rtsa_list Array of RT SA to write to uint16 data Pointer to the array of pointers to the data for each entry in rtsa_list Output Returns DQ_NO_MEMORY error allocating buffer LLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established BAD_DEVN device indicated by devn does not exist or is not an 1553 553 Configuration parameters are incorrect SEND_ERROR unable to send the Command to IOM HU Q Q_BAD_PARAMETER Q_ HU TIMEOUT_ERROR D nothing is heard from the IOM for Time out duration DO TOM FERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function writes data to the RT SA memory which is used to send out data upon receiving a Transmi
391. lay_mode gt from DQ_SL501_FRAMEDELAY_DISABLE o disabled DQ_SL501_FRAMEDELAY_FIXEDLEN 1 fixed length DQ_SL501_FRAMEDELAY_VMAP_LEN 2 frame size is determined by the amount of VMap data DQ_SL501_FRAMEDELAY_ZERO_CHAR 3 frame ends upon zero character ASCIIZ string DQ_SL501_FRAMEDELAY_REPEAT 8 A repeat mode repeat last placed frame if not updated on time Select lt delay_src gt from DQ_SL501_DELAYMODE_DISABLE 0 disabled Tx done DQ _SL501_DELAYMODE_INTERNAL 1 internal per channel clock DO SL501_DELAYMODE_TMRO1 2 TMR1 for char and TMRO for frame DQ _SL501_DELAYMODE_SYNCO02 3 SYNC2 for char and SYNCO for frame The SL 508 layer has the Major FIFO unit on top of the Secondary FIFO unit The Major FIFO is intended for implementation of the auto repeat feature that keeps on sending serial messages to the avionics devices with hard realtime deadlines The internal structure of the output channel is as follows VMap write routine Major FIFO 1024 bytes Secondary FIFO 1024 bytes UART 16 bytes PowerDNA API Reference Manual Release 4 0 The Auto repeat mode requires data to be put into Major FIFO instead writing directly into the Secondary FIFO In such a case the Major Secondary FIFO system acts as a double buffered scheme In frame repeat mode the device works as follows 1 2i VMap routine tries to lock the Major FIFO
392. ld be called at the end of the real time cycle and DqCmdReadAll should be called at the beginning of the next cycle The following structure is used to exchange data during DMap operations DQCMD_WRRD typedef struct uint32 dmapid DMap ID uint32 size size of data uint8 data data DQWRRD pDQWRRD Note None 2 2 31 DqCmdReadAll Syntax int DqCmdReadAll int Iom pDQWRRD pDQRd Command DQCMD_WRRD 0x14C Write All Data and Read Data Back Input int Iom Handle to the IOM returned by DqOpenIOM pDQWRRD pDORd pointer to store input DMap data Output pDQWRRD pDQORd pointer to received input data Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function reads the response from an IOM to a request to exchange data initiated by a call to DgCmdWriteAll 26 PowerDNA API Reference Manual Release 4 0 This function is useful in a real time environment where the real time task can t afford to wait for the IOM s response DgCmdWriteAll should be called at the end of t
393. le addresses For example DNx 1553 553 layer implementing 1553B military avionics protocol is capable of supporting two independent buses with 32 remote terminals each containing 32 subadresses and multiple status words VMap operations require adding channels with DQ_vMAP_SPEC_CHANNEL flag When the flag is specified the channel specified in the DgRtVmapAddChannel is only used to determine data size the 83 PowerDNA API Reference Manual Release 4 0 actual channel to perform the operation with is specified in the runtime using DqRtVmapAddOutputChannelData and DgRtVmapRqInputChannelData VMap packet contains information for both amount of data and channel to retrieve Request packet always contains two 16 bit entries per each input or output channel Reply packet can contain either one or two 16 bit entries per channel the same way as with VMap One of the entries contains the number of actually read or written data points and the second one is optional information about the size of data or empty space for write remains in the FIFO Host to Cube request Flags Size Write 0 Channel Write 0 gt to IOM Size Write N Channel Write N Size Request 0 Channel Request 0 Size Request N Channel Request N from IOM Data Write 0 3 6 1 DgRtVmapAddOutputChannelData Cube to Host reply Flags Size Written 0 Remains 0
394. le rate that is currently set The default averaging factors are shown in the following table 142 PowerDNA API Reference Manual Release 4 0 When Sample rate And sample rate Default factor of CJC readings less than or equal to is greater than value averaged 120 000 60 000 0 1 60 000 30 000 1 2 30 000 15 000 2 4 15 000 7 500 3 8 7 500 3 750 4 16 3 750 1 875 5 32 1 875 937 5 6 64 937 5 468 75 7 128 468 75 234 375 8 256 234 375 0 9 512 4 6 4 DgAdv217SetFIR Syntax int DgAdv217SetFIR int hd int devn int bank int action int decrat int tapsize Command DQE Input int hd int devn int bank int action int decrat int tapsize double data Output int filter_total Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ BAD DEN DQ_BAD_PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values int filter_total double data handle to the IOM received from DqOpenIOM layer inside the IOM bit field to select group of 4 channels see below bit field to select which FIR setting functions to perform see below desired decimation ratio NULL if not required see below number of taps in filter length of the following data NULL if not required see below pointer to filter taps data NULL if
395. leared after read 281 PowerDNA API Reference Manual Release 4 0 lt data gt is an array of 32 bit words which is allocated to accommodate all data requested in provided RTSA list DQ_L553_BERRORS bits possible bus errors are defined as follows define SL553_PORT_IR_RWD 1L lt lt 31 RT watchdog IRQ upon inactivity on the bus for the specified period define SL553_PORT_IR_OFH 1L lt lt 30 FIFO Output FIFO half full below watermark position define SL553_PORT_IR_OFE 1L lt lt 29 FIFO Output FIFO Empty define SL553_PORT_IR_IFH 1L lt lt 28 FIFO Input FIFO half full above watermark position define L553_PORT_IR_IFF 1L lt lt 27 FIFO Input FIFO full possibly overriten define SL553_PORT_IR_ITA 1L lt lt 26 Bus One of the following errors was detected on bus A B invalid bit value define SL553_PORT_IR_ITB 1L lt lt 25 Bus invalid Manchester code during SYNC or data bit time or parity error define SL553_PORT_IR_BEA 1L lt lt 24 Bus Bit timing error was detected on bus A B one of the following errors invalid combination on the input define S L553_PORT_IR_BEB 1L lt lt 23 Bus rising falling edge timing is invalid bit timing timeout detected define SL553_PORT_IR_MED 1L lt lt 22 Bus Message error detected data error suppress status define SL553_PORT_IR_TMW 1L lt lt 21 Bus Too many words were received within RX message suppress status define SL553_POR
396. lected channels It writes data separately into four special channels defined as define DQ_AT254 GAIN_A 0x00 gain of P1 excitation channel define DQ_AI254 GAIN_B 0x10 gain of P2 excitation channel define DQ_AT254_ PHASE_A 0x20 phase of P1 excitation channel define DQ_AT254_ PHASE_B 0x30 phase of P2 excitation channel Gain should be in the range of 0x0 0x8000 Phase should be in the range of 0 thru the number of points minus one in the generated sinewave which can be obtained using DqAdv254GetExcitation call You will need to use the following macro to pack parameters for phase setting define DQ_AO254 PHASE SET PHASE DELAY PHASE lt lt 18 DELAY amp 0x3ffff PHASE is an offset from which sinewave is output and DELAY specifies delay in uS for fine tune of phase control normally set to zero Notes To write a position from 1 to 1 use the DgAdv254Write function 4 9 13 DqAdv254SetWForm Syntax int DqAdv254SetWForm int hd int devn uint32 channel uint32 mask double upd_rate int size uintl6 data Command DQE Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 channel Channel to use uint32 mask Which D A to write waveform to 0x1 to P1 0x3 to both double upd_rate Desired update rate int size Number of points in the waveform uintl6 data Waveform data Output Non
397. letion Other negative values low level IOM error Description This function writes sets a register in a CT 651 layer 352 PowerDNA API Reference Manual Release 4 0 The input reg must be one of the following defined constants DQL_IOCTL651_SET_LCR DQL_IOCTL651_SET_FWCFG DQL_IOCTL651_SET_DACW DQL_IOCTL651_SET_FWDC DQL_IOCTL651_SET_FWDIV set LCR special bits 5 bits Output mode config register 20 bits DAC write register 22 bits Flywheel duty cycle register 32 bits Output period Register 32 bits DQL_IOCTL651_SET_FWCLK_MIN Flywheel clock divider auto correction low limit 32 bits DQL_IOCTL651_SET_FWCLK_MAX Flywheel clock divider auto correction high limit 32bits Note See powerdna h file for details about bit definitions of register contents 4 29 DNA PC 911 912 913 layers 4 29 1 DqAdv91xRead Syntax int DgAdv91xRead int hd int devn uint32 status uint32 bdata double fdata Command DQE Input int hd int devn Output uint32 status uint32 bdata double fdata Return DQ_TLLEGAL_HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Handle to IOM received from DqOpenIOM Layer inside the IOM Returns status value 1 uint32 Raw binary data an array of 5 values NULL if not required Converted dat
398. letion low level IOM error This function reads the value from a register reg of the counter relative to layer devn counter channel The following registers are allowed QD604_QDU_CTR QD604_QDU_CCR QD604_QDU_LR QD604_QDU_IDBA QD604_QDU_IDBB QD604_QDU_IDBZ QD604_QDU_IDBT QD604_QDU_CRO QD604_QDU_CR1 QD604_QDU_TBR QD604_QDU_QED QD604_QDU_OW QD604_QDU_INC QD604_QDU_IFWR Note None 4 27 8 DqgAdv604ConfigCounter Syntax int DgAdv601ConfigCounter int hd int devn int ss int counter int en ant LE ime CrO ant ek ant CDE int idba int idbb int 1dbz ant tt int inv_a int inv_b int inv_z int inv_t int inv_do0 int inv_dol int mode int rl_mode int evt_b int evt_src int tb src int clkout_en int clkout_mode int trg_src int trg_clr int trgout_en int trgout_mode int gtstart_en int gtstop_en int out_width int qe_mode int qe_delay int oe ert int ge_swap int ts_mode int end_mode Int theg me eig 344 Command Input DQE int hd int devn int counter int en int lr int cr int crl int idba int idbb int idbz int idbt int inv_a int inv_b int inv_z int inv_t int inv_doO int inv_dol int mode PowerDNA API Reference Manual Release 4 0 Handle to the IOM received from DqOpenIOM Layer inside the IOM Counter number 0 3 Enable counter Load value Compare register 0
399. ley emtP ckel sssini nona ege vexende sug te Ea E EE tiiendasepreseceast 110 DO RTAS VME PROCESSEV EE 111 DG RIASVMCVVAILFOPE E 111 Belge 112 DORIAS WMG EE gery SE A aa ADEDERE EERS 114 DqRtAsyncVmapRefreshlnputs and DqaRtAsyncDmapRefreshinputs 115 DqRtAsyncVmapRefreshOutputs and DqaRtAsyncDmapRefreshOutputs 116 Keen ee 116 Layer specific FUNCTIONS 11 sssccccccnceceensnnnnnnnsseeeeeennnnannnenseseeeeanenness 117 DNA Al 2Z01 l yerS eeneg EE Ee 117 DOACV 20 TRAC EE 117 DNA AI 205 l VOM esii eiiiai ch cccs aieeao adea dat cedesnrinreceinigassacawelenstinvesuantonns estan die 118 DOAGV 20S ROA E 118 EE EE aaa eee eee are err Penne eee ee eee Peer ee ee 119 Ree OT 120 DNA AI 207 JEE e Ee EE 121 DgAdy207 ReaQ EE 121 DGAUV207 ET E 122 AE a ii einari aoaaa danae earren apaan a Daae iach tended 123 DgAd 208Read EE 123 DaAdyv208S6tControl EE eoa a a a AE E Eaa 124 DGAUV208SELEKGV Olt EE 125 Ree TE ET 126 DGAUV208MeASUS e EE 127 DOARVZ0B RAGA UOC UIA cere iepenen eaaa e aa a S Ea aa eE aa 129 GACY TE E EE 129 DN erfreet e 130 DgAdy211 E EE 130 DGAUV2TASetGig CANINE ms seepra aena a are aE EE Eaa ana 131 DGAGV2 1 SEIGIG ayer rod EE 135 Bee 2A StF EE 137 DGAGV2 TT SEEF TE 139 DNA AI 217 la yet siinide Stairs natuieanaveenanecbieacticcawealeua dan ap ae naneda danaa daa a 140 4 6 1 4 6 2 4 6 3 4 6 4 4 6 5 4 7 1 4 7 2 4 7 3 4 7 4 4 7 5 4 7 6 4 7 7 4 8 4 8 1 4 8 2 4 9 4 9 1 4 9 3 4 9 4 4 9
400. lid reg is not one of the QDU constants or value is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads the current count values from the counters specified in the channel list It is used for immediate mode Note None 4 27 5 DqAdv604SetChannelCig Syntax 341 PowerDNA API Reference Manual Release 4 0 DqAdv604SetChannelCfg int hd int PDQCHNLSET_604_ pC Command DQE Input int hd int devn int ss int counter PDOCHNLSET_604_ pCig int cfg Output mt ckg Return DQ_ILLEGAL_HANDLE DQ BAD _ DEVN DQ BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values int devn int ss int counter fg uint32 cfg Handle to the IOM received from DqOpenIOM Layer inside the IOM Device subsystem Counter number 0 3 Pointer to channel configuration structure Pointer to cfg values Returned config status illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 604 counter number is invalid unable to send the Command to IOM nothing is heard from the
401. lished device indicated by devn does not exist or is not a SL 501 invalid parameter unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 223 PowerDNA API Reference Manual Release 4 0 Use the macro DQCFG_501 to set the configuration flags For example the following configure the serial port in RS 232 mode 57600 bps 8 data bits no parity and 1 stop bit config DQCFG_501 DQ_SL501_OPER_NORM DQ_SL501_MODE_232 DQ_SL501_BAUD_57600 DQ_SL501_WIDTH_8 DQ_SL501_STOP_1 DQ_SL501_PARITY_NONE L Parity and Framing errors are not reported by default To report them add the following flags config DQ_SL501_ERROR lt lt DQ_SL501_ERROR_SH 4 21 5 DqAdv501SetBaud Syntax int DgAdv501SetBaud int hd int devn int chnl uint32 baud uint32 realbaud Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chn1l device Channel uint32 baud channel baud rate uint32 realbaud pointer for actual baud rate of device Output uint32 realbaud actual baud rate of device after prescaler calculation Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established D
402. lt 0 DC coupling define DQ 211 _HPF_POINT1_HZ 1L lt lt 1 0 1 Hz cutoff high pass filter define DQ 211_HPF_1_HZ 1L lt lt 2 1 0 Hz cutoff high pass filter define DQ_211_HPF_10_HZ 1L lt lt 3 10 Hz cutoff high pass filter lt offset gt Sets the control settings for a test mode This is not normally set by a user When the DQAI211_OFFSETSET flag bit is set in lt mask gt The value in lt offset gt is set The following defines are provided define DQ_211_OFFSET_TEST_ON 1 test mode on define DQ 211 _OFFSET_TEST_OFE 0 test mode off default value When the combination of DQ_211_BIAS_OFF and DQ_211_OFFSET_TEST_ON occurs the system internally grounds the sensor input for adjustment purposes No sensor connections are allowed at this time lt anafilt gt Sets the 48KHz analog filter ON or OFF When the DQA1211_ANAFILTSET flag bit is set in lt mask gt The value in lt anafilt gt is set The following defines are provided define DQ_211_ANALOG_FILTER_ON 1 define DQ_211_ANALOG_FILTER_OFF 0 lt main_enb gt Provides additional control over the main A D converter for special applications Control for the main converter is normally provided automatically by the DqgAdv211Read or the ACB and DMap control functions When the DQAI211_MAINENBSET flag bit is set in lt mask gt The value in lt main_enb gt is set The following defines are provid
403. lue of data from user Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM or packet got corrupted DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function transfers large amount of data into IOM memory This data can be stored into one of the IOM flash memory locations upon a DgCmdUpdateF lashBuffer call Every time a user 220 PowerDNA API Reference Manual Release 4 0 calls this function it transfers data and allocates a chunk of memory to store this data Set Size to 0 to reset memory Note Do not call in operating mode Use the firmware update utility supplied for safe update This function is password protected with super user level password 2 2 37 DqCmdUpdateFlashBuffer Syntax int DgCmdUpdateFlashBuffer int Iom uint16 Sector uint32 Address uint32 Size uint32 CRC Command DOCMD_UPDFLASH 0x160 Update Flash Data from the Flash Update Buffer Input int Iom Handle to the IOM returned by DqOpenIOM ul6 sector Flash sector to start from u32 address Flash chip address u32 size amount of data to write uint32 CRC pointer to uni
404. lue specifying number of 66Mhz clocks before qualifying the input clock signal TRUE to turn on pre inversion of the input pin TRUE to turn on pre inversion of the gate pin TRUE to turn on post inversion of the output pin One of the DO CH SN counter mode constants determines which mode to put the counter in DO CM CT Basic timer DQ_CM_ECT external event counter DQ_CM_HP LG period capture DQ_CM_NP 325 PowerDNA API Reference Manual Release 4 0 int trs int enc int re int gated int end_mode int lr int cfg Output int cfg Return DQ_ILLEGAL_ HANDLE DQ_BAD_DEVN DQ_BAD_ PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description N period capture DQ_CM_QE Quadrature encoder DQ_CM_TCT Triggered event counter DQ_CM_THP Triggered Lo period capture DQ_CM_TNP Triggered n period capture TRUE to use external trigger source only w a triggered mode TRUE to use auto clear at the end of the count only in triggered mode TRUE to enable re load continuous operation TRUE gate line as hardware gate on the prescaler enabled when high or gie inverts One of the DO_EM_XXX end mode constants determines count termination or continuous if enabled DO EM CROO End when CR CRO DQ_EM_CRI1 End when CR CR1 DQ_EM_FFF End when CR 0xFFFFFFFF DQ_EM_PC End when
405. lues low level IOM error Description This function is used to retrieve the extended calibration data for the AO 358 This function works using an underlying DgCmdIoct1 It uses aDQCMD_IOCTL command with a DOITOCTL_CVTCHNL function under the hood Command defines DQ_AO358_EE_CHK_STS get the status see below DQ_AO358_EE_RD_ID_ADDR sets the address for the subsequent read commands gets 8 bit silicon ID to data 0 192 PowerDNA API Reference Manual Release 4 0 DQ_AO358_EE_RD read from the device to data 1Kb max Sequential reads will return contiguous data from the device DQ_AO358_EE_WR_OPEN open the device for writing sets the write address removes write protect DQ_AO358_EE_ERASE erase the EPCS device Device must be open for writing for erase to succeed The erase cycle takes approx 10 seconds Busy flag will be nonzero during erase cycle and must be polled to determine when command is complete DQ_AO358_EE_WR write data to device 256 bytes max Sequential write commands will write contiguous data into the device DQ_AO358_EE_WR_CLOSE close device to writing sets write protection Status return The status from the DQ_AO358_EE CHK_STS command is returned as 5 32 bit values using data cast to a uint32 data 0 is the busy flag data 1 is the AO358_ESTS value see logic document for details data 2 is the RDSTS value from the EPCS device This value will only be returned when the
406. m the device Output uint32 Value value received from the device Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description 14 PowerDNA API Reference Manual Release 4 0 Function reads Value from a physical Address on IOM Note This low level function can be dangerous because all IOM address space is accessible Therefore I O layer triggers may be initiated when certain memory is read This function is password protected with user level password 2 2 20 DqCmdWriteMultiple Values Syntax int DgCmdWriteMultipleValues int Iom pDQWRVALM DQWrMultVal Command DOCMD_WRVALM Ox11C Write Multiple Values to the Device Input int Iom Handle to the IOM returned by DqOpenIOM pDQWRVALM pointer to the structure that defines what and where to write DOWrMultVal Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this c
407. mand DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up the parameters specified in lt pdata gt The first word in this structure is a bit field lt cfgmask gt that specifies what parameters in the structure actually contains value and have to be written into the layer hardware Note This function is reserved for the future functionality extension 4 18 4 DqAdv448SetLevels Syntax int DqAdv448SetLevels int hd int devn uint32 clsize uint32 cl float l_low float l_high Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 clsize Channel list size uint32 cl Channel list channels 0 0x2f are valid float 1_low Low logic level OV 30V float 1l_high High logic level OV 30V Output Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 448 DQ _SEND_ ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up low and high levels for the digital comparator circuitry for each channel specified in the
408. mber when the lt r_shunt gt value is not NULL The DQ_LNCL_CHANGAIN macro is provided to pack the channel and gain together Use one of the following constants DQ_AI224 DQ_AI224 DQ_AI224 DQ_AI224 DQ_AI224 _GAIN_ _GAIN _GAIN _GAIN _GAIN 1 22 _4 29 _8 DQ_AI224_GAIN_10 DQ_AI224_GAIN_20 DQ_AI224_GAIN_40 DQ_AI224_GAIN_50 DQ_AI224_GAIN_80 DQ_AI224_GAIN_100 For example to use a gain setting of 4 on channel 0 use channel DQ_LNCL_CHANGAIN 0 DQ_AI224_GAIN_4 153 PowerDNA API Reference Manual Release 4 0 lt config gt should contain one of the following constants DQ_AI224_SHUNT_DISABLED DQ_AI224 SHUNT_A across P and S DQ_AI224 SHUNT_B across P and S Notes None 4 8 DNA AI 225 layer 4 8 1 DqAdv225Read Syntax int DgAdv225Read int hd int devn int CLSize uint32 cl uint32 RawData uint32 uData double fData Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels uint32 cl pointer to channel list uint32 RawData pointer to raw data received from device uint32 uData pointer to store calibrated binary data NULL if not required do
409. mber of scans from the data buffer and stores the data in the ACB If the buffer doesn t have enough space in which to put rqsizemin scans of data the function doesn t put any data The function returns the number of scans copied in retrieved avail returns the total number of scans available in the buffer total free minus ret rieved Note None 3 2 7 DgAcbPutScans Syntax int DgAcbPutScans pDQBCB pBcb char data uint32 size uint32 rqsizemin uint32 retrieved uint32 avail Command DQE Input PDOQBCB pBcb BCB containing the desired ACB char data returns a pointer to a buffer into which data can be placed uint32 size desired data buffer size in scans uint32 rqsizemin minimum size of the data buffer to return in scans If the ACB can t return a buffer of minimal size the function returns 0 in retrieved and NULL in data uint32 retrieved buffer for the actual size of the buffer accessible from data in scans uint32 avail buffer for the number of scans worth of space in the ACB not including the returned data buffer Output uint32 retrieved the actual size of the buffer accessible from data in scans uint32 avail the number of scans worth of space in the ACB not including the returned data buffer Return DQ_BAD_PARAMETER data is NULL or pBcb is NULL or is not an ACB DQ_SUCCESS successful completion Description This function returns in data a pointer to
410. mdSetSyncRt after calling this function to make connection Note For DNR racks and 1GB cubes only 4 32 9 DqAdvRouteSyncTrigOut int DgAdvRouteSyncoOut int hd int line Syntax Input int hd int line Output None Return DQ_ILLEGAL_HANDLE DO DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Handle to IOM received from DqOpenIOM Signal to assign Use one of the following DQ_EXT_SYNCO DQ_EXT_SYNCI1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 DQ_EXT_GPIO_LOGICO DQ_EXT_GPIO_LOGICI1 DQ_EXT_PUSH_BUTTON 0 to release illegal IOM Descriptor or communication wasn t established line has a value other than the appropriate constants listed above unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function routes one of the selected signals SYNCX lines logic states or pushbutton to the trigger output of the Sync connector Call DgCmdSetSyncRt after calling this function to make connection Note For DNR racks and 1GB cubes only 4 32 10 DqAdvRouteTrigin Syntax int DgAdvRouteTrigIn int hd int devn int line 367 PowerDNA API Reference Manual Release 4 0
411. nIOM int devn Layer inside the IOM Output PDQDIO462DATAOUT pointer to the structure with initialization data for the DIO 462 data Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 462 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Note This function allows setting any of the configurable parameters of the DIO 462 layer The configuration should be set using DQDIO462DATAOUT type For parameters that should be actually programmed on the layer the corresponding bit in cfgmask should be set to 1 Unused and undefined bits should be set to 0 structure for SETPARAM data typedef struct int32 cfgmask bit field show which of the following params are valid int32 cfg Set disconnection mode int32 discfg Override circuit breaker int32 portocm Set over current interrupt mask 217 PowerDNA API Reference Manual Release 4 0 int32 portucm Set under current interrupt mask int32 rdcnt Set number of failed samples prior breaker engagement int32 adccfg 5 ADC conversion control words
412. nction calculates RMS voltage on channels A and B S1 and S2 of the channels specified in the channel list Notes This function uses point by point mode function DgAdv254Read to retrieve data 4 9 10 DqAdv254Write Syntax int DAQLIB DgAdv254Write int hd int devn int CLSize uint32 cl double amplitude double fdata Command DQE Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM int CLSize Channel list size uint32 cl Channel of interest 168 PowerDNA API Reference Manual Release 4 0 double amplitude Signal amplitude for each channel double fdata Simulated position data from 1 0 to 1 0 Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 254 DQ BAD PARAMETER configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function writes a simulated position to simulate 4 and 5 6 wire LVDTs The function converts a position depending on the mode of operation lt amplitude gt def
413. nd DQ_SUCCESS successful completion Other negative values low level IOM error Description This function requests conversion results for each channel specified in the channel list and stores them alongside converted data The following channels are defined use them for DMap operations as well DQL_CHAN448_PWRO 0x30 user power O0 TCPOS DOL_CHAN448_PWR1 0x31 user power 1 TCNEG DQL_CHAN448_GNDPIN 0x32 user ground pin DQL_CHAN448_VREF25 0x33 Vref 2 500V reserved DQL_CHAN448_ADCO 0x40 Normal channels 0x40 0x5F Note Reading status information delays a reply to the call and is currently not implemented Pass NULL as a lt status gt if you don t want status to be read from isolated side logic 4 18 3 DqAdv448SetAll Syntax int DqAdv448SetAll int hd int devn pDQDIO448DATAOUT pdata Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM pDOD1IO448DATAOUT pdata Pointer to parameters to set Output Return 212 PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 448 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this com
414. nd a minor clock set to 160Hz 6 25mS Each minor frame contains up to 256 bus controller command blocks BCCBs which are divided into upper and lower parts and used as a double buffered buffer to ensure that data has not been changed by the host software when a bus controller executes the frame 284 PowerDNA API Reference Manual Release 4 0 The frame structure can be represented as follows Major frame Minor frame BC Control Blocks descriptor tables descriptor tables in external memory 256x9 16 frme types 128x16 256x9 One block for each minor frame descriptor Desci Desc 255 1 enable current entry if this bit O descriptor is ignored OT Execute once flag if set entry will be executed once and then it will be automatically disabled CB Status bit indicates bus that was used last time entry was processed 0 Bus A RR Status bit 1 if 1553 RT that was in error state responded with status ED Status bit 1 if entry was executed at least once ERR Status bit 1 if entry was executed with error ERRC Error counter counts number of retry attempts if number of retries is above specified in BCB block error bit is set Successfull execution of the 1553 command sequence clears this counter PT CC S GC 3 2 1 0 EN JO po SWAP ED MRF EN Enable descriptor if this bit O descriptor is ignored and next entry is processed until end of the descriptor table Descriptor may be temporary disabled in
415. nd data 0 for corresponding table values You can put and get data from the scheduler tables at the same time by OR ing put and get flags In such cases the label array is overwritten with the data retrieved from the layer Note 251 PowerDNA API Reference Manual Release 4 0 The scheduler table consists of two 256 entry arrays The first array contains scheduling information and control flags the second array contains actual data to be transmitted Each entry can be enabled and disabled separately You can put and get data from the scheduler tables at the same time by OR ing put and get flags In such cases the array is overwritten with the data retrieved from the layer You can combine DQ_AR_SETSCHED_DATA_ONLY with all three other modes DQ_AR_SETSCHED_FILL_TABLE cannot be combined with other modes 4 24 8 DqAdv566SetSchedTimebase Syntax int DgqAdv566SetSchedTimebase int hd int devn int chnl int timebase uint32 rate_us Command IOCTL Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int chal Channel int timebase Select timebase 0 DQ_AR_SCHED_PSTBO or timebase 1 DQ_AR_SCHED_PSTB1 uint32 rate_us Desired rate in microseconds Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not
416. ned PDQRDCFG pDqCfg pointer to stored DORDCFG structure resulting from DOCHMD ECHO command or NULL upon error Return DQ_SOCK_LIB_ERROR error opening socket or connecting to server DQ_NO_MEMORY memory allocation error or exceeded maximum table size DQ_IOM_ERROR IOM reports command execution error DQ_SEND_ERROR unable to send a packet to the IOM DQ_TIMEOUT_ERROR OM reply wasn t received within timeout period DQ_SUCCESS if the IOM was successfully opened Description 6 PowerDNA API Reference Manual Release 4 0 This function opens communications with the IOM If the IOM is successfully opened it allows function calls from this process Normally this function opens the descriptor of the network interface and sends the DOCMD_ECHO command to the specified IP address to retrieve the IOM serial number layer types model calibration dates etc Upon retrieval of the DORDCFG information it stores it in the IOM table If the DOCMD_ECHO command fails the function returns a NULL in pDqC fg If the DORDCFG information is not desired pass NULL as pDqCfg The returning packet payload has the following structure device configuration data typedef struct uint32 model IOM model uint32 ipaddr ip address uint32 sernum serial number uint32 caldate calibration date uint32 mfgdate manufacturing date uint16 devmod DQ_MAXDEVN up to 16 installed layers u
417. negative values low level IOM error Description 7 Use 1 for future compatibility 40 PowerDNA API Reference Manual Release 4 0 Function controls setting IOM passwords define DQ_SETPASS_SUPASS 1L lt lt 0 Confirm SU password define DQ_SETPASS_USRPASS 1L lt lt 1 Confirm user password define DQ_SETPASS_SETSU 1L lt lt 2 Set SU password define DQ_SETPASS_SETUSR 1L lt lt 3 Set user password define DQ_SETPASS_CLEAR 1L lt lt 4 clear passwords for current session N A externally The system requires confirmation of a password before changing parameters Thus one should call the DOCMD_SETPASS function to confirm the super user or user password Once the password is confirmed the functions that required a password become accessible To switch them off call this function again to clear passwords DOCMD_SETPASS is also used to change passwords First you have to confirm the related password and only then call the function again to change it Regardless of whether the password has been changed successfully or not the flag to execute password protected functions is cleared You have to send passwords again to call password protected functions Note None 2 2 48 DqCmdGetCRC Syntax int DqCmdGetCRC int Iom DQCRCINFO pDQCRCInfo Command DOCMD_GETCRC 0x188 Returns IEEE 802
418. nel Thus up to 24 calls of DqgAdv462SetLimit may be required to completely program the layer 4 20 Serial 500 layer ColdFire IOM only 4 20 1 DqgAdv500SetConfig Syntax int DgAdv500SetConfig int hd int devn int sending uint32 config Command DQE Input 219 PowerDNA API Reference Manual Release 4 0 int hd int devn int sending uint16 config Output None Return DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DqOpenIOM Layer inside the IOM TRUE for the sending subsystem FALSE for the receiving subsystem configuration flags illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a V 500 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error Sets the configuration options for a V 500 layer Note None 4 20 2 Syntax int value Command DQE Input int hd int devn uint32 cmd uint8 value Output None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DQ_BAD_PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_ITOM_ERROR DQ_S
419. nel S2 for detecting zero crossing events Use lt s_e gt to set up a constant for Sa b Se calculation keeping it above S on S1 The rest of the parameters can be set to zero Auto zero is a function of the hardware which is useful when an input waveform can show some offset Auto zero resets the zero level automatically by subtracting the minimum level from the maximum level and dividing the result by two Alternatively a user can specify zero level implicitly in lt zero gt 162 PowerDNA API Reference Manual Release 4 0 A user can also set up the A D sampling rate The proper range of sampling rates is between 64 and 256 times the expected waveform frequency The function returns basic parameters of the waveform presented on S1 and S2 in the following structure it is user s responsibility to allocate those structures typedef struct uint32 min_lvl waveform minimum uint32 max_lvl waveform maximum uint32 sum average accumulated sum Sa or Sb uint32 cal calibrated position uint32 raw raw position uint32 zc0 zero crossing 0 uints2 zeci zero crossing 1 uint32 zcO_var variation of zc0 uint32 zcl_var variation of zcl uint32 raw_var variation of the raw position uint32 cik frg selected AIn AOut clock float ampl waveform amplitude float freq waveform frequency float offs waveform offset WFPRM_254 pWFPRM_254 Information is returned for each
420. nel number data is NULL or size is greater than 8 which is the maximum CAN message data size DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command Dk SUCCESS successful completion Other negative values low level IOM error Description 239 PowerDNA API Reference Manual Release 4 0 This function sends a message from a 503 layer on a CAN network Note When the bus is in error state error_code contains one of the following values e DQ_CANS03_ERR_WARN warning bus errors were detected e DQ_CANS503_ERR_AE Arbitration error the message to send collided with a message sent by another node e DQ_CANS503_ERR_BE The number of bus errors is greater than 128 bus is now in error state e DQ_CANS503_ERR_OR Transmit FIFO overflowed 4 22 4 DqAdv503SetConftig Syntax int DgAdv503SetConfig int hd int devn int sending uint32 config Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int sending TRUE for the sending subsystem FALSE for the receiving subsystem Utne 32 EE e configuration flags Output None Return DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CAN 5
421. ng a value of Oxfff will turn the comparison off lt complo gt Sets the 12 bit comparison value for the shorted sensor detector When the DQAI211_COMPLOSET flag bit is set in lt mask gt The value in lt complo gt is set Two defines are provided define DQ_211_COMP_LO_STD Oxc0 standard value for doing comparison define DQ_211_COMP_LO_DEFAULT 0x0 default value disables comparison It is suggested to keep the values between 0x30 and Oxe0 Setting a value of zero will turn the comparison off lt alarmctrl gt Sets the control settings for the visual alarm LED When the DQA1211_ALARMCTRLSET flag bit is set in lt mask gt The value in lt alarmctrl gt is set The following defines are provided define DQ _211_ALARM_ON 0x3 LEDs are controlled by comparison registers and secondary adc define DQ 211 ALARM OFF 0 LEDs are off define DO 211 ALARM RED 0x4 LED controlled by program red on define DQ 211 ALARM GREEN 0x8 LED controlled by program green on define DQ 211 ALARM ORANGE 0x0c LED controlled by program orange on 133 PowerDNA API Reference Manual Release 4 0 lt hpf gt Sets the control settings for high pass filtering or DC coupling When the DQAI211_HPFSET flag bit is set in lt mask gt The value in lt hpf gt is set The following defines are provided define DQ_211_HPF_DC 1L lt
422. ng defined constants DQL_IOCTL651_GET_STS General Status Register DQL_IOCTL651_GET_FWCFG Output mode config register DQL_IOCTL651_GET_FWDC Flywheel duty cycle register DQL_IOCTL651_GET_FWDIV Output period Register DQL_IOCTL651_GET_FWCLK_MIN Flywheel clock divider auto correction low limit 32 bits DQL_IOCTL651_GET_FWCLK_MAX__ A Flywheel clock divider auto correction high limit 32 bits DQL_IOCTL651_GET_FWCRH Input clock high count in 1OOMHz or 160MHz clocks DQL_IOCTL651_GET_FWCRP Input clock period count in 1OOMHz or 160MHz clocks DQL_IOCTL651_GET_FWCNT Current value of the flywheel counter debug only Note See powerdna h file for details about bit definitions of register contents 4 28 2 DqAdv651SetRegister Syntax int DgAdvSetRegister int hd int devn uint32 reg uint32 value Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 reg Register to set uint32 value Value to put in register Output None Return DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 651 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOLSUCCESS successful comp
423. nication wasn t established device indicated by devn does not exist or is not an SL 501 invalid parameter unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets the transmit termination string The cube will transmit received data upon occurrence of the termination string The maximum termination string length is limited by packet size and should be less than 470 Note bytes 4 21 8 Syntax int uintl6 len Command DQE Input int hd int devn int chnl uint32 dir Uintl6 len Output None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DO DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ _TOM_ERROR DQ_SUCCESS Other negative values Description DqgAdv501SetWatermark DgqAdv501SetWatermark int hd int devn int chnl uint32 dir handle to the IOM received from DgOpenIOM layer inside the IOM device channel watermark FIFO direction watermark position error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a SL 501 invalid unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command success
424. nitialized CRC Output uint32 CRC Standard IEEE 802 3 CRC 32 value of data in flash memory Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function initiates a write operation into a firmware sector The current CM 1 layer has two flash chips that are located at different addresses The system flash is located at DQ_FLASH ADDRESS and has a size of DO_FLASH SIZE The firmware starts at sector DQ_UPUSER_SEC These are the only allowable parameters for writing system flash Auxiliary flash is located at DO_F LASHAUX_ADDRESS and has a size of DO_FLASHAUX_SIZE All of auxiliary flash is available to the user Note This is a pending command Use a large timeout Do not call in operating mode This operation takes tens of seconds to complete At the time of Flash update the device will be unreachable via DaqBIOS Use the firmware update utility supplied for safe update This function is password protected with super user level password SG 2 Syntax int PowerDNA API Reference Manual Release 4 0 2 38 DqCmdSetCommParameters Command Input in
425. nks over 1L lt lt 1 input current 1L lt lt 2 ZE bar 1L lt lt 3 FAN is on 1L lt lt 4 User controlled 1L lt lt 5 I O user 1L lt lt 6 Overtemperature red 1L lt lt 7 Attention red 1L lt lt 8 DNR side 24V 357 PowerDNA API Reference Manual Release 4 0 define DO L LED 24 NIC 1L lt lt 9 NIC side 24V define DO L LED 3 3 DNR 1L lt lt 10 DNR side 3 3V define DQ_L2 LED 3 3 NIC 1L lt lt 11 NIC side 3 3V define DO L LED_STOP_UPDATE 1L lt lt 31 stop LED updates in periodic routine define DQ_L2_LED_BLINK N N lt lt 16 N up and blink DQ_L2_SET_LIMITS sets under and over the limit levels used if interrupt detection is enabled currently not supported Format is straight binary 24 bit use 32 channel 32 bit array 16 over limit and 16 under limit values Note None 4 31 DNx POWER 1G layer 4 31 1 DqAdvDnxpRead Syntax int DgAdvDnrpRead int hd int devn int CLSize uint32 cl uint32 bData double fData Command IOCTL Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM int CLSize number of channels GARE EECH pointer to channel list uint32 bData ptr to raw data received from device double fData pointer to store converted voltage dat
426. nnels 0 11 int limitch Which subchannel to use for limit comparison see below double limitvalue desired limit Output Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 462 DQ_BAD_PARAMETER limitid is not in the range of 0 11 or 16 27 or limitvalue is above below allowable values DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function should be used to program the circuit breaker over and or under current limit on the DIO 462 layer int limitch selects which subchannel to use for comparison and circuit breaker function Use one of the following defines DQ_DIO0462_SUBCH_V_NO A limitvalue Unit Of Measure is volts DQ_DIO0462_SUBCH_I_AC limitvalue UOM is amps DQ_DIO0462_SUBCH_I_DC limitvalue UOM is amps DQ_DIO462_SUBCH_V_NC A limitvalue UOM is volts DQ_DIO0462_SUBCH_THERM limitvalue UOM is degreesC DQ_DI0462_DISABLE_BREAKER when used as over range value circuit breaker function is disabled Note The current limits should be set individually for the over and under current conditions on every chan
427. not required see below total of filter coefficients after conversion to integer Expected returned value is 8388608 see below error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 217 No channel specified decimation ratio is illegal value tapsize is illegal value or data is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 143 PowerDNA API Reference Manual Release 4 0 Description This function can be used to perform FIR configuration and control functions for the AI 217 when the user desires to specify his own filter coefficients and decimation rates In the normal case these configuration settings are set automatically by the DgAcbInitoOps function Use these settings to override standard behavior for special applications The user may configure as many parameters as he chooses Any parameter that is not enabled by a lt mask gt bit will retain its present value lt bank gt parameter indicates which channels will get their FIR configuration changed The following flags are defined define AI217_SEL QOFIR A 0x01 select fir for channels 0 3 define AI217_SEL_QFIR_B 0x02 select fir for channels 4 7 define AI217_SEL QOFIR_C 0x04 select fir for channels 8 11 define AI2
428. nown as I O Modules or IOMs that are distributed throughout a process or large piece of equipment and a dedicated Ethernet interface card plugged into a host computer A host system can communicate with IOMs over conventional Ethernet using copper or fiber optic cables If hard real time response is required the host computer should have a real time OS running To achieve hard real time performance on commercial Ethernet cabling a Central Controller comes with firmware that implements UEI s patent pending DaqBIOS protocol Each PowerDNA cube provides several slots or layers that hold a variety of analog and digital I O function modules For full details on PowerDAQ hardware including PowerDNA cubes and the various I O Layers you can select please go to www PowerDNA com This document gives further details about the features and functionality of various system components It also provides an overview of all API functions that a designer employs to create a user application In broad terms a user application uses function calls from the PowerDAQ API shared library These functions in turn use DaqBIOS commands that run the DaqBIOS Engine the firmware that allow the host or Central Controller to communicate with the PowerDNA cubes sending operating commands and retrieving data 2 Five ways to communicate with IOM The PowerDNA API provides five ways of communicating with the PowerDNA cube 1 DaqBIOS Command API so called low le
429. nt dmapid int dev unsigned char mappedData Input int handle Handle to the IOM int dmapid Identifier of the DMAP int dev ID of the device where the channels are located Output unsigned char pointer to the beginning of the device s output DMAP buffer mappedData Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Get pointer to the beginning of the output data map allocated for the specified device 3 4 6 DgRtDmapGetOutputMapSize Syntax t int DqRtDmapGetOutputMapSize int handle int dmapid int dev int mapSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP 69 PowerDNA API Reference Manual Release 4 0 int dev ID of the device where the channels are located Output int mappedSize size in bytes of the device s output data map Return DQ_ILLEGAL_HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Get the size in bytes of the output map allocated for the specified device 3 4 7 DgRtDmapReadScaledData Syntax int DqRtDmapReadScaledData int handle int dmapid int dev
430. nt16 data Pointer to arrays to store data from the specified sub addresses Output Returns DQ_NO_ME error allocating buffer illegal IOM Descriptor or communication wasn t established DQ_TLLEGAL_HANDLE DO DAD D device indicated by devn does not exist or is not an 1553 553 V DQ_BAD_PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function reads data from the RT SA memory which is updated upon a Receive command from a BC lt rt_size gt is a number of entries in lt rtsa_list gt Each entry in this list is defined as follows DQ_L553_RT_SADDR IN N amp 0x1f lt lt 0 sub address DQ_1 553_RT_SADDR_SEL 1L lt lt 5 Sub address field is valid DO_LS53 RT RTN N amp Ox1f lt lt 6 RT number DO_1 553_RT RT SEL Lett RT field is valid D L553 RI SET STATUS 1L lt lt 12 Set status bits DO L553 RT SET BLK1 1L lt lt 13 Use Block 1 to write data DO L553 RT_TX_SIZE N N amp Ox1f lt lt 16 Data size Data size is defined in 16 bit words A five b
431. nt32 tx_buf_size uint32 tx_scan_size Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 rt_sa RT and SA numbers like in the RT SA list uint32 rx_buf_size Size of the receive buffer for this RT SA uint32 rx_scan_size Scan size of the receive buffer for this RT SA uint32 tx_buf_size Size of the transmit buffer for this RT SA uint32 tx_scan_size Scan size of the transmit buffer for this RT SA Output None Returns DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO DAD PARAMETER Configuration parameters are incorrect DO GEND ERROR unable to send the Command to IOM 274 PowerDNA API Reference Manual Release 4 0 DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function allocates contiguous buffers for the specified RT and SA separate for RX and TX commands This allows transfers of contiguous data arrays to and from the specified
432. nt32 value Output None Return DQ_ILLEGAL HANDLE DQ_BAD_DEVN DQ BAD PARAMETER DqAdv601WriteRegisterValue int hd value DgAdv601WriteRegisterValue int devn int counter Handle to IOM received from DqOpenIOM Layer inside the IOM Counter number 0 7 One of the DQ_CTU_XXxX constants indicating which register to write Value to write illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid reg is not one of the DQ_CTU constants or value is NULL 323 PowerDNA API Reference Manual Release 4 0 DQ_SEND_ERROR unable to send the Command to IOM DQ_IOM_ERROR DQ_SUCCESS Other negative values Description This function reads the value from a register reg of the counter relative to layer devn counter channel The following registers are allowed DQ_TIMEOUT_ERROR successful completion low level IOM error 4 26 12 DqAdv601ConfigCounter DQ_CTU_CTR DQ_CTU_CCR DO CT bs DQ_CTU_LR DQ_CTU_IDBC DQ_CTU_IDBG DO CT br DOQ_CTU_CRO DQ_CTU_CRI1 DQ_CTU_TBR DQ_CTU_FIRQI DQ_CTU_FDTI DQ_CTU_FIRQO DQ_CTU_IER DO CT ICH DQ_CTU_FDDO DOQ_CTU_TESTO DQ_CTU_TEST1 Note None Syntax int DgAdv601Coni Command DQE Input FigCounter Cocci nothing is heard from the IOM for Time out dura
433. ntry uint32 channel Channel to request data from int rq_size Number of bytes to read from the device Output int act_size Maximum number of bytes that can possibly be transferred might be smaller than the requested number uint8 indataptr Pointer to the buffer where the received data will be accessible once the refresh is complete Return DQ_ILLEGAL_ HANDLE invalid IOM handle DO BAD DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Function requests the maximum number of bytes to read from the specified channel of the device 3 7 Simplified VMap and VMap Functions A set of simplified functions was developed to make writing of VMap based real time application simpler After creating VMap or VMap the following functions may be used instead of DqRtVmapAddOutputChannelData DqRtVmapAddOutputData DqRt VmapRqInputChannelDataSz DqRtVmapRgqInputDataSz The main idea of the following API is to avoid using index in the transfer list and require user to update all entries in the outgoing VMap packet Instead following functions are recommended R R DqRtVmapInitOutputPacket DqRtVmapWriteOutput DqRtVmapPlusWriteOutput DqRtVmapRequest Input 85 PowerDNA API Reference Manual Release 4 0 DqRtVmapP lusRequestInput DqRtVmapReadInput DqRtVmapiInputFifoAvailable DgqRtVmapOutputFifoAvailable These functions are intended to
434. o send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function reads voltage current and temperature parameters from a DNR power layer The layer uses a 24 bit converter that reads data once a second The following channels are defined as well as macros to convert data DQ _L2_ADC_TEMP2 Temperature 2 Code 0x800000 149nV 0 00295K DQ _L2_ ADC_TEMP1 Temperature 1 Code 0x800000 149nV 0 00295K DQ_L2_ADC_I_IN Input current Code 0x800000 1 788uA DQ_L2_ADC_V_FAN Fan voltage Code 0x800000 149nV 23 1V DQ_L2_ADC_V_1_2 1 2V source Code 0x800000 149nV 23 1V DQ _L2_ ADC_V_1_5 DQ_L2_ADC_V_IN DQ _L2_ADC_V_24NIC DQ_L2_ADC_V_24DNR 1 5V source Code 0x800000 149nV 23 1V Input voltage Code 0x800000 149nvV 45 3V 24V NIC Code 0x800000 149nV 23 1V 24V DNR Code 0x800000 149nvV 23 1V OrRFNWHBUDATOORFR EH ye yey e e YY WY YY CH LA bi N ga DQ_L2_ADC_V_3_3NIC 3 3V NIC Code 0x800000 149nV 23 1V DQ_L2_ADC_V_3_3DNR 3 3V DNR Code 0x800000 149nV 23 1V DQ_L2_ADC_V_2_5NIC 2 5V NIC Code 0x800000 149nV 23 1V DQ_L2_ ADC_V_2_5DNR 2 5V DNR Code 0x800000 149nV 23 1V Channels from 0x10 to 0x 1c return over the limit settings for abovementioned channels Channels f
435. oes not exist or is not a CAN 503 DQ_BAD_PARAMETER cmd is not one of the DOL_IOCTL503_SET constants or valueis NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Note Sets the configuration options for a 503 layer Configuration flags are assembled as follow RATE OPERATING_MODE PORT_MODE Available rates are DO CAN DO CAN DO CAN DO CAN DO CAN DO CAN DO CAN DO CAN 5 5 5 5 5 5 5 5 DO CANDO3 Mo DO CANDO3 Mo DQ_CAN503_RA 03_RA 03_RA 03_RA 03_RA 03_RA 03_RA 03_RA 03_RA DOQ_CAN503_OPE E_10K E_20K E_50K E_100K E_125K E_250K E_500K E_800K Available operat DQ_CAN503_OPE Co P E_1M ing modes R_NORMAL Normal mode CAN port acknowledges incoming frames R_LISTEN Listen only passive mode no acknowledgement of incoming frames D Available port modes E_BASIC CAN 2 0a basic CAN 11 bit identifier DE _XTEND CAN 2 0b extended CAN OO bit identifier 243 PowerDNA API Reference Manual Release 4 0 4 22 7 DqAdv503ResetChannel Syntax int DgAdv5
436. oltage data NULL if not required Output Uinte2 Kel channel list uint32 bData received binary data double fData received voltage data Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 224 DQ_BAD_PARAMETER CLSize is not between 1 and DO_MAXCLSIZE bData is NULL or a channel number in c1 is invalid DO GEND ERROR unable to send the Command to IOM 146 PowerDNA API Reference Manual Release 4 0 DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it in accordance with the channel list supplied Thus the user cannot call this function when the layer is involved in any streaming or data mapping operations If the user specifies a timeout delay that is too short this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every next call function returns the latest acquired data If you would like to
437. ommand DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function writes defined values to defined addresses in DOWrMultVal You have to fill all fields of this structure to ensure correct operation This structure is used to read and write multiple addresses from and to IOM memory DQCMD_WRVALM structure typedef struct uint32 addr address to write value int16 increment address increment decrement after each write uint8 size size of operand and four lower bits of increment uints8 count number of values to write uint8 data DQWRVALM pDQWRVALM Note The maximum count is limited by the packet size This low level function can be dangerous to use because all IOM address space is accessible I O layer triggers may be initiated when certain memory is written This function is password protected with user level password 2 2 21 DqCmdReadMultiple Values Syntax 15 PowerDNA API Reference Manual Release 4 0 int DgqCmdReadMultipleValues int Iom pwDQRDVALM pDORdMultVal uint8 Data Command DOCMD_RDVALM 0x120 Read Multiple Values from the Device Input int Iom Handle to the IOM returned by DqOpenIOM pwDQRDVALM pointer to the structure defining what and where to read pDQRdMultVal uint8 Data pointer to store data received
438. ommand to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up the configuration for a counter in a 601 layer for quadrature decoding For an extended parameter description see DgAdv601ConfigCounter 4 26 16 DqAdv601CfgForHalfPeriod Note None Syntax int Command DQE Input int int int DqAdv601CfgForHalfPeriod hd devn counter int hd int devn int counter int startmode int tbr int dbg int dbc int iie int gie int trig int trs int enc int gated int re int end_mode int cfg Handle to the IOM received from DqOpenIOM Layer inside the IOM Counter number 0 7 330 PowerDNA API Reference Manual Release 4 0 int startmode int tbr int dbg int dbc int iie int gie int trig int trs int enc int gated int re int end_mode int cfg Output int cfg Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description DQ_PL601_SM const Interval divider for timebase register Input debouncing gate register value Input debouncing clock register value RUE to turn on pre inversion of the input pin RUE to turn on pre inver
439. on Other negative values low level IOM error Description This function reads a 24 bit word from a DI 401 layer or a 12 bit word from a DIO 405 layer using DOCMD_RDCHNL Note 196 PowerDNA API Reference Manual Release 4 0 None 4 13 3 DqAdv40xSetHyst Syntax int DgAdv40xSetHyst int hd int devn uintl6 levelO uintl6 levell Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM uint16 level0d 10 bit level of logical zero in steps from OV to Vdg uint16 levell 10 bit level of logical one in steps from OV to Vdg Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 401 DIO 402 DIO 404 406 or DIO 405 DQ_BAD_PARAMETER data is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets hysteresis levels Hysteresis is a specific feature of DIO 40x layers To access this feature you should enable it in the configuration word define DQ_L401_HYSTEN 1UL lt lt 18 hysteresis programming is enabled Note By defaul
440. on the size of the data allowed to be sent or received allow transmission on both d Call DqAdv553ConfigRT to transmit remote terminal configuration to the firmware 3 Enable operations DqAdv553Enable hd0 DEVN TRUE This function simultaneously enables operations on both channels In the data loop perform 1 DgAdv553ReadStatusRT to retrieve bus status make sure there is no bus error and remote terminal status which subaddresses received or transmitted data For example these two status words are most useful 304 PowerDNA API Reference Manual Release 4 0 st_list 0 DQ_L553_RT_RT TERMADDR DQ_L553_RT_DATA_RDY st_list 1 DQ_L553_RT_RT TERMADDR DQ_L553_RT_CHSTAT 1 DgAdv553ReadRT create a channel list for this call based on information as to which subaddresses received data from the previous step 2 To finish up call DqAdv553 Enable hd0 D DgAdv553WriteRT create a channel list including the subaddresses you need to update EVN FALSI E this call will disable all I O operations on the layer 4 25 32 DqAdv553ConfigEvents Syntax int DAQLIB DgAdv553ConfigEvents int handle uint32 param event uint32 rtsa Command int devn int channel Specify what asynchronous notification events user wants to receive from the layer Input int handle Handle to the IOM received from D
441. onal parameters depending on event type Output None Returns DQ_NO_MEMORY error allocating buffer LLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established BAD_DEVN device indicated by devn does not exist or is not an 1553 553 Configuration parameters are incorrect SEND_ERROR unable to send the Command to IOM oz Q_BAD_PARAMETER om Q_ TIMEOUT_ERROR nothing is heard from the IOM for Time out duration Q_TOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error 336 PowerDNA API Reference Manual Release 4 0 Description This function configures events to be sent from the layer The following events are defined Types of event typedef enum EV601_CLEAR 0x100 clear all events bus or RT controller event EV601_COUNT_COMPLETE Event when programmed count is reached end mode EV601_CRO_LESSTHEN Count is less than CRO EV601_CRO_EXCEEDED Count exceeded CRO EV601_CR1_EXCEEDED Count exceeded CR1 EV601_DATA_ AVAILABLE Data available in CRH CRL half period calculated EV601_INP_TRANSITION Input line transition detected EV601_GATE_TRANSITI
442. one at the beginning of each minor frame define SL553_PORT_BCSTS_MTD Memory access timeout was detected hardware error define SL553_PORT_BCSTS_RTR At least one RT in dead state replied with valid status define SL553_PORT_BCSTS_MF At least one Mode command w o data word failed 302 PowerDNA API Reference Manual Release 4 0 define SL553_PORT_BCSTS_MRBF At least one Mode TX define SL553_PORT_BCSTS_MBRF At least one Mode RX define SL553_PORT_BCSTS_RBF At least one RT gt BC define SL553_PORT_BCSTS_BRF At least one BC gt RT SL553_PORT_BCISRC fF Holds last ID of the BC sequence that called IRQ Reports ID for when interrupt Reports record when interrupt Reports record when interrupt define SL553_PORT_BCISRC_MRF3 23 define SL553_PORT_BCISRC_MRF_SH 16 define SL553_PORT_BCISRC_MFN7 15 define SL553_PORT_BCISRC_MFN_SH 8 define SL553_PORT_BCISRC_FRN7 7 define SL553_PORT_BCISRC_FRN_SH 0 SL553_PORT_BCERR ii hd GE L Last error code and last executed entry ID Error source code define SL553_PORT_BCERR_CODE15 31 define SL553_PORT_BCERR_CODE_SH 16 define SL553_PORT_BCERR_MFN7 15 define SL553_PORT_BCERR_MFN_SH 8 define SL553_PORT_BCERR_FRN7 7 define SL553_PORT_BCERR_FRN_SH 0 request the minor frame that was processed was requested inside of the major frame descriptor table was requested inside of the minor frame descripto
443. ons for RT and SA are encapsulated in DQ_L553_RT_SA RT SA macro lt trig_list gt is TBD 4 25 5 DqAdv553ConfigBMSetFilter Syntax int DAQLIB DgAdv553ConfigBMSetFilter int hd int devn int channel uint32 busmode uint32 f_size pDOBM553Filter pFilter Input 268 PowerDNA API Reference Manual Release 4 0 int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 busmode What to monitor bus A bus B or both buses uint32 f_size Size of the following filter list pDQBM553Filter pFilter Array of DQBM553Filter structures that defines filter for BM mode Output Returns DQ_NO_MEMORY error allocating buffer DQ_TLLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO DAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up a filter for Bus Monitor mode
444. or Description This function writes data to the FIFO and retrieves data back from the same device subsystem This function combines the functionality of DaCmdRdFifo and DqgCmdWrFifo in one call It produces one request and receives one reply packet The following structure is used in the process of exchanging a data stream between host and IOM DQCMD_WRRDFIFO typedef struct uint8 dev device uint8 ssw subsystem to write uint8 ssr subsystem to read uintl6 sizew amount of data to write uintl6 sizer amount of data to read uint8 datal DQWRRDFIFO pDQWRRDFIFO Note DQE doesn t use this call You can use this function to retrieve information from device with an input and output subsystem If you select DO_SSOIN as a subsystem to write the function uses DQ_SSOOUT as a subsystem to read In other words this function ignores the direction bit in subsystem definition 2 2 36 DqCmdWriteToFlashBuffer Syntax int DgCmdWriteToFlashBuffer int Iom uint32 Size uint8 Data uint32 CRC Command DQCMD_WRFLASH 0x15C Write Data to the Flash Update Buffer Input int Iom Handle to the IOM returned by DqOpenIOM uint32 Size amount of data to write bytes 0 to reset uint8 Data data to write uint32 CRC pointer to uninitialized CRC Output uint32 CRC Standard IEEE 802 3 CRC 32 va
445. or a channel number in c1 is too high DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function works using the underlying DqgReadAIChannel but converts data using internal knowledge of input range and gain of every channel It uses the DOCMD_IOCTL command with the DOIOCTL_CVTCHNL function under the hood When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it in accordance with the channel list supplied The function uses the preprogrammed CL update frequency 10Hz One can reprogram the update frequency by calling DgqCmdSetClk after the first call to D9Adv205Read Thus the user cannot perform this function call when the layer is involved in any streaming or data mapping operations If the user specifies a short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every call to the function returns the latest acquired data If one would like to cancel ongoing sampling call the same function with Oxffffffff as a channel number
446. orming this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up over and under current limits for each measured channel lt limited gt selects what value for what channel to set up IDs from 0 to 31 select over range limits for the channels 0 31 IDs from 32 to 63 select under range limits for the channels 0 31 lt limitvalue gt specifies desired current limit in Amps valid values are from 2 0A to 2 0A However the layer itself only supports 600mA of current per pit reverse current is a sign of incorrect connection and may cause layer failure Note 4 17 4 DgAadv432SetPWM Syntax int DqAdv432SetPWM int hd int devn uint32 period_us int count pDQDIOPWM settings Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM uint32 period_us PWM period length of the full cycle int count Number of DQDIOPWM entries PDQDIOPWM settings Structure defining PWM settings Output 209 PowerDNA API Reference Manual Release 4 0 Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 432 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when
447. ources DqRtVmapStop handle vmapid DqRtVmapClose handle vmapid 3 5 1 DqRtVmaplinit Syntax d int DgqRtDmapInit int handle int vmapid double refreshRate Input int handle Handle to the IOM double refreshRate Rate at which the IOM will refresh its version of the VMAP Output int vmapid Identifier of the newly created VMAP Return DQ ILLEGAL HANDLE invalid IOM handle DO NO MEMORY memory allocation error or exceeded maximum table size DO_SUCCESS command processed successfully Description Initialize the specified IOM to operate in DMAP mode at the specified refresh rate Dee e PowerDNA API Reference Manual Release 4 0 3 5 2 DqRtVmapAddChannel Syntax int DgqRtVmapAddChannel int handle int vmapid int dev int subsystem int cl int flags int clSize Input int handle Handle to the IOM int vmapid Identifier of the VMAP to configure int dev ID of the device where the channels are located int subsystem The subsystem to use on the device ex DQ_SSOIN gt SE Array containing the channels to add to the VMAP Int flags Array of flags one per channel Available flags are e DQ VMAP_FIFO_STATUS retrieve the state of the input output FIFO at each refresh of the VMAP int clSize Size of the channel array Return DQ_ILLEGAL HANDL
448. pecific fields and data For all types of events DOPKT dqCounter number of event on per channel per device basis 1 65535 dqCommand DQCMD_EVENT DQ_REPLY DQEVENT dev device number ss DQ_SSOIN event one of the event types described below size size of the following EV553_ID structure including data EV601_ID chan channel evtype event subtype Note 2 Maximum event rate is limited to 50us or 20kHz to avoid interrupt overrun If this interrupt rate is exceeded interrupt routine disables events and firmware status flag STS_FW is set to STS_FW_OVERLOAD 3 lt data gt in EV601_ID and lt param gt in the function call are reserved for the future extensions 4 26 22 DqAdv601WaitForEvents Syntax int DAQLIB DgAdv601WaitForEvents int hd int devn event 601_t event uint32 count uint32 crl uint32 crh uint32 sts uint32 tstamp Command Wait for the next CT 601 event to occur Input int handle Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 Output event601_t event Type of the received event uint32 count Content of count register 338 PowerDNA API Reference Manual Release 4 0 uint32 crl Content of low capture register uint32 crh Content of high capture register uint32 sts Content of status register uint32 tstamp Timestamp of event Retu
449. pleted data exchange DQ_eFrameDone 1L lt lt 1 One or more frames are filled with data DQ_eBufferDone 1L lt lt 2 Buffer is completed straight buffer only DQ_ePacketDone 1L lt lt 3 One or more packets with data has arrived DQ_eTransmitError 1L lt lt 4 Error encountered during transmission DQ_eReceiveError 1L lt lt 5 Error encountered during receiving DQ_eStarted 1L lt lt 6 Acquisition output started DQ_eStopped 1L lt lt 7 Acquisition output stopped DQ_eStartTrig 1L lt lt 8 Start trigger received DQ_eStopTrig 1L lt lt 9 Stop trigger received DQ_eBufferError 1L lt lt 10 Overrun under run event DQACB buffer only DQ_ePacketLost 1L lt lt 11 Error is unrecoverable one or more packets are lost DQ _eTimeOut 1L lt lt 12 Timeout no events received DQ_ePacketOOB 1L lt lt 13 Packet is out of bounds DQ_eStatusError 1L lt lt 14 Error detected by DQCMD_RDSTS sent by heartbeat DQ_eNoHeartReply 1L lt lt 15 IOM did not respond to heartbeat DQ _eAllEvents Ox3FFF all events mask DQ_eDat aAvailable is generated when the writer thread transfers any data from the ring buffer to the ACB This event can also be set when DMap operation completes a data exchange between host and IOM or when a Msg queue has received a message DQ_eFrameDone is set when incoming data crosses a frame boundary In reality it is the time when the writer thread has contiguous data in the
450. pletion Description This function copies received data into the user allocated buffer Note The allocated buffer should not be less than lt rq_size gt bytes 3 7 7 DqRtVmap nputFifoA vailable Syntax int DAQLIB DgqRtVmapInputFifoAvailable int handle int vmapid int device uint32 channel int available Command RT Input int handle Handle to the IOM returned by DqOpenIOM int vmapid VMap handle int device Device number 90 PowerDNA API Reference Manual Release 4 0 uint32 channel Channel number Output int available Amount of data available in the FIFO after VMap operation Return DQ_ILLEGAL_ENTRY vmapid is illegal DQ_TLLEGAL_HANDLE invalid non NULL value for iom DQ_ILLEGAL_INDEX Couldn t find index in the transfer table Zero or positive successful completion Description This function returns amount of data additionally available in the FIFO after VMap operation is completed in bytes Note If the request data size is zero but user still wants to see the amount of data it must use DQ_VMAP_FIFO_RQSIZE flag when channel is added Otherwise if the requested size is zero then the request to calculate amount of data available in the FIFO is ignored by the firmware 3 7 8 DqRtVmapOutputFifoAvailable Syntax int DAQLIB DgqRtVmapOutputFifoAvailable int handle int vmapid int device uint32 channel int available Command
451. port in DMap or ACB operations 2 Input subsystem is accessible in DMap mode and following channels are defined 0 31 input current for lines 0 31 raw 32 bit 32 63 input voltage for lines 0 31 raw 32 bit 64 over current status of port 0 65 over current status of port 1 66 actual value driven to port 0 written value less lines with tripped circuit breakers 67 actual value driven to port 1 206 PowerDNA API Reference Manual Release 4 0 4 17 2 DqAdv432SetAll Syntax d int DgAdv416SetAll int hd int devn pDQDIO432DATAOUT data Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM PDQDIO432DATAOUTN pointer to store input data from DIO 432 data Output Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 432 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function sets up most of DIO 432 433 configuration parameters To accomplish what the user must allocate initialize and pass a pointer to DODIO432DATAOUTN structure is def
452. portocs Over current interrupt status int32 portucs Under current interrupt status int32 adcsts Reports combined status of the ADC subsystem int32 adccfg 5 ADC configuration values int32 rdcnt Current value of the consecutive read counter setting DQDIO462DATAIN pDQDIO462DATAIN 216 PowerDNA API Reference Manual Release 4 0 cfg reports a list of the channels currently disabled by the circuit breaker Bits 31 16 are sticky they report whether the corresponding channel 15 0 was ever disabled since the last call to this function and bits 15 0 report currently disabled channels portout bits 11 0 reports the last values that were assigned to the output ports dissts bits 11 0 report the current disable status bits 23 12 report sticky status indicating a 1 if a channel has been disabled since the last DgAdv462GetAll portocs bits 11 0 contain a one for every channel for which an overcurrent condition was ever detected portucs bits 11 0 contain a one for every channel for which an undercurrent condition was ever detected adcsts report the combined status of the ADC system rdcnt number of overcurrent samples read from an ADC prior to disconnection 0 32 A higher number leads to longer delay and better noise spike immunity 4 19 3 DqAdv462SetAll Syntax d int DgAdv462SetAll int hd int devn pDQDIO462DATAOUT pdata Command DQE Input int hd Handle to the IOM received from DqOpe
453. present the currently supported reference voltages define DQ_DI0404_REF_3_3V 3 3 3 Volts define DQ_D10404_REF_5V 5 a YI Volts define DQ_DI0O404_REF_12V 12 12 Volts define DQ_DIO404_REF_24V 24 24 Volts define DQ_DI0404_REF_36V 36 36 Volts If a different reference voltage is desired use DqgAdv40xSetHyst to set the raw DAC values manually but be aware that due to the non linearity of the DACs there is no guarantee of what the resulting transition voltages will be 4 16 DNA DIO 416 layer 4 16 1 DqAdv416GetAll Syntax int DgAdv416GetAll int hd int devn pDQDIO416DATAIN data double fData Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM Output Return pDQDIO416DATAIN pointer to store all readable parameters from DIO 416 data double fData pointer to array of 16 doubles to store the current readings in amps Null if not required DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 416 200 PowerDNA API Reference Manual Release 4 0 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing
454. r illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 254 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error The function reads available auxiliary digital inputs Notes 172 PowerDNA API Reference Manual Release 4 0 4 9 15 DqgAdv254WriteDOut Syntax int DqAdv254WriteDOut int hd int devn uint32 dout uint32 din Command DQE Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 dout Digital output value Output uint32 din Digital input value Return DO NO MEMORY error allocating buffer DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 254 DQ_BAD_PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description The function writes available digital outputs and reads back auxiliary di
455. r each transfer chentry 0 flag DQ_VMAP_FIFO_STATUS DqRtVmapAddChannel handle vmapid DEVN DQ_SSOIN amp chentry amp flag 1 Add ouput port 0 to VMAP set flag to retrieve the status of the output FIFO after each transfer chentry 0 flag DQ_VMAP_FIFO_STATUS S763 PowerDNA API Reference Manual Release 4 0 DqRtDmapAddChannel handle vmapid DEVN DQ_SSOOUT amp chentry amp flag 1 Enable ARINC 429 ports DqAdv566Enable handle DEVN TRUE Start all devices that have channels configured in the VMAP DgRtVmapStart handle vmapid Prepare ARINC word to send through port 0 and update VMAP uint32 arincWord DqAdv5 66BuildPacket data label ssm sdi parity DqRtVmapAddOutputData handle vmapid 0 sizeof uint32 amp accepted uint8 amp arincWord Specify that we wish to receive up to MAX_WORDS words received by port 0 DqRtVmapRqInputDataSz handle vmapid 0 MAX_WORDS sizeof uint32 amp rx_act_size NULL Synchronize the VMAP with all devices DqRtVmapRefresh handle vmapid 0 Retrieve the data received by port 0 uint32 recvWords MAX_WORDS DqRtVmapGetInputData handle vmapid 0 MAX_WORDS sizeof uint32 amp rx_data_size kr avl size uint8 recvWords We can also check how much data was actually transmitted dutring the last refresh DqRtVmapGetOutputDataSz handle vmapid 0 amp tx_data_size amp tx_avl_size Stop the devices and free all res
456. r leads to longer delay but better noise spike immunity adcdata0 adcdatal results of user defined ADC conversion User may as an option define which channel at what speed he wants to acquire in addition to specifying that all channels will be acquired at a common speed This feature allows precise reading of the channel of interest virtually without slowing down circuit breaker performance By default data is returned in 24 bit straight binary format where OxFFFFFF corresponds to 2A and 0x0 to 2A of current disdiv divider for the 66MHz which defines the re enable interval for the auto retry channels set via cfg parameter The divider should be selected in such a way that the re enable interval is at least 2x longer than the expected circuit breaker reaction time see below dout current actual value of the digital output port Note that low side even channels will be inverted and that the output may differ from what was set in the portOout due to the circuit breaker activity vecis used to define presence of the user supplied power on the isolated side of the DIO 416 A 1 indicates presence of the user supplied power ocl binary array of the over current limits set for each channel individually uses same binary format as adcdata0 ucl binary array of the under current limits set for each channel individually uses same binary format as adcdata0 Under current limits may be used to define some potentially failing load and status of thi
457. r of the VMAP int trl_list Index of the VMAP entry Output unsigned char pointer to the beginning of the specified entry output VMAP mappedData buffer Return DQ_ILLEGAL_ HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DO_SUCCESS command processed successfully Description Get pointer to the beginning of the output data map allocated for the specified device 3 5 5 DqgRtVmapAddOutputData Syntax int DgRtVmapAddOutputData int handle int vmapid int trl_index uint32 data_size int act_size uint8 data Input int handle Handle to the IOM int vmapid Identifier of the VMAP to write to int trl_index Index of the VMAP entry to update int data_Size Size of the data buffer in bytes uint8 data Data to send to the VMAP Output int act_size Number of bytes actually sent to the VMAP Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Copies data into the output packet and returns number of bytes left in the packet 79 PowerDNA API Reference Manual Release 4 0 3 5 6 DgRtVmapGetOutputDataSz Syntax int DgqRtVmapGetO utputDataSz int handle int vmapid int trl_index int data_size int avl_size Input int handle Handle to the IOM int vmapid Identifier of the VMAP to write to int trl_index Index of the VMAP entry Output int data_size Number of
458. r table was requested command with data word failed command with data word failed transmission failed transmission failed Reports record inside of the major frame descriptor table when interrupt was requested Reports record inside of the minor frame descriptor table when interrupt was requested Please note that both VMap and VMap operations can be used to store retrieve data to the bus controller but only VMap can be used for the status fields To access bus monitor FIFO is enabled use DQ_1L553_BUSMON_DATA CH 4 25 30 Configuring DNx 1553 553 for Bus Monitor Mode First one or both ports of the layer need to be configured as follows 1 Set operation mode for the ch mode_0 DQ_L553_MODE_BM flags_0 DQ_L553_TRANSFORM ret DqAdv553SetMode hd0 annel R 2 Set configuration for bus monitor DqAdv553ConfigBM Typically bus mode is configured as follows busmode_0 DQ L553_BM_LSTN_A DQ_L553_BM_LSTN_B DQ2_L553_BM_ TX_BUS lt DQ_L553_STORE TS lt 2 DEVN CHAN mod e UD flags_0 either bus A or bus B ceiv DQ_L553_STORE 3 Enable operations DgAdv553 FLAGS lt Enable hd0 enables operations on both channels D timestamp receive flags EVN TRU E This function simultaneously In the data retrieval loop use DqAdv553RecvBMMessages to retrieve messages DgAdv553RecvBMMessag
459. r to an array of structures pDOSetClk float CloseFreq pointer to uninitialized variable user allocates buffer uint32 entries number of entries in pDQSetC1lk array Output float CloseFreq array of actual frequencies Hz uint32 entries pointer to actual number of entries set Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function programs layer clocks using the DOSETCLK structure The firmware selects the closest possible speed due to a division remainder of base frequency divided by requested rate The function returns the actual rate in CloseF req array DOCMD_SETCLK uses the following structure Multiple entries are allowed DQCMD_SETCLK typedef struct uint8 dev device number uint8 ss channel subsystem CVCL uint8 clocksel select clock trigger settings float frq DQSETCLK pDQSETCLK clocksel must contain one of the following bits Clock identifiers GER PowerDNA API Reference Manual Release 4 0 define DQ_LN_CLKID_DUTY1 1L lt lt 7 Duty cycle of
460. rameters for the AI 211 The user may configure as many parameters as he chooses Any parameter that is not enabled by a lt mask gt bit will retain its present value To accomplish AI 211 channel configuration the user must allocate initialize and pass a pointer to a PDQCFGCH_211 structure This structure is defined as typedef struct uintl6 channels channel select bits uint16 mask bitwise indicates which of the following struct fields are valid uint16 biasdrive set drive current for iepe sensors range 0 255 approx 0 8mA uintl6 biasonoff DQ_211_BIAS_O or DQ 211_BIAS_OFF uint16 comphi 12 bit comparison value for open sensor detection uint16 complo 12 bit comparison value for shorted sensor detection uintl6 alarmctrl led alarm control see defines below uint16 hpf high pass filters see defines below uint16 offset test mode uintl6 anafilt 48kHz filter DQ_211_ANALOG_FILTER_ON or DQ_211_ANALOG_FILTER_OFF uintl6 main_enb enable dataflow from main ADC see defines below uintl6 sec_enbs secondary enables 0 sec off 1 secondary ON uintl6 secn determine update rate for secondary led comparison converter DOCFGCH_211 pDOQCFGCH_211 lt channels gt flags indicate which channels should be written The following flags are defined define AI211_SEL_CHAN_0 0x01 define AI211_SEL_CHAN_1 0x02 define AI211_SEL_CHAN_2 0x04 define AI211
461. rate 26 0 lt level for the rotor coil from the datasheet ret DqAdv255SetMode hd0 DEVN CHANNEL mode flags float exc_rate float exc_level Mode Input external excitation DQ_AT255_MODE SI EXT DQ_AT255_MODE RI EXT Measure frequency and level on input D ret DgAdv255MeasureWF hd0 DEVN CHANNEL _COARS Gl E amp exc_rate amp exc_level amp exc_offs use excitation frequency measured on the rotor winding use excitation voltage measured on the rotor winding this information is required to estimate A D settings ret DgAdv255SetMode hd0 DEVN CHANNEL mode flags exc_rate exc_level Mode Output internal excitation DQ_AT255_MOD SS INT CG F E Tt G D DQ_AT255_MOD RS INT exc_rate exc_level adc_rate 400 0 lt excitation frequency is the same for both calls 26 0 lt level for the rotor coil 0 gt returns actual sampling rate ret DqAdv255SetExcitation hd0 DEVN CHANNEL_SIM exc_level DQ_AT255_ENABLE_EXC_D D channel only exc_rate exc_level amp adc_rate 11 8 lt level for the stator coils from the datasheet ret DqAdv255SetMode hd0 DEVN CHANNEL SIM mode flags float exc_rate float exc_level Mode Output external excitation DQ_AT255_MODE SS EXT DQ_AT255_MODE RS EX
462. rate specified in DqRtDMapCreate This function needs to be called periodically a real time OS is necessary to synchronize the host and IOM data maps 3 4 16 DqRtDmapRefreshOutpouts Syntax int DgqRtDmapRefreshOutputs int handle int dmapid Input int handle Handle to the IOM int dmapid Identifier of the DMAP to refresh Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_SUCCESS command processed successfully Description This function initiates a DMAP refresh by sending the output values to the IOM and returns immediately You need to call DgRtDmapRefreshInputs to complete the refresh and retrieve the input values from the IOM Note The pair DgRtDmapRefreshOutputs DqRtDmapRefreshInputs can be used instead of DqRtDmapRefresh This frees the task to do something useful while the DMAP refresh packets are transferred in the background 74 PowerDNA API Reference Manual Release 4 0 3 4 17 DqRtDmapRefreshIinputs Syntax int DgRtDmapRefreshInputs int handle int dmapid Input int handle Handle to the IOM int dmapid Identifier of the DMAP to refresh Return DQ_ILLEGAL HANDLE invalid IOM handle DO SUCCESS command processed successfully Description This function completes a DMAP refresh initiated with DgRtDmapRefreshOutputs retrieving the input values returned by the IOM You nee
463. rce Syntax int DgAdvSetTriggerSource int hd int devn uint32 trigger uint32 source uint32 edge 371 PowerDNA API Reference Manual Release 4 0 Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM uint32 trigger DQ_EXT_START_TRIG select source for a start trigger DQ_EXT_STOP_TRIG select source for a stop trigger uint32 source DQ_EXT_TRIGIN default setting EXT DIO2 DQ_EXT_BURST burst clock TMR1 DQ_EXT_EXTO line EXTO source need to be selected DQ EXT_EXT line EXT source need to be selected DQ_EXT_SYNCO SYNCx interface line DQ_EXT_SYNC1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 uint32 edge DQ_EDGE_RISING DO EDGE _ FALLING Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist DQ_BAD_PARAMETER trigger source or edge has a value other than the appropriate constants listed above DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function selects an external clock source for start and stop trigger Note T
464. rd IRQ request define SL553_PORT_IR_OTS 1L lt lt 5 Mode command Override selected transmitter shutdown received with data word IRQ request define SL553_PORT_IR_DBC 1L lt lt 4 Mode command Dynamic bus change request received in mode command define SL553_PORT_IR_DBA 1L lt lt 3 Mode command Dynamic bus change request accepted define SL553_PORT_IR_MDS 1L lt lt 2 Mode command SYNCHRONIZE request received in mode command define L553_PORT_IR_ITF 1L lt lt 1 Mode command Inhibit terminal flag define SL553_PORT_IR_RRT 1L lt lt 0 Mode command Reset remote terminal by mode comand all RTs are resetted 4 25 16 DqAdv553ConfigBC Syntax int DAQLIB DgAdv553ConfigBC int hd int devn int channel uint32 bc_mode uint32 option_flags double MJ_clock double MN_clock Input 282 PowerDNA API Reference Manual Release 4 0 int hd Handle to the IOM received from DqgOpenIOM int devn Device number int channel Channel 0 or 1 uint32 be mode What bus to use bus A bus B or both buses uint32 option_flags BC configuration flags double MJ_clock Major clock Hz double MN_ clock Minor clock Hz Output Returns DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t establis
465. rd from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOQ_SUCCESS successful completion Other negative values low level IOM error Description This function defines parameters of operation for remote terminal mode lt rt_mode gt is a combination of flags define define define define define define DQ_L553_RT_TX_A DQ_L553_RT_TX_B DQ_L553_RT_LSTN_A DO L553 _RI_LSTN_B DQ_L553_RT_RX_CMD DOQ_1L553_RT_DEFER_E In most circumstances both buses should be enabled for both transmitting and listening An RT replies on the same bus a command came from A Bus Controller can force a disable of one of the buses if it 1L lt lt 0 listen bus A 1L lt lt 1 7 listen bus B 1L lt lt 2 enable transmission on bus A 1L lt lt 3 enable transmission on bus B 1L lt lt 29 return CMD and STS before the data 1L lt lt 30 defer enabling of RT upon realtime keeps transmitting garbled information If enabling of RTs is deferred upon entering realtime mode using Do_L553_RT_DEFER flag Oe upon VMaps are operational use a DQ_L553_RTS_RT for each channel If the Do_1553_RT_Rx_cMpD flag is selected VMap operation adds command and status information associated with an Rx command before retrieving actual data This information occupies four uint16 words and contains the following command status command if RT RT command was executed
466. re The PowerDNA cube then automatically switches all layers into configuration mode In configuration mode data acquisition is not running and the user can set up acquisition parameters Also the user can use the DOCMD_IOCTL based command to retrieve input voltages or set output voltages on a scan by scan basis Before entering configuration mode the firmware reads all parameters of the operating mode stored in EEPROM configuration channel list clock and trigger settings etc processes it and stores it in the operating mode current parameter set In other words by switching the layer into operation mode the PowerDNA cube can start data acquisition right away with previously stored parameters Switching the layer back into configuration mode stops the data acquisition process The user can switch a layer between configuration and operation modes as many times as needed If the user switches the layer into shutdown mode the firmware retrieves the output levels of layer outputs and sets up output voltages The unit can enter shutdown mode automatically upon watchdog timeout expiration Once a unit is in shutdown mode only DOCMD_RST can return it into configuration mode Mask is a bitmask representation in which every bit represents a layer For example to switch Layer 2 into initialization mode the mask should be 1 lt lt 2 4 Note None 39 PowerDNA API Reference Manual Release 4 0 2 2 46 DgqCmdSetReplyMa
467. re int devn layer ID int ss subsystem uint32 flags configuration flags float rate requested clock rate for the device float actual returns the actual clock rate for the device Output float factual address of this entry in the device map Return DQ_ITLLEGAL HANDLE invalid pBcb or pBcb is not a M3 DQ_BAD_DEVN no device at given index or device does not support M3 mode DQ BAD PARAMETER bad value for other parameter DQ_NOT_ENOUGH_ROOM translation list size is too big DQ_DEVICE_BUSY pBcb is busy DQ_SUCCESS successful completion Other negative values low level IOM error Description Sets the configuration flags and clock rate for a device in mapped messaging mode Note None 3 9 6 DgMmRecvMessage Syntax int DgqMmRecvMessage pDQBCB pBcbh pDqMessage message int gotMsg uint32 avail Command DQE Input PDOBCB pBcb pointer to Msg queue pDqMessage messag DqMes sage structure in which to store the received message The dat aSize field should indicate the amount of allocated space in the data field 99 PowerDNA API Reference Manual Release 4 0 int gotMsg pointer to receive value indicating whether a message was received from the queue uint32 avail pointer to receive the number of messages still in the receiving message queue Output pDqgMessage messag The data field is filled with the received message The dataSize field s value is set to the data s actual size int gotMsg returns TRUE if a message was retr
468. red in the background 82 PowerDNA API Reference Manual Release 4 0 3 5 13 DqRtVmapRefreshinputs Syntax int DgRtVmapRefreshInputs int handle int vmapid Input int handle Handle to the IOM int vmapid Identifier of the VMAP to refresh Return DQ_ILLEGAL HANDLE invalid IOM handle DO SUCCESS command processed successfully Description This function completes a VMAP refresh initiated with DgRtVmapRefreshOutputs retrieving the input values returned by the IOM You need to call DgRtVmapRefreshOutputs first to initiate the refresh and send the output values to the IOM Note The pair DgRtVmapRefreshOutputs DqRtVmapRefreshInputs can be used instead of DqRtVmapRefresh This frees the task to do something useful while the VMAP refresh packets are transferred in the background 3 5 14 DqRtVmapClose Syntax int DgqRtVmapClose int handle int vmapid Input int handle Handle to the IOM int vmapid Identifier of the VMAP to close Return DQ_ILLEGAL HANDLE invalid IOM handle D I SUCCESS command processed successfully Description This function frees all resources allocated by the VMAP operation on the specified IOM 3 6 Real time Variable size Data Variable channels Mapping VMap Functions Variable data variable channel mode of mapping is required for layers with large number of possib
469. ring buffer and transfers it into ACB In case of an output operation a reader thread takes data from ACB converts it and writes it into the output ring buffer Thus at the beginning of output operation a DQ_eFrameDone event is set quite often when data is transferred from an ACB to the empty ring buffer DQ_eBufferDone is set in a Single mode ACB when the buffer becomes full on input or empty on output Normally DOQ_eBufferDone is accomplished with the DQ_eStopped flag DQ_ePacketDon not implemented DQ_eTransmitError isa NIC or TCP IP transmit error DQ_eReceiveError is a NIC or TCP IP receive error DQ_eStarted is set when IOM starts operation not implemented in revision 2 DQ_eStopped is set when IOM stops operation not implemented in revision 2 DQ_eStartTrig is set when start trigger event occurred either in hardware or in software reaching triggering conditions not implemented in revision 2 DQ_eStopTrig is set when start trigger event occurred either in hardware or in software reaching triggering conditions not implemented in revision 2 DQ_eBufferError is set upon buffer overrun input Cycle mode or buffer underrun output Cycle mode condition DQ_ePacket Lost is set when one or more packets are unrecoverably lost 103 PowerDNA API Reference Manual Release 4 0 e DQ _ePacketOOB is set when packet received by host is so
470. rite status to and size DQ_L553_RT_TX_VECTOR RT specify RT to update vector word information for this RT If a user would like to set status reply bits for the terminal he should set flag po_1553_RT_sET_sTATUS or use DQ_L553_RT_TX_STS RT and use the following bits L553 _RT_CFGO_TF L553 RT CG SE ii if terminal should always set TF bit in status word 11 L553_RT_CFGO_BSY 1L lt lt 3 11 1i if terminal should always set SF bit in status word if terminal should always set BUSY bit in status word if broadcast RX commands are accepted 1 if SR bit should be set in the status word L553_RT_CFGO_BSRE L553_RT_CFGO_SR OY U tt Gi EI lt data gt is an array of the pointers to 16 bit arrays of data allocated for each subsystem This approach allows the user to allocate memory for each sub address in use and then change data in the memory instead of re assembling data every time he needs to update sub address data 4 25 14 DqAdv553ReadRT Syntax int DAQLIB DgAdv553ReadRT int hd int devn int channel uint32 rt size uint32 rtsa_list uintl6 data Input int hd Handle to the IOM received from DqgOpenIOM int devn Device number 278 PowerDNA API Reference Manual Release 4 0 int channel Channel 0 or 1 uint32 rt_size Size of the following RT SA list uint32 rtsa_list Array of RT SA to read from ui
471. rmally set to zero Notes To write an angle from 0 to 2 Pi Rad use the DgAdv25Write function 4 10 12 DqgAdv255ReaaqDIn Syntax int DqAdv255ReadDIn int hd int devn uint32 din Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM Output 188 PowerDNA API Reference Manual Release 4 0 uint32 din Return DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_D DQ BAD PAR DQ_SEND_ERROR DQ_TIMEOUT DQ_TOM_ER DQ_SUCCESS Other negative values Description Digital input value error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 255 Configuration parameters are incorrect unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error The function reads available auxiliary digital inputs Notes 4 10 13 DqAdv255WriteDOut Syntax int DqgAdv255WriteDOut int hd Command DQE Input int hd int devn uint32 dout Output wants2 dan Return NO_MEMORY LLEGAL_ HANDLE om Q_ Q_BAD_DEVN cm Q_ Q_ BAD_PARAMETER SEND_ERROR TIMEOUT_ERROR Q_IOM_ERROR DQ_SUCCESS Other negative values
472. rn DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established 183 PowerDNA API Reference Manual Release 4 0 DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description Read the calculated angle or special data for selected channels Special channels are defined as follows DQ_AT255_ANGLE_CAL DQ_AT255_ACCEL_CAL 0x00 calibrated angle 0x10 calibrate acceleration DQ_AI255_STATUS 0x18 current status information DQ_AI255_RAW_DATA 0x20 raw position DQ AI255_ZC 0x30 number of counts for both half periods DO AI255_LAST_X 0x4C results of the last conversion A thru C 0x5C last accumulated value from A D A thru C 0x6C minimum reading A thru C 0x7C maximum A thru C DQ_AI255_LAST_Sx DQ_AI255_MIN_X DQ_AT255_MAX X Bits for A D A C occupy bits 3 2 in the channel entry for example entry channel ADC lt lt 2 DQ_AT255_LAST_Sx User has to add th
473. rnal source over S YNCx lines define L553_PORT_BCCFG_EMJC 1L lt lt 14 283 PowerDNA API Reference Manual Release 4 0 Use CLI CV clock as the minor clock BCMRD will be disabled This flag is required if the major frame clock is derived from the external source over SYNCx lines define L553_PORT_BCCFG_EMNC 1L lt lt 13 Bus Controller verification parameter late response limit in uS default is 20uS if the field is left empty define SL553_PORT_BCCFG_BCLATE N N amp 0x1 lt lt 8 Enable debug FIFO to monitor all commands sent on the bus by the Bus Controller define SL553_PORT_BCCFG_BCRTE 1L lt lt 5 Define early response limit in uS define SL553_PORT_BCCFG_BCEARLY N N amp 0x1 lt MJ_clock gt is a frequency of the major frame clock in Hz lt MN_clock gt is a frequency of the minor frame clock in Hz A Bus Controller organizes data exchange into major and minor frames Each major frame can consist of 256 minor frames inserted in an arbitrary order However there are only sixteen types of minor frames This organization is typical for MIL 1553 bus operation when minor frames are executed within major frames at different update frequencies To perform an update every 50mS frame 1 25mS frame 2 and 12 5mS frame 3 only three types of frames are required arranged in the sequence 1 3 2 3 empty 3 2 3 In this arrangement a major frame clock should be set to 20Hz 50mS a
474. rns DQ_NO_MEMORY error allocating buffer DQ ILLEGAL illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ_BAD_PARAMETE Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR No event was received for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function waits for the next 601 event to occur It returns the content of registers as well as timestamp at the time the event occurred It returns DQ_TIMEOUT_ERROR if no event occurred within the time delay specified in DqRtAsyncOpenIOM 4 27DNA QUAD 604 layer DgAdv604StartCounter int DgAdv604StartCounter int hd int devn int counter 4 27 1 Syntax Command DQE Input int hd int devn int counter Output None Return DQ_ILLEGAL_HANDLE DO BAD DEVN DO DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR Handle to IOM received from DqOpenIOM Layer inside the IOM Counter number 0 3 illegal IOM Descriptor or communication wasn t established device indica
475. rom 0x20 to 0x2c return under the limit settings for abovementioned channels Channel 0x30 is a direct write read to from LED register i e write occurs upon command execution Channel 0x31 is a direct write read into configuration register Channels 0x32 and 0x33 have similar functionality however the actual read write is performed by a periodic supervisor routine define DO L DNRP_LED_CH 0x30 direct R W to LED register define DQ_L2_DNRP_FAN_CH 0x31 direct R W to CFG register define DO L2_DNRP_LED_MNGD 0x32 managed R W to LED register define DQ_L2_DNRP_FAN_MNGD 0x33 managed R W to CFG register Note None 4 30 2 DqAdvDnrpSetContig Syntax int DqAdvDnrpSetConfig int hd int devn uint32 action uint32 config Command IOCTL 356 PowerDNA API Reference Manual Release 4 0 Input int hd int devn uint32 action uint32 config Output None Return DQ_NO_MEMORY DQ_ILLEGAL_HANDLE DQ_BAD_DEVN DO DAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ SUCCESS Other negative values Description Handle to the IOM received from DgOpenIOM Layer inside the IOM What to set DQ_L2_SET_CONFIG set configuration Fan off and 24V off uint32 DQ_L2_SET_LED set LEDs uint32 DQ_L2_ SET _LIMITS set over and under limits l6o uint32 16 uint32 pointer to the d
476. ror Description This function configures the counter to connect an alternate clock source to either the timebase or prescaler registers The following clock sources are allowed for the timebase register DQ_EXT_SYNCO sync bus 0 DQ_EXT_SYNC1 sync bus 1 DQ_EXT_SYNC2 sync bus 2 335 DQ_EXT_SYNC3 DQ_STR_GT1 D or DQ_PL_601_BASE 66MHz PowerDNA API Reference Manual Release 4 0 sync bus 3 debounced gate pin lt default value The following clock sources are allowed for the prescaler register DQ_EXT_SYNCO DQ_EXT_SYNC1 DQ_EXT_SYNC2 DQ_EXT_SYNC3 0 or DQ_PL_601_BASE 66MHz Note sync bus 0 sync bus 1 sync bus 2 sync bus 3 lt default value This function must be called after the DgAdv601CfgFor function or DqAdv601ConfigCounter function Set up all other CT 601 sync routing e g DqAdvRouteSyncIn DgCmdSetSyncRt before calling this function 4 26 21 Syntax DqgAdv601ConfigEvents int DAQLIB DgAdv601ConfigEvents int hd int devn int channel event601_t event uint32 mode uint32 param Command Specify what asynchronous notification events user wants to receive from the layer Input int handle Handle to the IOM received from DgOpenIOM int devn Device number int channel Channel 0 or 1 event601_t event Event type uint32 mode A parameter that defines sub event uint32 param Up to seven additi
477. rpSyncRt has an illegal value DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DOr SUCCESS successful completion Other negative values low level IOM error Description This command sets the sync and pll interface when using the simplified DqAdvRoute command series Run this command after all DgAdvRoute commands are complete Note 4 32 13 DqAdvLayerAccessDio Syntax int DgAdvLayerAccessDio int hd int devn uintl6 config uintl6 d_out uint32 d_in 369 PowerDNA API Reference Manual Release 4 0 Command DQE Input int hd int devn uinti config uintl6 d out Output uint32 d_in Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ_SUCCESS Other negative values Description Handle to the IOM received from DgOpenIOM Layer inside the IOM select bits to enable and their direction data to be sent to dio output pins dio state illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or the layer does not support this operation unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion
478. rs like in the RT SA list uint32 data_size Size of the following RT SA data uint16 data Pointer to the array of data Output 275 PowerDNA API Reference Manual Release 4 0 uint32 written Number of uint16 written into the buffer uint32 remains Size of the buffer available after data is written Returns DQ_NO_MEMORY error allocating buffer DQ_TLLEGAL_ HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DO BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_ITOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function writes data to RT SA buffer memory defined in DqgAdv553ConfigBufferRT The number of uintl16 words written is returned in lt written gt The number is always either a multiple of uintl6s of the lt xx_scan_size gt or full messages if lt xx_scan_size gt is Zero 4 25 12 DqAdv553ReadRT Buffer Syntax int DAQLIB DgAdv553ReadRTBuffer int hd int devn int channel uint32 rt_sa uint32 rq_size uint
479. rs this command has a channel list uint 32 as an argument and returns converted data 42 PowerDNA API Reference Manual Release 4 0 AI 201 data size uint16 raw AI 225 data size uint32 raw AI 205 data size uint32 raw AO 302 data size uint 16 raw An analog output layer AO 302 accepts uint16 values of all eight channels in an IoIn gt arg IoOut gt arg array An AJI 205 also executes DQIOCTL_SETFILTER command and loads stored values using DQCMD_WRFIFO command into an FIR filter Note None 2 2 50 DqCmdGetCapabilities Syntax int DgCmdGetCapabilities int Iom uint8 Layer int moredata char info Command DQCMD_GETCAPS 0x190 Returns capabilities of the requested layer Input int Iom Handle to the IOM returned by DqOpenIOM uint8 Layer layer ID int moredata pointer for more data flag char info buffer no less than DO_MAX_PKT_SIZE bytes Output int moredata more data flag char info device capabilities information as text data Return DQ ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative valu
480. rt is the same for all layers You have to call DOCMD_SAVEPRM with proper device identification to flash RAM data into the layer EEPROM or IOM flash sector If you need to change something layer specific call this function with LMPRM_BYOFF S code and specify the offset of the data to be written Note None 2 2 52 DgqCmdSetTrigger Syntax int DgqCmdSetTrigger int Iom pDOSETTRIG pDQSetTrig uint32 entries Command DQCMD_SETTRIG 0Ox1A0 Set trigger parameters Input int Iom Handle to the IOM returned by DqOpenIOM pDOQSETTRIG trigger settings pointer to an array of structures pDQSetTrig uint32 entries number of entries in pDQSetTrig Output uint32 entries actual number of entries sent Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS if the Command is processed successfully 45 Note PowerDNA API Reference Manual Release 4 0 Other negative values low level IOM error Description This function sets the triggering parameters for one or more devices typedef struct DOSETTRIG structure is defined as follows uint8 dev device uint8
481. s number of samples from this channel DQSETTRL pDQSETTRL Pass the size of array of DOSETTRL structures in ent ries Also if offset is not NULL function stores addresses of points of data in the host memory Note 1 Maximum size of the device map is limited to 512 bytes for 576 bytes packets and 1456 bytes for 1518 bytes Ethernet packets thus of f set couldn t be bigger then this number Multiple packets are not supported 2 This function is formerly known as DgDmapMultipleEntries 3 4 Real time Data Mapping Dmap Functions DMAP is one of the operation modes of PowerDNA It continuously refreshes a set of channels that can span multiple layers at a specified rate paced by the cube s hardware clock At each clock tick the cube s firmware scans the configured channels and stores the result in an area of memory called the DMAP The host PC keeps its own copy of the DMAP that it synchronizes periodically with the PowerDNA cube s version of the DMAP This mode is very useful when the host computer runs a real time operating system to ensure that the host refreshes its DMAP at deterministic intervals It optimizes network transfer by packing all channels from multiple layers in a single UDP packet reducing the network overhead The current low level PowerDNA API DqDmap functions uses the DqEngine to refresh the DMAP at a given rate and to retry DMAP refresh request if for some reason a pack
482. s not affect the circuit breaker portucm bits 11 0 contain a one for every channel that should be included into the under current status portocs rdcnt number of overcurrent samples read from ADC prior to disconnection 0 32 A higher number leads to longer delay but better noise spike immunity Adccfg 5 Normally the ADC converters use a default configuration that sets up the ADC converter settings for operation that works well for most applications This setting is included in case the ADC settings ever need to the changed to accommodate special applications Please refer to LTC2486 documentation for details dcdccfg divider for the internal 66MHz clock which defines the frequency of the DC DC converters that powers the ADC subsystem This value and the following value dcdcx 4 are normally changed together as a set In the event that these values need to be adjusted compatible settings will be provided by UEI in order to prevent damage to the unit dcdcx 4 duty cycle and phase control for the ADC subsystem DC DC converters 4 19 4 DqAdv462SetLimit Syntax int DgAdv462SetLimit int hd int devn int limitid double limitvalue Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int limitid Select Over or Under range limit to set 0 11 over range limits for channels 0 11 218 PowerDNA API Reference Manual Release 4 0 16 27 under range limits for cha
483. s verification is reported in portOucs adc result of the last ADC conversion on all channels uses same binary format as adcdataO cur result of the last ADC conversion on all channels calibrated and converted into the microvolts Values above below 2000000uV indicate ADC or channel failure ADC Speed selection constants note that faster ADC speed also reduces accuracy Code ADC speed Rate channel p p noise Break time mS mA 2A 4 decision samples define DQ_L416_ADCSPD_190 1 3 52KHz 190Hz ch 5 5 20 define DQ_L416_ADCSPD_130 2 1 76KHz 130Hz 5 25 define DQ_L416_ADCSPD_85 3 880Hz 85Hz 3 6 40 define DQ_L416_ADCSPD_45 4 440Hz 45Hz 2 9 70 define DQ_L416_ADCSPD_22 5 220Hz 22Hz 1 25 130 define DQ_L416_ADCSPD_12 6 110Hz 12Hz is 250 define DQ_L416_ADCSPD_6_5 7 55Hz 6 5Hz 0 84 500 define DQ_L416_ADCSPD_3 2 8 27 5Hz 3 2Hz OSAT 1000 define DQ_L416_ADCSPD_1_6 9 13 75Hz 1 6Hz 0 36 2000 define DQ_L416_ADCSPD_0_8 15 6 875Hz 0 8Hz 0 26 4000 4 16 2 DqgAdv416SetAll Syntax int DgAdv416SetAll int hd int devn pDQDIO416DATAOUT pdata Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM Output 202 PowerDNA API Reference Manual Release 4 0 D data Return DQ_ILL DQ_BAD_DEVN DODIO416DATAOUT EGAL HANDL S pointer to the structure
484. seconds Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a SL 501 DO DAD PARAMETER invalid parameter DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets the length of time the receive FIFO should wait before flushing the buffer and sending data to the host Time is in milliseconds with a max of 65535 Note None 4 21 7 DqAdv501SetTermString Syntax int DgAdv501SetTermString int hd int devn int chnl uintl6 len uint8 buf Command DQE Input int hd handle to the IOM received from DgOpenIOM int devn layer inside the IOM int chnl device channel uint16 len length of termination string uint8 buf pointer to termination string Output 225 PowerDNA API Reference Manual Release 4 0 None Return DQ_SEND DQ TIMEOUT DQ_IOM_ERRO DQ_SUCCESS V DQ_BAD_PARAMETER R T DQ_NO_MEMORY DQ_TLLEGAL_ HANDLE DQ_BAD_DE ERROR ve Other negative values Description error allocating buffer illegal IOM Descriptor or commu
485. sed in the IOM status as well The 2nd uint32 of the JOM status only contains flags that indicate errors discovered during POST not implemented for firmware revisions 3 4 and below define STS_POST_MEMERR 1L lt lt 0 Memory test failed define STS_POST_EEPROM_CHK EPROM read failed a define STS_POST_LAYER_FAILED 1L lt lt 2 Layer failure define STS_POST_FLASH_FAILED 1L lt lt 3 Flash checksum error define STS_POST_SDCARD_FAILED 1L lt lt 4 SD Card is not present define STS_POST_DC24 1L lt lt 5 DC gt 24 layer failed define STS_POST_DCCORE 1L lt lt 6 Core voltages problem T Note that when either the EEPROM_CHK or LAYER_FAILED flag is set the STS_FW_EEPROM_FAIL or STS_FW_GENERAL_FAIL flag respectively will also be set in the appropriate layer s status 19 PowerDNA API Reference Manual Release 4 0 Note 1 Use device l 0x80 to indicate that this is the last device in the list 2 IOM reads the status registers of the specified devices only 3 The DqVT packet can contain more entries but the number of devices per IOM is limited to 8 4 Use DeviceNum entry of 0x7F to get the status of the IOM itself 5 Use DeviceNum entry of 0x7E to get the status of IOM followed sequentially by all devices present this must be the only value used and the result is always 128 bits per device regardless of subsystem count Each error bit for a device
486. served int enable TRUE to enable channels int CLSize Size of the supplied channel list GN Channel list Output None Return DO _NO_MEMORY error allocating buffer DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function enables disables operations for the channels specified in the channel list This function should be called after DgAdv255SetMode in point to point mode Channel list should be NULL if enable FALSE Notes This function should not be used in DMap mode 4 10 7 DqAdv255GetExcitation Syntax int DqAdv255GetExcitation int hd int devn uint32 channel uint32 config double exc_rate double exc_level double ADC_rate uint32 sine_points Command DQE Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 config Reserved uint32 channel Channel of interest 182 PowerDNA API Reference Manual Release 4 0 double exc_ra
487. short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every next call function returns the latest acquired data If one would like to cancel ongoing sampling call the same function with Oxffffffff as a channel number Note None 4 2 DNA AI 205 layer 4 2 1 DgAdv205Read Syntax int DgAdv205Read int hd int devn int CLSize uint32 cl uint32 bData double fData Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize number of channels uint32 eel pointer to channel list uint32 bData pointer to store calibrated binary data double fData pointer to store calibrated voltage data NULL if not required Output int32 eeh channel list uint32 bData calibrated binary data double fData calibrated voltage data Return DQ_NO_MEMORY error allocating buffer 118 PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AJ 205 DQ_BAD_PARAMETER CLSize is not between 1 and DOQ_MAXCLSIZE bData is NULL
488. sion of the gate pin RUE to use trigger RUE to use external trigger source only w a triggered mode TRUE to use auto clear at the end of the count only w a triggered mode TRUE gate line as hardware gate on the prescaler enabled when high or gie inverts TRUE to enable re load continuous operation One of the DO EM SN end mode constants Output parameter that receives the configuration value Di T T T T the configuration value illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up the configuration for a counter in a 601 layer for a half period capture to measure waveform width For an extended parameter description see DqAdv601ConfigCounter Note None 4 26 17 DqAdv601CfgForPeriodMeasurment Syntax int DgAdv601CfgForPeriodMeasurment int hd int devn int counter int startmode int pce int tbr int dbg int dbc int iie int gie int trig int trs int enc int gated int re int end_mode 331 PowerDNA API Reference Manual Release 4 0 Command DQE
489. ss of exchanging a data stream between host and IOM DQCMD_WRFIFO and DQCMD_RDFIFO typedef struct uint8 dev uint8 ss uintl6 size uint8 data DQOFIFO pDOFIFO Note The maximum data size is 514 bytes pDOFifo gt data must be at least pDOFifo gt size bytes in size ACB operations performed by DQE are based on exchanging DOCMD_RDF IFO packets Please see User Manual for internal workings of DQE 2 2 35 DqCmdWriteReadFIFO Syntax int DgqCmdWriteReadFIFO int Iom PDQWRRDFIFO pDQWrRdFi fo Command DQCMD_WRRDFIFO 0x158 Write Data to the Device FIFO and read it back Input int Iom Handle to the IOM returned by DqOpenIOM pDQWRRDFIFO pointer to input output data pDQWrRdFifo Output pDOWrRdFifo gt sizew number of bytes actually written pDOQWrRdFifo gt sizer number of bytes actually read pDQWrRdFifo gt data data from the device Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_TOM_ERROR error occurred at the IOM when performing this command 29 PowerDNA API Reference Manual Release 4 0 DO SUCCESS if the Command is processed successfully Other negative values low level IOM err
490. stablished device indicated by devn does not exist or is not a DIO 403 unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function returns the input status of all DIO 403 ports regardless of state Note Use DI0403_1 ENPORTx in DgqAdv403SetIo to select inputs and outputs 4 15 DNA DIO 404 406 layers 4 15 1 Syntax int levelO Command DQE Input int int int hd devn ref_volts float leveld Output float levell float leveld Return float levell LL DO EVN EGAL HANDLE DQ_BAD_D DqAdv404SetHyst int hd float levell DQ_S DQ_BAD_PARAMETE END_ERROR DQ_T IMEOUT_ DO OM_ERROR DQ_S UCCESS ERROR DqAdv404SetHyst int devn int ref_volts float Handle to the IOM received from DqOpenIOM Layer inside the IOM One of the DQ_DIO404_REF_ constants indicating the reference voltage that will be applied Pointer to the desired level 0 voltage Pointer to the desired level 1 voltage Returns the actual level 0 voltage set returns the actual level 1 voltage set illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a
491. sucdachedese 287 Bet ENTREE e TE 288 ste SS SWVC BC Cis E 290 Bee oS SRCAIB EE 293 Do Adv ee ET 294 Bet ET 296 Do AGV SS SBC DGBIG WEE 297 De AGM SS SUN MOT E 298 De AV Ee EE 300 DgAdv553ReadRAM DqAdv553WriteRAM cece eeeeeeeeeeeeeeeneeeeeeeeennneeeeeeeee 300 DqRtVmapAddOutputChannelData for DNX 1553 553 0000 eee eee eeeeeeeeeeeeee 301 DqRtVmapRalnputChannelData for DN 13 bb 301 Configuring DNx 1553 553 for Bus Monitor Mode 303 Configuring DNx 1553 553 for Remote Terminal Mode 304 Eet ie eeler 305 DaRtAsync553 Write EE 315 DqRtAsync553ReadRT WE 316 DNA CT 601 laye fcii aaiae netara erea suc eaaa daaa a aaaea se 317 Ee ie RRE EE 317 DqAdv601GetRegister Sis ecestess cies Sheen eels eh Olea ate ee nenene 317 CAO TEA NN sh ee or ee a Te eh ah a ue ce riri 318 PAGO TIE SAB PA TEE 319 Ee ie RRE n 319 DqAdv601StopCounter aac cece cleat is a ead a ere a sae neeme 320 BoAGVG01 ClearC E 320 ere IER 6 emer er anree rra a arene E a OCe ner REE E RE reer ETS 321 DOAGVGO SELC Meme Gl Gi ares ey ia ee ey Seer e e ase cae 322 DqAdv601ReadRegisterValue ceecccceeeeesseecceeeeeeseeeeeeeeeesnsseceeeeeseeesnneeeeeeeess 322 DgAdv601WriteRegisterV alu eceecccceeeeesseeceeeeeeesseeeeeeeeeesseeeeeeeeneeessnneeeeeeess 323 POACVGOT CONG le 324 Do chy GO CGrTgtortG eneraltCoumtmg uk NEEN 327 DoAdv601 CigForBinGounte nic ccc ccs ees ete eta eae te ee ade es een ea 328 DaeAdvG0TCigrorQuadratures EE 329 DqAdv601C
492. sult of the user defined conversion on High side ADC int32 disdiv Current value of the re enable divider int32 dout Actual value driven by the DOUT port Note channels 0 2 4 6 8 10 12 14 inverted int32 vccis VCC available on the isolated side int32 ocl DQ_DIO416_CHAN Current value of the over current limits int32 ucl DQ_DIO416_CHAN Current value of the under current limits int32 adc DQ_DIO416_CHAN Current value of the conversion results hex int32 cur DQ_DIO416_CHAN Current value of the conversion results uA DOQDIO416DATAIN pDQDIO416DATAIN cfg reports a list of the channels currently disabled by the circuit breaker Bits 31 16 are sticky they report whether the corresponding channel 15 0 was ever disabled since the last call to this function and bits 15 0 report currently disabled channels portOout bits 15 0 reports the last values that were assigned to the output ports adcsts report the internal status of the ADC state machines and configurations which are used to set the ADC conversion speed adcsts amp FFFO0000 SPEED_CONSTANT portOocs bits 15 0 contain a one for every channel for which an overcurrent condition was ever detected 201 PowerDNA API Reference Manual Release 4 0 portOucs bits 15 0 contain a one for every channel for which an undercurrent condition was ever detected rdcnt number of overcurrent samples read from an ADC prior to disconnection 0 32 A higher numbe
493. t Flags are defined as follows define DQ _LNCL_NEXT 1UL lt lt 31 channel list has next entry define DQ _LNCL_INOUT 1UL lt lt 30 reserved for future use define DQ _LNCL_SS1 1UL lt lt 29 reserved for future use define DQ _LNCL_SSO 1UL lt lt 28 reserved for future use define DQ_LNCL_IRQ 1UL lt lt 27 reserved for future use define DQ_LNCL_NOWAIT 1UL lt lt 26 reserved for future use define DQ _LNCL_SKIP 1UL lt lt 25 reserved for future use define DQ_LNCL_CLK 1UL lt lt 24 reserved for future use define DQ _LNCL_CTR 1UL lt lt 23 reserved for future use define DQ_LNCL_WRITE 1UL lt lt 22 write to the channel but not update define DQ_LNCL_UPDALL 1UL lt lt 21 update all written channels define DQ _LNCL_TSROQ 1UL lt lt 20 reserved for future use define DQ_LNCL_SLOW 1UL lt lt 19 slow down operation define DQ_LNCL_DIO 1UL lt lt 18 write read DIO define DQ_LNCL_RSVD1 1LUL lt lt 17 reserved for future use define DQ _LNCL_RSVDO 1UL lt lt 16 reserved for future use define DQ_LNCL_DIFF 1UL lt lt 15 differential mode DOCMD_SETCL is an additive function Each time you write it it adds a channel to the existing channel list Please reset the device to clear the channel list Only a few flags are supported by current set of layers AI 201 205 oo Lac s
494. t reserved 115 PowerDNA API Reference Manual Release 4 0 3 11 13 DqRtAsyncVmapRefreshOutputs and DqRtAsyncDmapRefreshOutputs Syntax int DAQLIB DqRtAsyncVmapRefreshOutputs int hd uint32 flags int dmap_id int DAQLIB DqRtAsyncDmapRefreshOutputs int hd uint32 flags int dmap_id Command Helper function to connect asynchronous interface with RT DMap VMap functions Input int handle Handle to the IOM received from DgAsyncOpenIOM int flags Define behavior of the function int dmap_id DMap ID to refresh for Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_TOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function sends a packet via Async interface as a reply to the remote events The packet needs to be prepared using DqRt mapRqInputChannel and DqRt mapAddOutputChannel lt flags gt reserved 3 11 14 DqRtAsyncSendResponse Syntax int DAQLIB DqRtAsyncSendResponse int hd uint32 flags int pkt_size pDQEVENT pEvent Command Send event packet as a response to the event Input int handle
495. t hysteresis levels are selected at 25 of VCC low and 75 of VCC high 4 14DNA DIO 403 layer 4 14 1 DqAdv403Setlo Syntax int DgAdv403SetIo int hd int devn uint32 Cfg Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 Cfg 1 O Configuration Output 197 PowerDNA API Reference Manual Release 4 0 None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a DIO 403 DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function selects which ports are inputs and which are outputs Note Use constants DIO403_ENPORTO DIO403_ENPORT5 or d together to select what ports should be output 4 14 2 DqAdv403Write Syntax int DgAdv403Write int hd int devn uint8 data DQ_DIO403_PORTS Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM uint8 data byte array for all ports Output None R
496. t DqAdvDnrpSetConfig int hd int devn uint32 action uint32 config Command IOCTL Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM uint32 action What to set 359 PowerDNA API Reference Manual Release 4 0 DQ_L2_SET_CONFIG set configuration Fan off and 24V off uint32 DQ_L2_SET_LED set LEDs uint32 DQ_L2_ SET _LIMITS set over and under limits lo uint32 16 uint32 int32 contig pointer to the data array Output None Return DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 208 DQ_BAD_ PARAMETER CLSize is not between 1 and DQ_MAXCLSIZE bData is NULL or a channel number in c1 is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description This function sets up following parameters DQ_L4_SET_CONFIG this option allows turning off fan 24V DC DC powers isolated sides of most analog input and output layers Use constant DQ_L4_STS_DC24OFF to do that DQ_L4_SET_LED allows you to turn on turn o
497. t command from a BC 277 PowerDNA API Reference Manual Release 4 0 lt rt_size gt is a number of entries in lt rtsa_list gt Each entry in this list is defined as follows DQ_L553_RT_SADDR IN N amp 0x1f lt lt 0 sub address DQ_1 553_RT_SADDR_SEL 1L lt lt 5 Sub address field is valid D Sp BT RT IN N amp Ox1f lt lt 6 RT number DO_L553 RT RT SEL 1L lt lt 11 Z RY field is valid DO L553 RI SET STATUS 18412 Set status bits D L553 RI SET BIRI 1L lt lt 13 Use Block 1 to write data DO L553 RT TX SIZE N N amp Ox1f lt lt 16 Data size Data size is defined in 16 bit words A five bit field Do_1553_RT_TX_S1ZE N defines the size of requested transfer If it equals zero all 32 words will be written into the corresponding memory area of that entry If po_1553_RT_sET_status flag is set three special functions can be performed 1 If SA is 0 32 bit data two 16 bit words contains settings for bits in the RT status register 2 If SA is 1 32 bit data two 16 bit words contains a vector word low is BIT word and high is Vector word for RT vector register Instead of OR ing bits to create an entry we recommend that you use the macros described below DQ_L553_RT_TX RT SA SIZE specify RT SA and data size DQ_L553_RT_TX_BLK RT SA SIZE BLK specify RT SA data size and block to write data to DQ_L553_RT_TX_STS RT specify RT to w
498. t established DQ_SOCK_LIB_ERROR Socket library error DO_SUCCESS successful completion Other negative values low level IOM error Description Use this function to clear asynchronous events without processing them 3 11 4 DqRtAsyncEnableEvents Syntax int DAQLIB DgqRtAsyncEnableEvents int handle uint32 flags uint32 enable_mask Command Open asynchronous channel of communications with the cube Input int handle Handle to the IOM received from DgAsyncOpenIOM uint32 flags Flags define cube behavior uint32 enable_mask Which layers are enabled 1 in that bit positions and which are disabled 0 Output None 108 PowerDNA API Reference Manual Release 4 0 Return DO NO MEMORY error allocating buffer DQ_ILLEGAL HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function enables or disables handling of events on per layer basis It must be called before receiving any events 3 11 5 DqRtAsyncEnableEvents Syntax int DAQLIB DgqRtAsyncEnableEvents int handle uint32 flags uint32 enable_mask
499. t the IOM when performing this command if the Command is processed successfully low level IOM error This function is used to set up multiple parameters for different parts of the IOM The parameters can be represented in the format required by parameter type The following parameters are defined Format Definition uint16 IOM model ID DQPARAM int IOM model option DQPARAM IOM serial number DQPARAM Oxddmmyyyy IOM manufacturing date DQPARAM Base frequency Hz DQPARAM OS Tick size may be ignored by OS Periodic tick size may be ignored by OS Watchdog timer reset delay Current layer time t16 Layer ID 44 PowerDNA API Reference Manual Release 4 0 LNOPT 0x202 int16 Layer option LNSN 0x203 int32 Layer serial number TOTAL 0x204 int16 Total EEPROM size LNMFG 0x205 int32 Oxddmmyyyy Layer manufacturing date LINCAL 0x206 int32 OQOxddmmyyyy Layer calibration date _LNEXP 0x207 int32 Oxddmmyyyy Layer calibration expiration date RM_NOCHANGF oxF00 Do not apply changes test only RM_BYOFF S OxFO1 Write data by offset to the layer EEPROM The data should be specified as follows ul6 offs ul6 size u8 data The function doesn t write anything into EEPROM Instead it writes into the common part of EEPROM copied in the RAM at initialization mode The location and structure of the common pa
500. t type or command and additional flags data for 1553 553 layer of EV553_ID type Event data is always layer specific In this case EV553_ID structure is used to inform user application about what type of the events has happened on DNx 1553 553 layer typedef struct ch ev rt cm st int32 int32 ui uint32 ul ui u int32 int32 an type sa d S id if I channel information type of the event rtsa information command and status applicable status register 306 PowerDNA API Reference Manual Release 4 0 uint32 tstamp timestamp of event uint32 size size of the following data in bytes uint32 data data to follow EV553_ID pEV553_I1D Every type of the event requires specific parameters or none and sends a notification with specific fields and data For all types of events DQPKT dqCounter number of event on per channel per device basis 1 65535 dqCommand DQCMD_EVENT DQ_REPLY DQEVENT dev device number ss DQ_SSOIN event one of the event types described below size size of the following EV553_ID structure including data EV553_ID chan channel evtype event subtype By event type EV553_CLEAR clear all settings In lt param gt None Out None EV553_NO ACTIVITY no activity on the bus over programmed time In lt param gt None Out PpD
501. ta during DMap operations DQCMD_WRRD typedef struct uint32 dmapid DMap ID uint32 size size of data uint8 data data DQWRRD pDQWRRD Note None D PowerDNA API Reference Manual Release 4 0 2 2 33 DqCmdWriteFIFO Syntax int DgCmdWriteFIFO int Iom pDOQFIFO pDQFifo Command DQCMD_WRFIFO 0x150 Writes Data to Device FIFO Input int Iom Handle to the IOM returned by DqOpenIOM pDOQOFIFO pDQFifo output data Output pDOFifo gt size number of bytes actually transferred Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Timeout duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function writes data to the FIFO on the layer The subsystem pDOF ifo gt ss field can represent either a physical subsystem SSOIN for example or a virtual channel DQ_FIFO_SET_DATA 0x10 defines a channel to write data to the layer The following structure is used in the process of exchanging data stream between host and IOM DQCMD_WRFIFO and DQCMD_RDFIFO typedef struct uint8 dev uint8 ss uint16 size uint8 d
502. tatus uint32 StatusSize Command DQCMD_RDSTS 0x118 Read Device Status Input int Iom Handle to the IOM returned by DqOpenIOM uint8 DeviceNum Array of layer numbers to retrieve status from uint32 Entries Number of entries in DeviceNum array uint32 Status Pointer to buffer to store values received from the device uint32 StatusSize Size of buffer in 32 bit chunks Output uint32 Entries Actual number of entries requested uint32 Status Array of device status requested uint32 StatusSize Number of 32 bit values copied into Status Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_NOT_ENOUGH_ROOM StatusSize is too small to hold the data DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function returns 128 bits of status per subsystem for each device specified The following constants are defined for analyzing the returned status The 4th uint32 contains the layer s logic status not implemented for logic below version 10 00 define STS_LOGIC_DC_OOR 1UL lt lt 0 DC DC out of range IOM also define STS_L
503. te Actual excitation rate double exc_level Actual excitation level double ADC_rate Current ADCs and DACs rate uiie Number of waveform points per period sine_points Output None Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description Gets layer excitation voltage parameters calculated by Ain A thru D channels while acquiring an externally or internally generated waveform They may be slightly different compared to parameters specified in DgAdv255SetExcitation because of hardware limitations and mode of operation Notes 4 10 8 DqAdv255Read Syntax int DAQLIB DgAdv255Read int hd int devn int CLSize uint32 cl uint32 bdata double fdata Command DQE Input int hd Handle to the IOM received from DgOpenIOM int devn Layer inside the IOM int CLSize Reserved uint32 cl Channel of interest Output uint32 bdata Pointer to store binary 24 bit 2s complement format or NULL double fdata Converted data if applicable in Pi Rad 0 6 2830 or NULL Retu
504. tecncundagip ie a e aa ER ees ua EE TEREE ET AREE 231 DoAdv50 En TEE 232 Bette DAS 233 Bee SO WSIS ALTHO E 233 Bet e 50 TRECUMCS SAG eS oreinen eae o e E E a ae 234 DgAdv501SendMessage EE 235 DaAdv50 1SendMessage Parity E 236 Wee e Ee EE E 236 DNA CAN 503 IA VOR ged eutegee tints bas cise dan anai aaiae dented ccaanniiasnadaransindawiedscvunnauddte 237 DgAdy503 EE 238 Kee Ee ire oireissa oroen ee e paa a Eae 238 Ree Nie eara e ae a SEa i aa ea EEEE 239 Regie erte WE EE 240 DaAdyv503SetMode E 240 DdAdv503SetChannelGfg EE 243 DGAUVe0S Reser Manel a eepe EE 244 D Adv503ParseVmapMSg DEE 244 DaAdve0S Make VmapMS g EE 245 DNA CAR 550 JEE eege eanvicwnanmeeeteus dndentedansacnnutuakupabentundewteddeviwadandaie 245 Ree EE 245 DNA 429 566 512 ARINC 429 layers s eeccecceeeseeeeeeeeseeeeeeeeeeeesneeeneneeeenenneneeees 246 DaqAdv566BuildPacket DqAdv566ParsePacket cccceeeeseeeeeeeeeeeeentaeeeeeeeeseaes 246 Ree S66 BUNCPIMGRENUY E 247 DoAGVSOG BUNASCNSO EMME E 247 Ee ie SOO SCLC OMG soe ates eal ae a NE I ge aeiae 248 ee Ee rea mamnmer eer eter ere reapers rer eriee reter er em Sar ee EOE Neate crater eee ary 248 CAG SOO CEE WE 250 Ee ie SOB SESE CC IG E 251 DoAdv566setSched Timebase E 252 DqAdv566SetFifoRate sei ci sce ge ett satel ee laa Ns cat de os 252 DqAdv566SetChannelCfg RE 253 Ee ie ee 254 DqAdv566SendPacket EE 255 Ee ie HG STUN EE 255 DOAUVSGGRECVP e 256 DgAdv566RecvVFIfo EE 257 Ee e EU ne stool ee Be Sata ees ee Nd
505. ted and received dmapid s do not match define DQ DATA NOT_AVAILABLE 23 requested data is not available define DQ _FIFO_OVERFLOW 24 device FIFO overflowed define DQ_ILLEGAL_INDEX 25 illegal index supplied define DQ_ERR_NEGATIVE_RETURN 0x80000000 invert return code As a general rule you should check the return code from function calls for a negative number which indicates that an error has occurred 2 2 Auxiliary Functions PowerDNA API Reference Manual Release 4 0 2 2 1 DqTranslateError Syntax char DqTranslateError int error Input int error Error code negative returned by previous DagBIOS API call Output None Return Pointer to ASCIIZ string describing this error const char Description Converts error code into string Note Windows implementation returns LPTSTR type 2 2 2 DqInitDAQLib Syntax int DgqInitDAQLib void Input None Output None Return DQ_SOCK_LIB_ERROR Windows WSAStartup error DQ_INIT_ERROR Error allocating memory DQ_SUCCESS Command processed successfully Description Loads the socket libraries and initializes table structures Note This function should be called at the beginning of your program to allow the library to allocate required resources and data structures after it is loaded This function should not be called under Windows because Windows will automatically call it when loading the DL
506. ted binary data double fData calibrated voltage data Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 201 DQ_BAD_PARAMETER CLSize is not between 1 and DQ_MAXCLSIZE bData is NULL or a channel number in c1 is too high DO GEND ERROR unable to send the Command to IOM 117 PowerDNA API Reference Manual Release 4 0 DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function works using underlying DgReadAIChannel but converts data using internal knowledge of input range and gain of every channel It uses the DOCMD_IOCTL command with the DQIOCTL_CVTCHNL function under the hood When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it in accordance with the channel list supplied This function uses the preprogrammed CL update frequency 10Hz One can reprogram the update frequency by calling the DgCmdSetC1lk command after the first call to D9Adv201Read Thus the user cannot call this function when the layer is involved in any streaming or data mapping operations If the user specifies a
507. ted by devn does not exist or is not a CT 604 counter number is invalid unable to send the Command to IOM nothing is heard from the IOM for Time out duration 339 PowerDNA API Reference Manual Release 4 0 DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function starts the specified counter Note None 4 27 2 DqAdv604StopCounter Syntax int DgAdv604StopCounter int hd int devn int counter Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 3 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 604 DQ_BAD_PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function stops the specified counter Note None 4 27 3 DqAdv604ClearCounter Syntax int DgAdv604ClearCounter int hd int devn int counter Command DQE Input int hd Handle
508. ter A divider should be selected in a way that the re enable interval is at least 2x longer than the expected circuit breaker reaction time see below ADC Speed selection constants note that faster ADC speed also reduces accuracy Code ADC speed Rate channel p p noise Break time mS mA 2A 4 decision samples define DQ_L416_ADCSPD_190 1 3 52KHz 190Hz ch 5 5 20 define DQ_L416_ADCSPD_130 2 1 76KHz 130Hz 5 25 define DQ_L416_ADCSPD_85 3 880Hz 85Hz 3 6 40 define DQ_L416_ADCSPD_45 4 440Hz 45Hz 249 70 define DQ_L416_ADCSPD_22 5 220Hz 22Hz 1 25 130 define DQ_L416_ADCSPD_12 6 110Hz 12Hz Ti 250 define DQ_L416_ADCSPD_6_5 7 55Hz 6 5Hz 0 84 500 define DQ_L416_ADCSPD_3_2 8 27 5Hz 3 2Hz 0 77 1000 define DQ_L416_ADCSPD_1_6 9 13 75Hz 1 6Hz 0 36 2000 define DQ_L416_ADCSPD_0_8 15 6 875Hz 0 8Hz 0 26 4000 4 16 3 DqAdv416SetLimit Syntax int DgAdv416SetLimit int hd int devn int limitid double limitvalue Command DQE Input int hd Handle to the IOM received from DqOpenIOM int devn Layer inside the IOM int limitid Select Over Under range limit to set 0 15 over range limits for the channels 0 15 16 31 under range limits for the channels 16 31 Double limitvalue desired current limit Amps 2 2 Output 204 PowerDNA API Reference Manual Release 4 0 Return DQ_TLLEGAL_ HANDLE DQ_BAD_DEVN DO BAD PARAMETER
509. the list a user should call this function with NULL as a pointer to the list Flags po_1553_BM_Tx_a and pQ_L553_8M_Tx_B enable transmission on the bus Only one flag can be selected at a time These flags are required in situation in which a lt channel gt is in the bus monitor mode However it is also used to transmit simple commands using a transmission FIFO In this way a user can emulate a simple bus controller and bus monitor on the same channel See DgAdv553WriteTxFifo for details By supplying rt_size 0 and rts_list NULL the DNA 1553 553 is instructed to monitor all activity on the bus for all terminals and all sub addresses One can limit the scope of monitored activity by providing an actual channel list lt rts_list gt define DQ_L553_BM_SADDR N define DQ_L553_BM_SADDR_SEL N amp 0x1f lt lt 0 sub address lt reserved gt lt lt 5 Sub address field is valid lt reserved gt define DQ_L553_BM_RT N N amp Ox1f lt lt 6 RT number define DQ _L553_BM BI SEL L lt lt 11 RT field is valid define DQ_L553_INH_RX Inhibit Rx packets lt reserved gt define DO_L553_INH_TX define DQ_L553_INH_MODE define DQ_L553_INH_ERROR L lt lt 14 Inhibit Mode commands lt reserved gt L lt lt 15 Inhibit storing bus errors lt reserved gt I Al TLS412 1L lt lt 13 Inhibit Tx packets lt reserved gt 11 11 The definiti
510. this command DO DAD PARAMETER data is NULL DQ_SUCCESS successful completion Other negative values low level IOM error Description Note This function reads all available information from the DIO 416 layer including readback from the ADCs that are monitoring output current on every channel ADC values are provided in raw binary format and also in microvolts as a part of pDQDI0416DATAIN structure The ADC values are also available in the double data type using the fData parameter DIO 416 is a unique combination of the high current sourcing sinking Digital Output and precision Analog Input The current monitor may be accessed at any time If current is above the pre defined current limit the layer engages a circuit breaker that disconnects load by disabling turning OFF the output FET The DIO 416 layer provides multiple status parameters that may be accessed via a DqAdv416GetAll function call Information is returned in the pDQDIO416DATAIN type typedef struct int32 cfg Report list of the disabled channels int32 portOout Current value written to the output port int32 adcsts Current status of the ADC configuration state machines int32 port0ocs Over current interrupt status int32 portOucs Under current interrupt status int32 rdcnt Current value of the consecutive read counter setting int32 adcdata0 Result of the user defined conversion on Low side ADC int32 adcdatal Re
511. those channels are not in auto retry mode Only a write to the digital output port will re enable disabled channels adcspd used to set ADC conversion speed adcspd adcsts amp FFF00000 SPEED_CONSTANT Note that faster speed improves circuit breaker disconnection time but affects ADC accuracy port0ocm bits 15 0 contain a one for every channel that should be included into the over current status port0ocs This parameter does not affect the circuit breaker portOucm bits 15 0 contain a one for every channel that should be included into the under current status port0ocs rdcnt number of overcurrent samples read from ADC prior to disconnection 0 32 A higher number leads to longer delay but better noise spike immunity adccfg0 adccfg1 Normally two available ADC converters perform a cycle that includes eight conversions each one for every channel connected to the ADC ADCs are not synchronized and run completely independent from each other As an additional feature it is possible to write an LTC2448 command into the adccfg0 adccfg1 parameter and get the corresponding conversion result in adcdataO adcdata1 Please refer to LTC2448 documentation for details This feature may be used for debugging or diagnostic purposes especially in situations where a DNA cube is at remote location and an extended diagnostic is needed disdiv divider for the 66MHz which defines the re enable interval for the auto retry channels set via the cfg parame
512. ting buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not an AI 208 measurement is not one of the valid DQL_IOCTL208_READ constants clentry is nota valid channel number samples is NULL or requested value is not between 1 and 64 or dt or df is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 4 4 7 DgAdv208ShuntCal int DgAdv208ShuntCal int hd int devn uint32 channel uint32 shunt_set int cycles double excitation double r_shunt double r_actual double v_exc double v_gage double v_shunt Command None Input 129 PowerDNA API Reference Manual Release 4 0 int hd Handle to the IOM received from DgOpenIOM int devn device number uint32 channel what channel to measure uint32 shunt_set type of shunt to apply DQL_IOCTL208_READ_Ra DQL_IOCTL208_READ_Rb int cycles number of measurement cycles to average 1 100 double excitation Requested excitation voltage 2 0V 9 0V double r_shunt Requested shunt value 10k 170k Output double r_actual Actual shunt resistance double v_exc Actual excitation voltage double v_gage Actual voltage between S and S double v_shunt Actu
513. tings are used the system will automatically set the FIR filtering to occur first lt decrat gt parameter sets the decimation rate Zero no decimation Setting a value of 1 discards one reading for every one kept two discards two readings for every one kept etc When the AI211_FIR_SET_DECIMATION_RATE flag bit is set in lt mask gt parameter The value in lt decrat gt is set The default value is zero lt tapsize gt and lt data gt parameters are used to load user defined filter coefficients to the selected FIR filters lt tapsize gt is the number of coefficients expected in the array of double precision coefficients pointed to by lt data gt The coefficients should be in the 1 0 1 0 range The sum of all the taps should equal 1 0 When the A1211_F1IR_COEFF_LOAD flag bit is set in the lt mask gt parameter the lt tapsize gt and lt data gt values are set 138 PowerDNA API Reference Manual Release 4 0 4 5 5 DgAdv211SetPIl Syntax int DgAdv211SetPll int hd double samplerate double sr_actual int dec_fact int line Command DQE Input int hd double samplerate int line Output double sr_actual int dec_fact Return DO BAD PARAMETER DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DQ SUCCESS Other negative values
514. tion Handle to the IOM received from DqgAsyncOpenIOM Device number Flags define cube behavior Callback Event handle error allocating buffer illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function assigns either a callback or an event i e semaphore to process remote event happened on a particular IOM and particular device For the critical or fatal event like power failure use CPU layer as a lt devn gt You can select either a callback or an event for the particular device 3 11 7 Syntax DqRtAsyncGetEventPacket int DAQLIB DqRtAsyncGetEventPacket int handle int devn pDOQEVENT pDgEv int signaled Command Get event packet Input int handle int devn PDQEVENT pDgEv int signaled Output None Return DQ_NO_MEMORY DQ_ITLLEGAL HANDLE DO_SOCK_LIB_ERROR Handle to the IOM received from DgAsyncOpenIOM Device number Pointer to the event packet True if packet hasn t been yet processed error allocating buffer illegal IOM Descriptor or communication wasn t established Socket library error 110 PowerDNA API Reference Manual Release 4 0 DQ_SEND_ERROR unable to send the Command to IO
515. tion error occurred at the IOM when performing this command hd int devn int ss CEG H H 324 int counter int startmode int ps int pe int exo IA Crip Ine CDr int dbg int dbc int iie int gie int oie int mode int trs int enc int gated int re t end_mode int Ir PowerDNA API Reference Manual Release 4 0 int hd int devn int ss int counter int startmode int ps int pe int cro int crl int tbr int dbg int dbc int iie int gie int oie int mode Handle to the IOM received from DqOpenIOM Layer inside the IOM Subsystem this counter belongs to Counter number 0 7 Configure startup mode of counter channel via DQ_PL601_SM const DQ_PL601_SMAUTO counter starts when DqEnable Read is called DQ_PL601_SMSOFT counter starts when DqAdv601StartCounter DQ_PL601_SMHARD counter starts via gate line Prescaler register value 32 bit prescaler divides the 66Mhz counter clock Each counter has an independent prescaler Period counter value Initial value of the period count period count is started at rising edge of clkin Compare register 0 value Compare register 1 value Interval divider for timebase register divider for time based capture modes binning Input debouncing gate register value 16 bit value specifying number of 66Mhz clocks before qualifying the gate signal Input debouncing clock register value 16 bit va
516. tion timestamp pEv553_ID gt sts Port status see description above EV553_MD SYNCHRONIZE Synchronize mode command In lt param gt None Out DOEVENT gt event EV553_MD_SYNCHRONIZE EV553_ID gt evtype SL553_PORT_IR_MDS 10us resolution timestamp D D pEV553_ID gt tstamp pEv553_ID gt sts Port status see description above 310 PowerDNA API Reference Manual Release 4 0 EV553_MD RESET Synchronize mode command In param 0 TRUE is actual reset should not be performed and BUSY bit should not be set Out pDOEVENT gt event EV553_MD_RESET pEV553_ID gt evtype SL553_PORT_IR_RRT pEV553_ID gt tstamp 10us resolution timestamp pEv553_ID gt sts Port status see description above Following are RT events EV553_RX message received In param 0 Maximum number of words The actual number of received by this returned words is terminal subaddress to return min number of received in the event packet words maximum number for Uint16 Returns this amount for uint32 param 1 sizeof uint16 or Tells firmware to send sizeof uint32 received date either in uint16 or uint32 format Unit32 format contains additional information like command status and timestamp as well in the upper 16 bits Out pDOEVENT gt event EV5
517. to DQ_LNCL_NEXT DQ_LNCL_DIFF or AO 302 Do_LNCL_WRITE DQ_LNCL_UPDALL 24 PowerDNA API Reference Manual Release 4 0 2 2 29 DqCmdSetTransferList Syntax int DgqCmdSetTransferList int Iom pDQSETTRL pDQSetTr1l Command DQCMD_SETTRL 0x140 Set Transfer List Input int Iom Handle to the IOM returned by DqOpenIOM pDOSETTRL pDQSetTrl transfer list descriptor Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function sets up a transfer list for DMap operations given by DOSETTRL structure DgCmdSetTransferList has additive behavior The firmware accumulates transfer lists with the same dmapid in the memory Every time the firmware finds anew dmapid it allocates memory to store a transfer list To set up a transfer list for a device use the DOSETTRIL structure DQCMD_SETTRL typedef struct uintl6 dmapid DMAP id uint8 dev device uint8 ss subsystem uint32 ch channel channel list entry uint32 flags control flags incl
518. to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 3 Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established 340 PowerDNA API Reference Manual Release 4 0 DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 604 DO DAD PARAMETER counter number is invalid DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function clears the current count CR of the specified counter Note None 4 27 4 DqAdv604Read Syntax int DgAdv604Read int hd int devn int CLSize uint32 cl uint32 data Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int CLSize Number of channels to read uint32 cl Channel list uint32 data Pointer to receive data values Output uint32 data Read data values Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 604 DQ_BAD_ PARAMETER counter number is inva
519. top acquisition and set an error flag only after both ACB and ring buffers are completely full In case of output stream the DQE will stop acquisition after both buffers are empty Recycle Mode works the same way as Cycle Mode In case of a full ACB buffer however DQE will continuously move the head and tail of the buffer together In other words DQE will destroy old measurements in the buffer and replace them with new measurements This mode is useful when the user needs to see pre triggering data Note All parameters supplied to the function via pointers are designed to return actual accepted values For example if a device cannot support a certain frequency it will return a frequency it can support Thus it is a good idea to check configuration values upon a return from this function 3 2 4 DgAcbGetScansCopy Syntax int DgAcbGetScansCopy pDQBCB pBcbh char data uint32 size uint32 rgqsizemin uint32 returned uint32 avail 58 Command DQE Input PowerDNA API Reference Manual Release 4 0 pDQ BCB p Bcb char data uini t32 s uini uini t32 r EIZA uini Output uint uint Return t32 EECH t32 ize gqsizemin returned avail returned avail Description DQ_BAD_PARAMETE DQ_SUCCE SS BCB containing the desired ACB pointer to the data buffer allocated by calling program
520. two fields of the packet if 0 buffer gt dqCommand htonl DOCMD_EVENT buffer gt dqProlog htonl DQ_PROLOG 3 11 12 DqRtAsyncVmapRefreshIinputs and DqRtAsyncDmapRefreshInputs Syntax int DAQLIB DqRtAsyncVmapRefreshInputs int handle uint32 flags pDQRTRCQUEUE paRcQueue int dmap_id int DAQLIB DqRtAsyncDmapRefreshInputs int handle uint32 flags pDORTRCQUEUE paRcQueue int dmap_id Command Helper function to connect asynchronous interface with RT DMap VMap functions Input int handl int flags e pDQRTRCQUEUE paRcQueue int dmap_id Output None Return DQ_NO_MEMORY DQ_ITLLEGAL_HANDLE DQ_SEND ERROR DQ_TIMEOU T_ERROR DQ_TOM_ER DQ_SUCCES ROR S Other negative values Description Handle to the IOM received from DqAsyncopenIOM Define behavior of the function Pointer to the received packet descriptor DMap ID to refresh for error allocating buffer illegal IOM Descriptor or communication wasn t established unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function takes a packet fed by DqRtAsyncReceive and copies it into VMap DMmap buffer where normal functions can be applied lt flags g
521. uble fData pointer to store calibrated voltage data NULL if not required Output uint32 RawData raw data received from device uint32 uData calibrated binary data double fData calibrated voltage data Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AJ 225 DQ_BAD_PARAMETER CLSize isnot between 1 and DO_MAXCLSIZE RawData is NULL or a channel number in c1 is too high DO GEND ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function works using an underlying DgReadAIChannel but converts data using internal knowledge of the input range and calibrates every channel It uses DOCMD_IOCTL with DQIOCTL_CVTCHNL under the hood 154 PowerDNA API Reference Manual Release 4 0 When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it according to the channel list supplied This function uses a preprogrammed CL update frequency 13 75Hz One can reprogram the update frequency by calling DgqCmdSetClk after the first call to D9Adv225Read Thus the user cannot perform this function call when the
522. ucture typedef struct uint32 int16 int16 int32 int32 uint8 DQPKT u u u u dqProlog dqTStamp dqCounter dqCommand rqid dqData PDOPKT const OxBABAFACA 16 bit timestamp Retry counter bitfields DagBIOS command Request ID Data sent from host mirrored The maximum size of a DaqBIOS packet including this header is limited to 530 bytes 2 1 4 Error Codes The following error codes are generated in firmware and can be returned from the IOM in the dqComman Masks to extract DQERR_ d field of a DaqBIOS packet from command code define DQERR_MASK OxFFFF0000 define DQNOERR_MASK Ox0000FFFF The first nybble indicates how the next three nybbles should be interpreted define DQERR_NYBMASK OxF0000000 general error status mask define DQERR_MULTFAIL 0x80000000 high bit multiple bits indicate error status define DQERR_SINGFAIL 0x90000000 low bit in first nybble single error status define DQERR_BITS OxOFFFOO00 error status bits or value extracted from here multiple errors inclusive or ed with dqCommand high bit set define DQERR_GENFAIL OxF0000000 general error status mask define DQERR_OVRFLW 0x80010000 Data extraction too slow data overflow define DQERR_STARTED 0x80020000 Start trigger is received define DQERR_STOPPED 0x800
523. uding channel information uint16 samples number of samples from this channel DQSETTRL pDQSETTRL Note This function is called automatically in DqDmapInitOps 2 2 30 DgCmdWriteAll Syntax int DgqCmdWriteAll int Iom pDQWRRD pDOQWr Command DQCMD_WRRD 0x14C Write All Data and Read Data Back Input int Iom Handle to the IOM returned by DqOpenIOM pDQWRRD pDQWr data for output DMap Return 25 PowerDNA API Reference Manual Release 4 0 DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Timeout duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function initiates exchange of data as described by a transfer list Caller must fill the pDqWr structure with proper DMap Ids and specify size of the output data Setting an input or output DMap ID to zero disables transferring of data in that direction This function doesn t wait for the IOM to reply with the input data Call DqCmdReadAlI to retrieve the input data This function is useful in a real time environment where the real time task can t afford to wait for the IOM s response DgCmdWriteAll shou
524. umber is invalid end_mode is not one of the valid DO EM constants or cfg is NULL DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function sets up the configuration for a counter in a 601 layer for TPPM mode Note 4 26 20 DqAdv601SetAltClocks Syntax int DgAdv601Set Alt Clocks int hd int devn int counter uint32 timebase uint32 prescaler Command DQE Input int hd Handle to IOM received from DqOpenIOM int devn Layer inside the IOM int counter Counter number 0 7 Uint32 timebase One of the constants listed below indicating which clock source to use for the timebase register uint32 prescaler One of the constants listed below indicating which clock source to use for the prescaler register Output none Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not a CT 601 DO DAD PARAMETER counter number is invalid timebase or prescaler is not one of the listed constants DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM er
525. urn on pre inversion of the input pin UE to turn on pre inversion of the gate pin UE to turn on post inversion of the output pin UE to use external clock UE to use trigger UE to use external trigger source only w a triggered mode TRUE to use auto clear at the end of the count only w a triggered mode TRUE gate line as hardware gate on the prescaler enabled when high or gie inverts TRUE to enable re load continuous operation One of the DO EM SN end mode constants Load register value Output parameter that receives the configuration value ee ee mm o o the configuration value 333 DU DO DO DO 3 DQ_T DO DQ_S LLEG PowerDNA API Reference Manual Release 4 0 AlL_HANDLE BAD_D EVN BAD_P ARAMETE END ERRO IMEO UT_ERROR OM_E UCCE RROR SS Other negative values Description illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a CT 601 counter number is invalid end_mode is not one of the valid DO EN constants or cfg is NULL unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error This function sets up the configuration for a counter in a 601 lay
526. urred at the IOM when performing this command DO SUCCESS successful completion Other negative values low level IOM error Description Note This function sets the communication mode for a 503 layer The following parameters are defined for cmd define DQL_IOCTL503_SET_MASK 0x1 set the ID accept mask and accept code define DQL_IOCTL503_SET_RATE 0x2 set the communication bitrate define DQL_IOCTL503_SET_OPER_MODE 0x3 set the channel mode normal or passive Acceptance mask and filters are configured using two uint32 uint32 modeparams 2 code 0x00000000 mask OxFFFFFFFF modeparams 0 htonl code modeparams 1 htonl mask DgAdv503SetMode hd devn chnl DQL_IOCTL503_SET_MASK uint8 modeparams The acceptance mask defines the bits that are relevant 0 is relevant 1 is not for comparison with the acceptance code The way you pack the bits in the mask and code depends on whether the CAN interface is configured in Basic or Extended mode and also on whether you want to filter incoming frames that use 11 bit IDs or frames that use 29 bit IDs The algorithm for defining the acceptance code and mask is described in the document at http www nxp com acrobat_download applicationnotes AN97076 pdf starting at page 19 241 PowerDNA API Reference Manual Release 4 0 Example 1 11 bit filtering Th re Ox Ox Ox Ox Ox
527. us define DQ_SL553_BC_ STATUS 2L lt lt 12 BCCB status control Use the following modifier in MN field define DQ_SL553_BC_STATUS_MJ 2 return status of MJ frame descriptor index in IDX Use the IDX field to select which index to return 295 PowerDNA API Reference Manual Release 4 0 e Minor frame descriptor status define DQ_SL553_BC_MN_DESC 4L lt lt 12 MN descriptor Usethe MN field to select a minor frame to work with Use the IDX field to select which index to return e BCCB status define DQ _SL553_BC_CB_ STATUS 3L lt lt 12 BCCB status word Use the MN field to select a minor frame to work with Usethe IDX field to select which index to return 4 25 23 DqAdv553SelectMNBlock Syntax int DAQLIB DgAdv553SelectMNBlock int hd int devn int channel uint32 block_mask uint32 status Input int hd Handle to the IOM received from DqOpenIOM int devn Device number int channel Channel 0 or 1 uint32 block_mask Bitmask to select block for each minor frame type Output uint32 status Returns status information on whether the minor frame was executed at least once per minor frame Returns DO NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device in
528. utMap int handle int dmapid int dev unsigned char mappedData Input int handle Handle to the IOM Identifier of the DMAP int dmapid int dev ID of the device where the channels are located Output unsigned char pointer to the beginning of the device s input DMAP buffer mappedData Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Get pointer to the beginning of the input data map allocated for the specified device 3 4 4 DgRtDmapGetInputMapSize 68 PowerDNA API Reference Manual Release 4 0 Syntax int DgqRtDmapGetInputMapSize int handle int dmapid int dev int mapSize Input int handle Handle to the IOM int dmapid Identifier of the DMAP int dev ID of the device where the channels are located Output int mappedSize size in bytes of the device s input data map Return DQ_ILLEGAL HANDLE invalid IOM handle DQ_BAD_DEVN there is no device with the specified number DQ_SUCCESS command processed successfully Description Get the size in bytes of the input map allocated for the specified device 3 4 5 DqRtDmapGetOutputMap Syntax int DgRtDmapGetOutputMap int handle i
529. v553SetRTWatchdog Syntax int DAQLIB DqAdv553SetRTWatchdog int hd int devn int channel double inactivity_s Input int hd Handle to the IOM received from DgOpenIOM int devn Device number 273 PowerDNA API Reference Manual Release 4 0 int channel Channel 0 or 1 double inactivity_s Set up inactivity period on the bus Output Returns DQ NO MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an 1553 553 DQ_BAD_PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DO_SUCCESS successful completion Other negative values low level IOM error Description This function sets up an inactivity period on the bus for the watchdog This feature is used to alert a user if the bus was idle for a longer period of time than expected The watchdog flag is returned in the SL553_PORT_STS_WDR bit 4 25 10 DqAdv553ConfigBufferRT Syntax int DAQLIB DgAdv553ConfigBufferRT int hd int devn int channel uint32 rt Sa uint32 rx_buf_size uint32 rx_scan_size ui
530. vel commands point by point synchronous 2 Buffered I O in continuous or burst mode asynchronous see DqAcb functions 3 Mapped I O synchronous see DgDmap fixed data size and DqVmap variable data size functions 4 Messaging I O asynchronous see DqMsg functions 5 Memory mapped mode M asynchronous see DqMm functions All three APIs can be used to communicate with a single IOM but not at the same time Once your system is switched into one of asynchronous modes it is recommended that you not issue synchronous commands so as to avoid interfering with the PowerDNA cube configuration and timing set up for asynchronous mode PowerDNA API Reference Manual Release 4 0 DaqBlOS Command API The DaqBIOS Command API is a direct copy of DaqBIOS commands to the IOM Every DaqBIOS command has its equivalent in the PowerDNA PDNALIib library Any code using the PowerDNA Library must include the file PDNA h which itself includes all necessary additional header files 2 1 Pre defined Types and Error Codes 2 1 1 Pre defined Types These types are defined for use within the library DAQLIB is omitted from this document for the sake of readability Under Microsoft Windows it is used for functions that are exported from the DAQLib dll for the user define DAQLIB __declspec dllexport __stdcall The following types keep the API call format similar across wide range of operating systems typedef unsigned long
531. w 0 1 6 64 samples Notes 4 10 3 DqAdv255SetExcitation Syntax int DqAdv255SetExcitation int hd int devn uint32 channel uint32 config double exc_rate double exc_level double calc_rate Command IOCTL Input int hd Handle to the IOM received from DqgOpenIOM int devn Layer inside the IOM uint32 channel Channel to apply mode to uint32 config Configuration DQ_AI254_ENABLE_EXC_A to enable output A and DQ_AI254_ENABLE_ EXC _B to enable output B etc double exc_rate Desired excitation rate in Hz double exc_level Desired excitation level in V 0 80Vpp Output double calc_rate Actual D A rate limited by the abilities of D A converter timebase error and number of points per period For informational purposes only Return DQ_NO_MEMORY error allocating buffer DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_BAD_DEVN device indicated by devn does not exist or is not an AI 255 DQ BAD PARAMETER Configuration parameters are incorrect DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS successful completion Other negative values low level IOM error Description This function is used to set up the internal excitation frequency and amplitude in internal excit
532. w logic to re enable output after the counter 207 PowerDNA API Reference Manual Release 4 0 value programmed in lt disdiv gt expires This is a countdown counter Each tick takes 15 15ns Use the DqAdv432GetAllQ function to retrieve the current value of the re enable counter divider lt discfg gt overrides the circuit breaker Set the corresponding bit to 1 for override of the over and undercurrent detection circuitry Thus if the corresponding bit in lt discfg gt is set to 1 the circuit breaker cannot disconnect that channel However the user can still read over and undercurrent detection status in DgAdv432GetAll lt adcspd gt selects the acquisition rate for circuit breaker ADCs You can select the acquisition rate from the following list applies to whole layer Code ADC speed Rate per channel P P noise mA Break time ms 2A range with 4 consecutive measurements ms 1 3 52kHz 190Hz 5 5 20 2 1 76kHz 130Hz 5 23 3 880Hz 85Hz 3 6 40 4 440Hz 45Hz 2 9 70 5 220Hz 22Hz 1 25 130 6 110Hz 12Hz 1 1 250 7 55Hz 6 5Hz 0 84 500 8 27 5Hz 3 2Hz 0 77 1000 9 13 75Hz 1 6Hz 0 36 2000 15 6 875Hz 0 8Hz 0 26 4000 lt portocm gt and lt portucm gt specify bit wise over and under current detection mask Only bits set to 1 in these parameters will be reported back in case of over under current conditions in the lt portocm gt and lt portucm gt fields of the DQDI
533. ware 01 rising 02 falling DQ_LN_CVCKSRC1 1L lt lt 5 CV clock source MSB DQ_LN_CVCKSRCO 1L lt lt 4 CV clock source 01 SW 10 HW 11 EXT DQ_LN_CLCKSRC1 1L lt lt 3 CL clock source MSB DQ_LN_CLCKSRCO 1L lt lt 2 CL clock source 01 SW 10 HW 11 EXT DQ_LN_ACTIVE 1L lt lt 1 ACT LED status DQ LN ENABLED 1L lt lt 0 enable operations flags to configure a mechanism to transfer data from the layer hardware buffer into the output queue See layer documentation for these settings Every layer can have additional configuration flags starting from bit 16 For example an AO 301 layer has the following flags Upper part of define define define define define define define define define DQ_AO301 DQ_AO301 DQ_AO301 DQ_AO301 DQ_AO301 DQ_AO301 DQ_AO301 DQ_AO0301_1 DQ_AO0301_ t POSTO _NEG10 BI10 OFF ENCOUT ODESCAN ODEFIFO ODECONT ODEWFGEN he configuration word AO 301 specific 1L lt lt 19 0 10V OE lt lt 19 10 0 V 3L lt lt 19 10V OL lt lt 19 DACs off 1L lt lt 18 enable output strobe OL lt lt 16 single scan update mode 1L lt lt 16 continuous output with FIFO 2L lt lt 16 waveform mode continuous 3L lt lt 16 waveform mode hardware an PowerDNA API Reference Manual Release 4 0 Most layers have two flags where is layer
534. wasn t established device indicated by devn does not exist or is not an AI 208 CLSize is not between 1 and DOQ_MAXCLSIZE bData is NULL or a channel number in c1 is invalid unable to send the Command to IOM nothing is heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion low level IOM error 123 PowerDNA API Reference Manual Release 4 0 This function uses DgReadAIChannel but converts data using internal knowledge of input range and gain of every channel When this function is called for the first time the firmware stops any ongoing operation on the device specified and reprograms it in accordance with the channel list supplied This function uses the preprogrammed CL update frequency 10Hz One can reprogram the update frequency by calling the DgCmdSetC1lk command after the first call to D9Adv208Read Thus the user cannot call this function when the layer is involved in any streaming or data mapping operations If the user specifies a short timeout delay this function can time out when called for the first time because it is executed as a pending command and layer programming takes up to 10ms Once this function is called the layer continuously acquires data and every next call function returns the latest acquired data If one would like to cancel ongoing sampling call the same function with Oxffffffff as a channel number
535. xSize Syntax int DqCmdSetReplyMaxSize int Iom uint32 Size uint32 MaxNoPkts Command DOCMD_SETRPLMAX 0x180 Set Maximum Reply Packet Size Input int Iom Handle to the IOM returned by DqOpenIOM uint32 Size maximum size of the packet produced by IOM uint32 MaxNoPkts maximum number of packets reserved Output None Return DQ_ITLLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ _SEND_ ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DO SUCCESS if the Command is processed successfully Other negative values low level IOM error Description This function limits the size of the packets generated by an IOM Note None 2 2 47 DqCmdSetPassword Syntax int DgqCmdSetPassword int Iom uint32 Mode char Password Command DQCMD_SETPASS 0x184 Input int Iom Handle to the IOM returned by DqgOpenIOM uint32 Mode function mode read write set char Password ASCIIZ password Output None Return DQ_ILLEGAL_HANDLE illegal IOM Descriptor or communication wasn t established DQ_SEND_ERROR unable to send the Command to IOM DQ_TIMEOUT_ERROR nothing is heard from the IOM for Time out duration DQ_IOM_ERROR error occurred at the IOM when performing this command DQ_SUCCESS if the Command is processed successfully Other
536. x_avl uint32 rx_chan_arr uint32 rx_data_arr uint32 rx_size uint32 rx_read uint32 rx_rmns Output None Return DQ_NO_MEMORY DQ_ILLEGAL_ HANDLE DQ_BAD_DEVN DQ_SEND_ERROR DQ_TIMEOUT_ERROR DQ_IOM_ERROR DO SUCCESS Handle to IOM received from DgOpenIOM Layer inside the IOM Number of channels in transmit channel list Number of channels in receive channel list Tx channel list Array of pointers to the arrays of the transmit data Array of number of messages to be transmitted for each channel in Tx channel list Array in which the function returns the actual number of messages written to each channel Array in which the function returns the number of entries available in the FIFO for each channel Rx channel list Array of pointers to the arrays for storing received data Array of number of messages to be received for each channel in the Tx channel list Array of number of messages actually received for each channel Array of number of messages remaining in the receive FIFO for each channel error allocating buffer illegal IOM Descriptor or communication wasn t established device indicated by devn does not exist or is not a 429 566 unable to send the Command to IOM nothing heard from the IOM for Time out duration error occurred at the IOM when performing this command successful completion 259 PowerDNA API Reference Manual
537. y time stamped In RT mode the 1553 protocol is parsed and processed by the RT state machine which inherently supports up to 32 RTs simulated by the single channel Each RT may be individually enabled and each sub address may be also individually configured for RX TX or both with maximum and minimum number of allowable data words per subsystem Mode commands may be enabled and disabled as well Also each sub address and each mode command have a flag that controls interrupt generation upon receiving a corresponding RX TX or mode command Switching between A and B redundant buses takes place automatically upon receiving a command on the bus and the host may receive an interrupt once it happens The Manchester encoder allows data output on A and or B buses However it always accepts data from the same source i e it is impossible to send different data to A and B buses at the same time The encoder has a two 256x32 word FIFO that accepts 1553 data in a format that includes bus inactivity gap time delay word type and parity information These FIFOs are called high and low priority FIFOs and are used for both RT and BC modes Currently a BC only has access to the low priority FIFO Data is outputted from the FIFOs as a complete message and a low priority FIFO waits until all messages from the high priority FIFOs are gone A dedicated memory controller interfaces with 16Mbytes of fast burst PSRAM It keeps up with data requests from both channels for
Download Pdf Manuals
Related Search
Related Contents
USER MANUAL Modular UPS System Installation and Operation Manual 10 kVA to 強化ガラス製食器の破損事故 Frein à manque de courant ERS VAR14-01 N8115-14 EXPRESSBUILDER 組込みキット 取扱説明書 dreamGEAR DGPS3-3863 gaming control Benutzer-initiierte Backup Fujitsu ESPRIMO P1500 Copyright © All rights reserved.
Failed to retrieve file