Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
021086b4
Commit
021086b4
authored
Mar 01, 2009
by
Claes pwr46/data0/x4-6-0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix for Ai on port B. If Ai and Di/Do were mixed the Ai didn't work
parent
fc903de0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
otherio/changelog.txt
otherio/changelog.txt
+1
-0
otherio/lib/rt/src/os_linux/rt_io_m_motioncontrol_usbio.c
otherio/lib/rt/src/os_linux/rt_io_m_motioncontrol_usbio.c
+13
-12
No files found.
otherio/changelog.txt
View file @
021086b4
...
...
@@ -4,3 +4,4 @@
080229 rk modbus New I/O-system for Modbus TCP implemented.
081016 rk modbus Added class Modbus_Master.
081016 rk modbus Added moore functionality.
090301 cs usbio Bugfix for Ai on port B. If Ai and Di/Do were mixed the Ai didn't work.
otherio/lib/rt/src/os_linux/rt_io_m_motioncontrol_usbio.c
View file @
021086b4
...
...
@@ -143,6 +143,13 @@ static pwr_tStatus IoCardInit( io_tCtx ctx,
io_AiRangeToCoef
(
&
cp
->
chanlist
[
i
]);
}
}
if
(
local
->
portB_hasDi
||
local
->
portB_hasDo
)
{
op
->
Status
=
USBIO_ConfigDIO
(
&
local
->
USB_Handle
,
2
,
local
->
portB_diMask
);
if
(
op
->
Status
)
errh_Error
(
"IO Init Card '%s', Status %d"
,
cp
->
Name
,
op
->
Status
);
}
if
(
local
->
portB_hasAi
)
{
int
num_ai
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
...
...
@@ -156,12 +163,6 @@ static pwr_tStatus IoCardInit( io_tCtx ctx,
else
op
->
Status
=
USBIO_ConfigAI
(
&
local
->
USB_Handle
,
0
);
if
(
local
->
portB_hasDi
||
local
->
portB_hasDo
)
{
op
->
Status
=
USBIO_ConfigDIO
(
&
local
->
USB_Handle
,
2
,
local
->
portB_diMask
);
if
(
op
->
Status
)
errh_Error
(
"IO Init Card '%s', Status %d"
,
cp
->
Name
,
op
->
Status
);
}
/* Configure port C */
local
->
portC_hasDi
=
0
;
local
->
portC_hasDo
=
0
;
...
...
@@ -196,6 +197,12 @@ static pwr_tStatus IoCardInit( io_tCtx ctx,
cp
->
chanlist
[
18
].
ChanClass
==
pwr_cClass_ChanIi
)
local
->
portC_hasIi
=
1
;
if
(
local
->
portC_hasDi
||
local
->
portC_hasDo
)
{
op
->
Status
=
USBIO_ConfigDIO
(
&
local
->
USB_Handle
,
3
,
local
->
portC_diMask
);
if
(
op
->
Status
)
errh_Error
(
"IO Init Card '%s', Status %d"
,
cp
->
Name
,
op
->
Status
);
}
if
(
local
->
portC_hasAo
)
{
op
->
Status
=
USBIO_ConfigAO
(
&
local
->
USB_Handle
,
local
->
portC_aoMask
>>
3
);
if
(
op
->
Status
)
...
...
@@ -210,12 +217,6 @@ static pwr_tStatus IoCardInit( io_tCtx ctx,
errh_Error
(
"IO Init Card '%s', Status %d"
,
cp
->
Name
,
op
->
Status
);
}
if
(
local
->
portC_hasDi
||
local
->
portC_hasDo
)
{
op
->
Status
=
USBIO_ConfigDIO
(
&
local
->
USB_Handle
,
3
,
local
->
portC_diMask
);
if
(
op
->
Status
)
errh_Error
(
"IO Init Card '%s', Status %d"
,
cp
->
Name
,
op
->
Status
);
}
// Configure Watchdog
if
(
op
->
WatchdogTime
>
0
)
active
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment