You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using Rs.Motion.Base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace Rs.Motion.GugaoPulse
|
|
{
|
|
/// <summary>
|
|
/// GLink卡
|
|
/// </summary>
|
|
[XmlInclude(typeof(GLinkIO))]
|
|
public class GLinkIOCard : IIOCard
|
|
{
|
|
public override void Init(short cardID,ushort inCount, ushort outCount, ushort slaveNo)
|
|
{
|
|
for (ushort i = 0; i < outCount; i++)
|
|
{
|
|
GLinkIO io = new GLinkIO();
|
|
io.CardID = cardID;
|
|
io.CardID = (short)CardID;
|
|
io.Name = "Out" + i + "_" + slaveNo;
|
|
io.Index = i;
|
|
DOut.Add(io);
|
|
}
|
|
for (ushort i = 0; i < inCount; i++)
|
|
{
|
|
GLinkIO io = new GLinkIO();
|
|
io.CardID = cardID;
|
|
io.Card = this;
|
|
io.Name = "In" + i + "_" + slaveNo;
|
|
io.Index = i;
|
|
DIn.Add(io);
|
|
}
|
|
}
|
|
}
|
|
}
|