- Computers & electronics
- Computer components
- Interface components
- Digital & analog I/O modules
- User manual
advertisement
IEC 61131-3 C Tools Function Specifications
get_port
Get Serial Port Configuration
Syntax
#include <ctools.h> struct pconfig *get_port(FILE *stream, struct pconfig *settings);
Description
The get_port function gets the serial port configuration for the stream. If stream does not point to a valid serial port the function has no effect.
The get_port function copies the serial port settings into the structure pointed to by settings and returns a pointer to the structure.
Notes
Refer to the Overview of Functions section for detailed information on serial ports.
Refer to the Structure and Types section for a description of the fields in the
pconfig structure.
See Also
Example
}
#include <ctools.h> void main(void)
{ struct pconfig settings; get_port(com1, &settings); printf("Baud rate: %d\r\n", settings.baud); printf("Duplex: %d\r\n", settings.duplex);
Document (Version 2.50) 5/12/2011 201 201
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 12 Safety Information
- 15 About The Book
- 15 At a Glance
- 16 IEC 61131-3 C Tools Overview
- 17 Supported Language Features
- 20 Getting Started
- 20 System Requirements
- 21 Program Development Tutorial
- 25 C Program Development
- 25 Program Architecture
- 29 Compiling Source Code
- 30 Linking Object Files
- 33 Controller Initialization
- 33 Loading Programs into RAM
- 34 Executing Programs
- 35 Real Time Operating System
- 35 Task Management
- 37 Resource Management
- 38 Inter-task Communication
- 39 Event Notification
- 40 Error Reporting
- 41 SCADAPack Task Architecture
- 42 RTOS Example Application Program
- 50 Overview of Programming Functions
- 50 Controller Operation
- 56 Controller I/O Hardware
- 67 Serial Communication
- 74 Communication Protocols
- 78 Modbus Database
- 80 Modbus Addressing
- 82 DNP Communication Protocol
- 85 IEC 61131-3 Variable Access Functions
- 85 HART Communication
- 87 IEC 61131-3 C Tools Function Specifications
- 88 alarmIn
- 90 allocate_envelope
- 91 check_error
- 92 checksum
- 93 checkSFTranslationTable
- 94 clear_errors
- 95 clear_protocol_status
- 96 clearSFTranslationTable
- 97 clearStatusBit
- 98 clear_tx
- 99 configurationRegisterMapping
- 100 configurationSetApplicationID
- 104 crc_reverse
- 105 createRoutingTable
- 106 create_task
- 109 databaseRead
- 111 databaseWrite
- 113 datalogCreate
- 116 datalogDelete
- 118 datalogPurge
- 120 datalogReadNext
- 122 datalogReadStart
- 124 datalogRecordSize
- 125 datalogSettings
- 126 datalogWrite
- 127 dbase
- 129 deallocate_envelope
- 130 dnpInstallConnectionHandler
- 135 dnpClearEventLog
- 136 dnpConnectionEvent
- 137 dnpCreateRoutingTable
- 138 dnpGenerateEventLog
- 139 dnpGetAI16Config
- 140 dnpGetAI32Config
- 141 dnpGetAISFConfig
- 142 dnpGetAO16Config
- 143 dnpGetAO32Config
- 144 dnpGetAOSFConfig
- 145 dnpGetBIConfig
- 146 dnpGetBIConfigEx
- 147 dnpGetBOConfig
- 148 dnpGetCI16Config
- 149 dnpGetCI32Config
- 150 dnpGetConfiguration
- 154 dnpGetConfigurationEx
- 155 dnpGetRuntimeStatus
- 156 dnpGetUnsolicitedBackoffTime
- 157 dnpReadRoutingTableDialStrings
- 158 dnpReadRoutingTableEntry
- 159 dnpReadRoutingTableSize
- 160 dnpSaveAI16Config
- 161 dnpSaveAI32Config
- 162 dnpSaveAISFConfig
- 163 dnpSaveAO16Config
- 164 dnpSaveAO32Config
- 165 dnpSaveAOSFConfig
- 166 dnpSaveBIConfig
- 167 dnpSaveBIConfigEx
- 168 dnpSaveBOConfig
- 169 dnpSaveCI16Config
- 170 dnpSaveCI32Config
- 171 dnpSaveConfiguration
- 173 dnpSaveConfigurationEx
- 174 dnpSaveUnsolicitedBackoffTime
- 175 dnpSendUnsolicited
- 181 dnpSendUnsolicitedResponse
- 182 dnpWriteRoutingTableEntry
- 183 dnpWriteRoutingTableDialStrings
- 184 end_application
- 185 end_task
- 186 endTimedEvent
- 187 enronInstallCommandHandler
- 191 forceLed
- 192 getABConfiguration
- 193 getBootType
- 194 getclock
- 195 getClockAlarm
- 196 getClockTime
- 197 getControllerID
- 198 getIOErrorIndication
- 199 getPortCharacteristics
- 200 getPowerMode
- 201 get_port
- 202 getProgramStatus
- 204 get_protocol
- 205 getProtocolSettings
- 207 getProtocolSettingsEx
- 209 get_protocol_status
- 210 getSFTranslation
- 211 get_status
- 212 getStatusBit
- 213 getTaskInfo
- 215 getVersion
- 216 getWakeSource
- 217 hartIO
- 218 hartCommand
- 220 hartCommand
- 228 hartStatus
- 230 hartGetConfiguration
- 231 hartSetConfiguration
- 232 hartPackString
- 233 hartUnpackString
- 234 install_handler
- 236 installClockHandler
- 238 installDbaseHandler
- 240 installSetdbaseHandler
- 242 Dbase Handler Function
- 246 Setdbase Handler Function
- 247 installExitHandler
- 248 installModbusHandler
- 249 Handler Function
- 254 installRTCHandler
- 255 RTCHandler Function
- 256 interruptCounter
- 257 interruptInput
- 258 interrupt_signal_event
- 259 interval
- 260 ioBusReadByte
- 261 ioBusReadLastByte
- 262 ioBusReadMessage
- 264 ioBusSelectForRead
- 265 ioBusSelectForWrite
- 266 ioBusStart
- 267 ioBusStop
- 268 ioBusWriteByte
- 269 ioBusWriteMessage
- 271 ioClear
- 272 ioDatabaseReset
- 274 ioRefresh
- 275 ioReset
- 276 isaRead16Din
- 277 isaRead32Din
- 278 isaRead4Ain
- 279 isaRead4Counter
- 280 isaRead4202Inputs
- 282 isaRead4202DSInputs
- 284 isaRead5505Inputs
- 287 isaRead5506Inputs
- 289 isaRead5601Inputs
- 291 isaRead5602Inputs
- 293 isaRead5604Inputs
- 295 isaRead5606Inputs
- 297 isaRead8Ain
- 298 isaRead8Din
- 299 isaReadLPInputs
- 301 isaReadSP100Inputs
- 303 isaWrite16Dout
- 304 isaWrite2Aout
- 305 isaWrite32Dout
- 306 isaWrite4Aout
- 307 isaWrite4AoutChecksum
- 309 isaWrite4202Outputs
- 310 isaWrite4202OutputsEx
- 312 isaWrite4202DSOutputs
- 313 isaWrite5303Aout
- 314 isaWrite5505Outputs
- 316 isaWrite5506Outputs
- 318 isaWrite5601Outputs
- 319 isaWrite5602Outputs
- 320 isaWrite5604Outputs
- 322 isaWrite5606Outputs
- 325 isaWrite8Dout
- 326 isaWriteAout
- 328 isaWriteLPOutputs
- 330 isaWriteSP100Outputs
- 331 ledGetDefault
- 332 ledPower
- 333 ledPowerSwitch
- 334 ledSetDefault
- 336 master_message
- 342 modbusExceptionStatus
- 343 modbusSlaveID
- 344 modbusProcessCommand Function
- 346 modemAbort
- 347 modemAbortAll
- 349 modemDial
- 351 modemDialEnd
- 352 modemDialStatus
- 353 modemInit
- 355 modemInitEnd
- 356 modemInitStatus
- 357 modemNotification
- 358 optionSwitch
- 359 pidExecute
- 361 pidInitialize
- 362 pollABSlave
- 363 poll_event
- 364 poll_message
- 365 poll_resource
- 366 portConfiguration
- 367 portIndex
- 368 portStream
- 369 processModbusCommand
- 371 queue_mode
- 372 readBoolVariable
- 374 readCounter
- 375 readCounterInput
- 376 readBattery
- 377 readInternalAD
- 378 readIntVariable
- 380 readMsgVariable
- 382 readRealVariable
- 384 readRoutingTableEntry
- 385 readRoutingTableSize
- 386 readStopwatch
- 387 readThermistor
- 388 readTimerVariable
- 390 read_timer_info
- 391 receive_message
- 392 release_processor
- 393 release_resource
- 394 report_error
- 395 request_resource
- 396 resetAllABSlaves
- 397 resetClockAlarm
- 398 route
- 399 runLed
- 401 searchRoutingTable
- 402 send_message
- 404 setABConfiguration
- 405 setBootType
- 406 setclock
- 407 setClockAlarm
- 409 setdbase
- 411 setDTR
- 412 setIOErrorIndication
- 413 setPowerMode
- 414 set_port
- 416 setProgramStatus
- 417 set_protocol
- 418 setProtocolSettings
- 420 setProtocolSettingsEx
- 422 setSFTranslation
- 426 setStatus
- 427 setStatusBit
- 428 settimer
- 429 setWakeSource
- 430 signal_event
- 432 sleep
- 434 start_protocol
- 435 startup_task
- 436 startTimedEvent
- 438 timer
- 439 timeoutCancel
- 440 timeoutRequest
- 443 wait_event
- 444 wd_auto
- 445 wd_manual
- 446 wd_pulse
- 447 writeBoolVariable
- 448 writeIntVariable
- 450 writeRealVariable
- 451 writeMsgVariable
- 453 writeTimerVariable
- 455 writeRoutingTableEntry
- 456 IEC 61131-3 C Tools Macro Definitions
- 469 IEC 61131-3 C Tools Structures and Types
- 469 ABConfiguration
- 469 ADDRESS_MODE
- 469 ALARM_SETTING
- 470 clock
- 470 DATALOG_CONFIGURATION
- 470 DATALOG_STATUS
- 471 DATALOG_VARIABLE
- 471 DialError
- 472 DialState
- 472 dnpAnalogInput
- 473 dnpAnalogOutput
- 473 dnpBinaryInput
- 473 dnpBinaryInputEx_type
- 473 dnpBinaryOutput
- 474 DNP_CONNECTION_EVENT Type
- 475 dnpConfiguration
- 479 dnpConfigurationEx
- 484 dnpCounterInput
- 484 dnpPointType
- 484 DNP_RUNTIME_STATUS
- 485 envelope
- 486 HART_COMMAND
- 486 HART_DEVICE
- 487 HART_RESPONSE
- 487 HART_RESULT
- 487 HART_SETTINGS
- 488 HART_VARIABLE
- 488 ledControl_tag
- 489 ModemInit
- 489 ModemSetup
- 490 PROTOCOL_SETTINGS
- 490 PROTOCOL_SETTINGS_EX Type
- 491 prot_settings
- 491 prot_status
- 492 pconfig
- 493 PORT_CHARACTERISTICS
- 494 pstatus
- 494 READSTATUS
- 495 routingTable
- 495 SFTranslation
- 495 SFTranslationStatus
- 496 TASKINFO
- 496 taskInfo_tag
- 497 timer_info
- 497 VERSION
- 498 WRITESTATUS
- 499 C Compiler Known Problems
- 499 Use of Initialized Static Local Variables