61
Chapter 4
4.6.9 Example of reading Status Register
In this section, we will demonstrate how to get the emergency stop limit
switch status by reading the Status Register.
Step1:
Setting the “Output Mode Select Command” and you can choose the
.Monitor mode. as Standard monitor or Extension monitor. In Standard
monitor mode user can get Status0 ~ 1, and in Extension monitor mode
Status0 ~ 3 can be read. Since the status of emergency stop limit switch is
defined in Status1, so both Standard and Extension monitor mode is
workable. In this case, we set the monitor mode as “Extension”.
outportb(base+(CH*4+CommandBufferIndex),DATA);
//CH : Axes 0 ~ 2
//CommandBufferIndex = 0
//DATA is just setting The [Output Mode Command] Monitor Mode
Selection Bit5
//DATA = ( CurrentAxesOutputModeCommandValue &
(~FORCE_EXTENSION_MODE)) | (FORCE_EXTENSION_MODE)
Step2:
Select R7 Register. (If you want to read another status such as R0, R1, or
Current Speed.., then you must select another Register such as R0, R1,
and R6. Please refer to the Table in section 4.6)
outportb(base+(CH*4+CommandBufferIndex,DATA);
//DATA is just setting The [Register Select Command] As R7
//DATA = ( CurrentAxesRegisterSelectCommandValue & (~0x07)) |
(FORCE_SELECT_R7)
Summary of Contents for PCI-1243U
Page 1: ...PCI 1243U 4 Axis Stepping Motor Control Card User Manual ...
Page 8: ...PCI 1243U User Manual viii ...
Page 14: ...PCI 1243U User Manual 6 ...
Page 35: ...27 Chapter3 Figure 3 8 Point to Point Movement ...
Page 38: ...PCI 1243U User Manual 30 ...
Page 80: ...PCI 1243U User Manual 72 Appendix A Diagrams A 1 Jumper and Switch Layout ...
Page 82: ...PCI 1243U User Manual 74 ...
Page 88: ...PCI 1243U User Manual 80 ...