SetFpgaConfig
SetFpgaConfig は, FPGA の設定を変更するコマンド.
let config = FpgaConfig { sync_phase_lock, sync_kp, sync_ki, sync_kf,};SetFpgaConfig::new(config);config = FpgaConfig( sync_phase_lock=sync_phase_lock, sync_kp=sync_kp, sync_ki=sync_ki, sync_kf=sync_kf,)SetFpgaConfig(config)var config = new FpgaConfig{ SyncPhaseLock = syncPhaseLock, SyncKp = syncKp, SyncKi = syncKi, SyncKf = syncKf,};new SetFpgaConfig(config);FpgaConfig
Section titled “FpgaConfig”| フィールド | 型 | 既定値 | 説明 |
|---|---|---|---|
sync_phase_lock |
bool |
true |
FPGA の動作クロックをデバイス間の同期パルスへ位相ロックする細調整. (既定で有効になっている.) |
sync_kp |
u16 |
64 |
細調整の比例ゲイン. |
sync_ki |
u16 |
1024 |
細調整の積分ゲイン. |
sync_kf |
u16 |
4096 |
細調整に入る前の周波数推定の積分ゲイン. |
Example
Section titled “Example”use autd3_rs::commands::{Clear, FpgaConfig, SetFpgaConfig, Synchronize};use autd3_rs::geometry::{Autd3, Geometry};use autd3_rs::Client;use autd3_rs::udp::TransportOption;
let geometry = Geometry::new(vec![Autd3::default()]);let option = TransportOption::default();let mut client = Client::open(&geometry, &option).await?;client.send(Clear).await?;client.send(Synchronize).await?;
client.send(SetFpgaConfig::new(FpgaConfig { sync_phase_lock: false, ..Default::default()})).await?;
client.send(SetFpgaConfig::default()).await?;import asyncio
from autd3 import Client, TransportOptionfrom autd3.commands import Clear, FpgaConfig, SetFpgaConfig, Synchronizefrom autd3.geometry import Autd3, Geometry
async def main() -> None: geometry = Geometry([Autd3()]) with await Client.open(geometry, TransportOption()) as client: await client.send(Clear()) await client.send(Synchronize())
await client.send(SetFpgaConfig(FpgaConfig(sync_phase_lock=False)))
await client.send(SetFpgaConfig())
asyncio.run(main())using System.Threading.Tasks;using AUTD3;
var geometry = new Geometry(new[] { new Autd3() });using var client = await Client.OpenAsync(geometry, new TransportOption());await client.SendAsync(new Clear());await client.SendAsync(new Synchronize());
await client.SendAsync(new SetFpgaConfig(new FpgaConfig { SyncPhaseLock = false }));
await client.SendAsync(new SetFpgaConfig());