Campbell-scientific CR3000 Micrologger Manuel d'utilisateur Page 376

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 590
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 375
Section 8. Operation
376
8.6.2.5 Modbus over IP
Modbus over IP functionality is an option with the CR3000. Contact Campbell
Scientific for details.
8.6.2.6 Modbus tidBytes
Q:
CanModbusbeusedoveranRS232link,7databits,evenparity,one
stopbit?
A:
Yes.PrecedeModBusMaster()/ModBusSlave()withSerialOpen()and
setthenumericformatoftheCOMportwithanyoftheavailable
formats,includingtheoptionof7databits,evenparity.SerialOpen()
andMo
dBusMaster()canbeusedonceandplacedbeforeScan().
ConcatenatingtwoModbuslong16bitvariablestooneModbuslong32
bitnumber.
8.6.2.7 Converting 16-bit to 32-bit Longs
ConcatenationoftwoModbuslong16bitvariablestooneModbuslong
32bitnumberisshowninthefollowingexample.
CRBasicExample68. ConcatenatingModbusLongVariables
'Requires CR800 OS v.3, CR1000 OS v.12, or CR3000 OS v.5 or higher
'CR3000 uses Big-endien word order.
'Declarations
Public Combo As Long 'Variable to hold the combined 32-bit
Public Register(2) As Long 'Array holds two 16-bit ModBus long
'variables
'Register(1) = Least Significant Word
'Register(2) = Most Significant Word
Public Result 'Holds the result of the ModBus master
'query
'Aliases used for clarification
Alias Register(1) = Register_LSW 'Least significant word.
Alias Register(2) = Register_MSW 'Most significant word.
BeginProg
'If you use the numbers below (un-comment them first)
'Combo is read as 131073 decimal
'Register_LSW=&h0001 'Least significant word.
'Register_MSW=&h0002 ' Most significant word.
Vue de la page 375
1 2 ... 371 372 373 374 375 376 377 378 379 380 381 ... 589 590

Commentaires sur ces manuels

Pas de commentaire