Kinoko Module Driver リファレンス |
種別 VME-CAMAC バスブリッジ 製造者 KineticSystems Corporation (http://www.kscorp.com) 参照名 Kinetic-2917 読み出し sequentialRead() / blockRead() サービス要求 割り込み / ポーリング
- executeSingleTransfer(int crate, int station, int function, int address)
- executeSingleTransfer(int crate, int station, int function, int address, Register data)
- executeSingleTransfer(int crate, int station, int function, int address, Register data, Register q, Register x)
- CAMAC のシングルサイクルを実行する.引数に data, q, x が渡されていれば,データ,Q レスポンス,X レスポンスがそれぞれ返される.
- setCommandMemoryAddress(int command_address)
- コマンドリストの記録開始点/実行開始点を指定する.記録開始前と実行開始前の両方で同じ値を指定しなければならない.
- loadCommand(int command)
- 引数のコマンドをコマンドリストに追加する.通常は以下の loadXxxCommand() を使用したほうが便利.
- loadSingleTransferCommand(int crate, int station, int function, int address)
- データ書き込みを伴わない CAMAC 転送のコマンドをコマンドリストに追加する.
- loadInlineWriteCommand(int crate, int station, int function, int address, int data)
- データ書き込みを伴う CAMAC 転送のコマンドをコマンドリストに追加する.
- loadQStopBlockTransferCommand(int crate, int station, int function, int address, int word_count=0)
- Q-Stop モードの CAMAC 転送コマンドをコマンドリストに追加する.
- loadQIgnoreBlockTransferCommand(int crate, int station, int function, int address, int word_count=0)
- Q-Ignore モードの CAMAC 転送コマンドをコマンドリストに追加する.
- loadQRepeatBlockTransferCommand(int crate, int station, int function, int address, int word_count=0)
- Q-Repeat モードの CAMAC 転送コマンドをコマンドリストに追加する.
- loadQScanBlockTransferCommand(int crate, int station, int function, int address, int word_count=0)
- Q-Scan モードの CAMAC 転送コマンドをコマンドリストに追加する.
- loadJumpCommand(int address)
- ジャンプコマンドをコマンドリストに追加する.
- loadHaltCommand()
- Halt コマンドをコマンドリストに追加する.全てのコマンドリストは Halt コマンドで終っていなければならない.
- sequencialRead(int channel_bit_mask)
- loadCommandXXX() によりロードしたコマンドリストを実行し,データを indexed 型としてストリームに送る.引数のチャンネルは,indexed データのアドレスフィールドにのみ使われる(データ読み出しでは無視される).
- blockRead()
- loadCommandXXX() によりロードしたコマンドリストを実行し,データを block 型としてストリームに送る.
- setBufferSize(int buffer_size)
- コマンドリストの実行により取得されるデータを格納するバッファのサイズを指定する.指定しなかった場合のバッファサイズは 64kB.
datasource VmeCamacBridge { int bridge_address = 0xff00; int bridge_irq = 3; int bridge_vector = 0xff33; VmeCrate vme_crate; VmeController vme_controller("SBS-620"); VmeCamacBridge bridge("Kinetic-2917"); vme_crate.installController(vme_controller); vme_crate.installModule(bridge, bridge_address, bridge_irq, bridge_vector); // use interrupts //vme_crate.installModule(bridge, bridge_address); // use polling loop // bridge のセットアップが終れば,後は通常の CAMAC コントローラと全く同じ // int adc_station = 8; int adc_channels = #0..#3; CamacCrate camac_crate; CamacModule adc("Rinei-RPC022"); camac_crate.installController(bridge); camac_crate.installModule(adc, adc_station); on trigger(adc) { adc.read(adc_channels); adc.clear(); } }
Kinetic 2917 を VME のモジュールとして扱う例
datasource K2917 { int address = 0xff00; int irq = 3; int vector = 0xff33; VmeCrate crate; VmeController controller("SBS-620"); VmeModule k2917("Kinetic-2917", "fadc"); crate.installController(controller); crate.installModule(k2917, address, irq, vector); // use interrupts //crate.installModule(k2917, address); // use polling loop int c = 1, n, f, a, data; on run_begin { // 初期化 // k2917.executeSingleTransfer(c, n = 30, f = 17, a = 0, 0x000001); // 3922 の ServiceRequest をイネーブル // k2917.executeSingleTransfer(c, n = 30, f = 17, a = 0, 0x000100); // LAM をイネーブル // k2917.executeSingleTransfer(c, n = 30, f = 17, a = 13, 0x00ffffff); // コマンドリストを構築 // k2917.setCommandMemoryAddress(0); k2917.loadQStopBlockTransferCommand(c, n = 10, f = 0, a = 0); k2917.loadSingleTransferCommand(c, n = 10, f = 9, a = 0); k2917.loadSingleTransferCommand(c, n = 10, f = 26, a = 0); k2917.loadHaltCommand(); } on trigger(k2917) { // 実行するコマンドリストを指定する // k2917.setCommandMemoryAddress(0); // indexed 型のデータとして読み出す // k2917.sequentialRead(#0); // block 型のデータとして読み出す // /* k2917.blockRead(); */ } }