Yoctopuce Yocto-RS485-V2 Mode D'emploi page 388

Table des Matières

Publicité

25. Référence de l'API de haut niveau
serialport→modbusWriteBit()
Modifie l'état d'un seul bit (ou relais) sur un périphérique MODBUS.
function modbusWriteBit( slaveNo, pduAddr, value)
js
int modbusWriteBit( int slaveNo, int pduAddr, int value)
cpp
-(int) modbusWriteBit : (int)
m
LongInt modbusWriteBit( slaveNo: LongInt,
pas
function modbusWriteBit( ByVal
vb
int modbusWriteBit( int slaveNo, int pduAddr, int value)
cs
int modbusWriteBit( int slaveNo, int pduAddr, int value)
java
async Task<int> modbusWriteBit( int slaveNo, int pduAddr, int value)
uwp
modbusWriteBit( slaveNo, pduAddr, value)
py
function modbusWriteBit( $slaveNo, $pduAddr, $value)
php
async modbusWriteBit( slaveNo: number, pduAddr: number, value: number): Promise<number>
ts
async modbusWriteBit( slaveNo, pduAddr, value)
es
int modbusWriteBit( int slaveNo, int pduAddr, int value)
dnp
int modbusWriteBit( int slaveNo, int pduAddr, int value)
cp
YSerialPort
target
cmd
Cette méthode utilise le code de fonction MODBUS 0x05 (Write Single Coil).
Paramètres :
slaveNo
addresse du périphérique MODBUS esclave à piloter
pduAddr
adresse relative du bit à modifier (indexé à partir de zéro).
la valeur à appliquer (0 pour l'état OFF, non-zéro pour l'état ON)
value
Retourne :
le nombre de bits affectés sur le périphérique (1)
En cas d'erreur, déclenche une exception ou retourne zéro.
380
slaveNo
: (int)
pduAddr
: (int)
value
pduAddr: LongInt,
value: LongInt): LongInt
slaveNo
As Integer,
ByVal
pduAddr
ByVal
value
As Integer) As Integer
modbusWriteBit
slaveNo pduAddr value
As Integer,
YSerialPort
www.yoctopuce.com

Publicité

Table des Matières
loading

Ce manuel est également adapté pour:

Yocto-rs232

Table des Matières