今日項目
HIOKI LR8400
ITECH
const submitSetValues = async () => {
if (!props.isOnline) return;
const validationError = validateProtectionRules();
if (validationError) {
errorMessage.value = validationError;
return;
}
isLoading.value = true;
errorMessage.value = '';
try {
const protectionPayload: ProtectionReq = {
ovp: Number(protectionsForm.value.ovp),
uvp: Number(protectionsForm.value.uvp),
ocp: Number(protectionsForm.value.ocp),
ucp: Number(protectionsForm.value.ucp),
opp: Number(protectionsForm.value.opp),
delay: Number(protectionsForm.value.delay)
};
await deviceStore.updateProtection(props.deviceId, protectionPayload);
// 等等看要不要改
await deviceApi.setValues(getBaseUrl(), {
voltage: Number(preConnectForm.value.voltage),
current: Number(preConnectForm.value.current),
power: Number(preConnectForm.value.power)
});
modalStage.value = 'CONFIRM_ON';
} catch (err: unknown) {
errorMessage.value = err instanceof Error ? err.message : '設定失敗,請檢查網路連線或參數';
} finally {
isLoading.value = false;
}
};
海辰容量計算方式修改
def get_raw(ioa):
return client.data_store.get(ioa, 0)
v_val = get_raw(cfg.m.TOTAL_V)
if v_val != 0:
charge_cap = get_raw(cfg.m.SINGLE_CHARGE_POWER) * 1000 / v_val
discharge_cap = get_raw(cfg.m.SINGLE_DISCHARGE_POWER) * 1000 / v_val
else:
charge_cap = 0.0
discharge_cap = 0.0
if client.connected:
client.data_store[99991] = charge_cap
client.data_store[99992] = discharge_cap
st.metric("單次充電容量", f"{charge_cap:.1f} Ah")
st.metric("單次放電容量", f"{discharge_cap:.1f} Ah")
def get_raw(ioa):
return client.data_store.get(ioa, 0)
c_val = get_raw(cfg.m.TOTAL_C)
if c_val >= 0.:
charge_cap = user_pref['log_interval']/3600 * c_val
else if c_va; <= 0:
discharge_cap = user_pref['log_interval']/3600 * c_val
else:
charge_cap = charge_cap
discharge_cap = discharge_cap
if client.connected:
client.data_store[99991] += charge_cap
client.data_store[99992] += discharge_cap
st.metric("單次充電容量", f"{client.data_store[99991]:.1f} Ah")
st.metric("單次放電容量", f"{client.data_store[99992]:.1f} Ah")
明日預期
代辦事項
測Modbus Canbus通訊
伺服器讀取與呈現
GusBLE
電動巴士Canbus
GusBuy
永續發展課程
| 項次 | 課程名稱 | 上課日期 | 上課時間 | 主講人 | 備註 |
|---|
| 1 | 客戶永續經營 | 8/21 | 13:30~14:30 | 策略長許志帆特助 | |
| 2 | ESG 報告與 GRI 準則 | 9/4 | 13:30~14:30 | 永續發展室 Gary | |
| 3 | 永續分組 | 9/11 | 13:30~14:30 | 永續發展室 Gary | |
| 4 | 永續提案說明 | 9/18 | 13:30~14:30 | 永續發展室 Gary | |
| 5 | 提案送審 | 9/18~10/2 | 13:30~14:30 | 永續發展室 Gary | |