B&B Electronics 4 Channel Input Buffer Board SDAIBB Manuale Utente Pagina 50

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 60
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 49
46 Chapter 5 Documentation Number UD128A8D4602 Manual
B&B Electronics Mfg Co 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104
B&B Electronics Ltd Westlink Comm. Pk. Oranmore, Galway, Ireland Ph 353-91-792444 Fax 353-91-792445
DAVoltVar = DAVoltVar / 4.883
DAVoltVar = Int(DAVoltVar)
Setting = DAVoltVar
Device1.IoPoints(DA_0).Value = Setting
A Digital I/O that is set for an Input is Read Only and is read through
the Value property for that I/O Point. The result is Boolean.
Dim Reading as Boolean
Reading = Device1.IoPoints(DIG_IO_0).Value
‘ \ This returns True if High and False if Low.
A Digital I/O that is set for an Output is Read/Write and is set/read
through the Value property for that I/O Point. The setting/reading is
Boolean.
Device1.IoPoints(DIG_IO_3).Value = False
‘ \ Sets Digital I/O 3 Output Low.
Device1.IoPoints(DIG_IO_4).Value = True
‘ \ Sets Digital I/O 4 Output High
Reading = Device1.IoPoints(DIG_IO_4).Value
‘ \ Reading back the Output setting is the same as reading inputs
Reading Multiple Channels
Each channel is consecutive, so all channels can be read into an
array.
Dim i as Long
Dim Reading(AD_0 to AD_7) as Long
For i = AD_0 to AD_7
Reading(i) = Device1.IoPoints(i).Value
Next i
This creates an array of readings with the same index as the I/O
Point ID.
To index readings from 0 to 7, just add the index to the base I/O
point AD0 when accessing the I/O Point.
Dim i as Long
Dim Reading(7) as Long
For i = 0 to 7
Reading(i) = Device1.IOPoints(AD_0 + i).Value
Vedere la pagina 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 59 60

Commenti su questo manuale

Nessun commento