您的位置:控制工程论坛网论坛 » 人机界面 » 具有CAN BUS总线人机界面方案推荐(支持CAN2.0A和CAN2.0B)

winterswimer

winterswimer   |   当前状态:在线

总积分:2907  2024年可用积分:8

注册时间: 2006-08-30

最后登录时间: 2015-10-30

空间 发短消息加为好友

具有CAN BUS总线人机界面方案推荐(支持CAN2.0A和CAN2.0B)

winterswimer  发表于 2006/11/21 9:08:45    精华  6542 查看 2 回复  [上一主题]  [下一主题]

手机阅读

CAN总线人机界面方案推荐
 
下面方案已经成功运用于电力系统、筑路运输车辆监控系统。
 
 
1、hmitech tpc 系列CAN总线产品
 
特点:软硬一体人机界面,免费配备组态软件!
 
CAN端口1个:控制器  SJA-1000     收发器:82C250
 
支持CAN2.0A和CAN2.0B,免费提供组态软件和CAN组态驱动!

型号    机柜开孔:
TPC064  216×152mm   
TPC105  303×226mm
 
备注:成功运用于西电某电力控制系统。
 
2、ADVANTECH IPPC 9150/9120   +   PCI680U/PCL-841
 
特点:基于PCI/ISA扩展的高性能、高可靠性的一体化工业级现场人机界面系统平台。
 
CAN卡推荐:

PCI680U:2-port CAN Uni-PCI Comm. Card w/ Isolation
具体可访问:
http://www.advantech.com/products/Model_Detail.asp?model_id=1-1TW6P3
PCI CAN 卡特性:
Bus interface: PCI bus spec. 2.2 compliant
Two independent CAN network operation (V2.0 A,B)
Communication controller: SJA1000
CAN transceiver:82C250
16MHz CAN controller frequency
Speed ( bps ): Up to 1Mbps programmable transfer rate
Connector: Dual DB-9 male connectors (for PCI-1680UP, it's DB25(F), and include a DB25 to Two standard DB9(M) cable)
Operating Temperature: 0 ~ 60℃
Storage Temperature: -25 ~ 85℃
Operating Humidity: 5 ~ 95% Relative Humidity, non-condensing

ISA CAN 卡:PCL-841
Operates two separate CAN networks at the same time
High speed transmission up to 1 Mbps
16 MHz CAN controller frequency
Takes a 4 KB address space, 40 base address adjustable in steps from C800H up to EF00H
Optical isolation protection of 1000 VDC ensures system reliability
Wide IRQ selection for each port includes: IRQ3, 4, 5, 6, 7, 9, 10, 11, 12, 15
LED indicates Transmit/Receive status on each port
Direct memory mapping enables speedy access to the CAN controllers
C library and examples included

带PCI和ISA总线接口的人机界面特性:
IPPC9150/9120:  开孔尺寸 371×272mm
具体可访问:
http://www.hmitech.com/product/ippc/index.asp?i=12

备注:方案成功运用于某大型筑路架运梁机械微电系统中!
 
 
3、ADVANTECH UNO 2160/2170  + UNO-PCM21-A  + PCM3680 + FPM 3180
 
特点:基于PC/104扩展的可靠、灵活的一体化工业级现场人机界面系统平台。
 
PC104 CAN卡特性:
PCM3680: Dual-port Isolated CAN interface Module
Main Features
Operates two separate CAN networks at the same time
High speed transmission up to 500 kbps
Direct memory mapping enables very fast access to the CAN controllers
Windows? DLL library and examples included
Supports Windows? 95/98/2000/XP driver and utility
 
嵌入式控制器特性:
UNO 2160/2170 双PC/104扩展的高性能Pentium 3级控制器,它无风扇和无硬盘的设计比工控机更适合于应用在强烈震动或多
 
尘的工业现场,尺寸小但集成了串行通讯及以太网、无线通信接口等功能,内置PC/104接口为高速数据采集也提供了可能,所
 
有接口均采用工业等级的隔离防护设计,内置控制器级别的硬件看门狗,可支持Windows XP Embedded和Windows CE.net操作
 
系统。真正满足工业现场“3C”需要。
安装方式灵活:
〉〉工业DIN导轨安装
〉〉面板安装
〉〉壁挂式安装
 
其他,选配产品特性: 
 
UNO-PCM21-A  UNO系列PC/104扩展套件
 
FPM 工业平板显示器(FPM-Flat Panel Monitors)   全部可以选配触摸屏
 
FPM-3120: 12.1" LCD(Direct-VGA端口)工业平板显示器   外观尺寸:311*237*40
符合NEMA4/IP65标准的铝镁前面板
支持VESA安装臂和台式安装臂
面板和壁挂式安装
自动识别输入信号
多扫描功能,支持SVGA, VGA, VGA-Text
12.1" SVGA TFT LCD,分辨率可达800 X 600
 
 
FPM-3150系列: 15" LCD(Direct-VGA端口)工业平板显示器 外观尺寸:428*310*86
http://www.hmitech.com/product/fpm/index.asp?i=12
 
还有,可配:
FPM-3170系列: 17"带VGA/DVI-D/Video/S-Video端口的工业平板显示器
FPM-3190: 带19寸LCD和VGA/Video/S-Video/DVI端口的工业平板显示器
 
备注:成功运用于某火车机车监测系统中。
 
说明:
1、ADVANTECH PCI/ISA/PC 104总线的产品都提供高速数据访问功能。
2、纵横科技都可以提供客户需要的CAN通讯软件和工程应用软件的客制化服务(ODM)!

 

欢迎访问纵横科技  WWW.HMITECH.COM

1楼 0 0 回复
  • winterswimer

    winterswimer   |   当前状态:在线

    总积分:2907  2024年可用积分:8

    注册时间: 2006-08-30

    最后登录时间: 2015-10-30

    空间 发短消息加为好友

    winterswimer   发表于 2006/11/20 22:21:17

    '研华提供底层CAN动态库  adscan.dll  ,我们可以通过动态库接口, 进行CAN通讯。

    '测试环境:  IPPC9150 + PCI1680U + WINDOWS 2000

    '测试前准备工作:

    '1、安装PCI 1680驱动和DEV Manager软件,
    '2、将CAN卡插入IPPC9150,开机后,系统自动搜索板卡,并识别。
    '3、将P1和P2用电缆连接,可以进行本代码测试!
    '4、9针端口定义:2-CAN L   3 GND屏蔽   7 CAN H

    '测试PCI1680CAN卡和DEVICE NET 设备连接,通讯OK!  现将代码分析如下:

    ' 测试于北航自动化院

    Option Explicit

    Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
    Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long

    Const BUFFER_SIZE = 10000

    Dim Port As Integer
    Dim DeviceNum As Long
    Dim HostID As Integer
    Dim Baudrate As Integer
    Dim BTR0 As Integer
    Dim BTR1 As Integer
    Dim AcpCode As Integer
    Dim AcpMask As Integer
    Dim OutCtrlCode As Integer
    Dim IntMask As Integer
    Dim nProtocolType As Integer
    Dim DeviceName As String

    Dim ErrCode As Long
    Dim isPortOpen As Boolean
    Dim bReady As Long

    Dim g_pMsgData As Long
    Dim g_pIndex As Long
    Dim g_MsgData(0 To BUFFER_SIZE - 1) As CAN_MSG_T
    Dim g_BufferIndex As Long

    Dim PrevIndex As Long


    Private Sub CmdClearList_Click()
        ' 通过按钮将接收到的数据清空
        MsgList.Clear
    End Sub

    Private Sub CmdClearCount_Click()
        '清空数据桢的计数
        TxtCount.Text = 0
    End Sub

    '定时器的周期为60ms,对缓冲区的内容进行读取
    Private Sub DisplayTimer1_Timer()
        Dim i As Long
        Dim s As String
      
        ' 如果CAN缓冲区的序列好发生改变,则进行判断,看是否读缓冲区的内容
        If g_BufferIndex <> PrevIndex Then
            PrevIndex = g_BufferIndex
            Form1.TxtBufferIndex.Text = g_BufferIndex
           
            '当缓冲区满后,清空缓冲区  
            If g_BufferIndex = 0 Then  '如果实时的在list控件中显示接收的内容,可以将这个判断注释掉
                s = "Receive Data Finished!"
                MsgList.AddItem s
       
                For i = 0 To BUFFER_SIZE - 1
                    If i Mod 100 = 99 Or i = 0 Then
                        s = "(" & i + 1 & ") RECV: ID = " & g_MsgData(i).ID & _
                           ", Length = " & g_MsgData(i).dlen & ", " & _
                           Hex(g_MsgData(i).Data(0)) & "H " & _
                           Hex(g_MsgData(i).Data(1)) & "H " & _
                           Hex(g_MsgData(i).Data(2)) & "H " & _
                           Hex(g_MsgData(i).Data(3)) & "H " & _
                           Hex(g_MsgData(i).Data(4)) & "H " & _
                           Hex(g_MsgData(i).Data(5)) & "H " & _
                           Hex(g_MsgData(i).Data(6)) & "H " & _
                           Hex(g_MsgData(i).Data(7)) & "H "
           
                        MsgList.AddItem s       '显示局部的信息
                        TxtCount.Text = i + 1
                    End If
                Next
            End If
        End If
    End Sub

    '在工程启动的时候,对CAN卡进行初始化设置,包括 波特率  CAN协议设置等
    Private Sub Form_Load()
        '
        BTR0 = &H3                   '波特率可以通过编程设定,在这里为125kps
        BTR1 = &H1C
        AcpCode = 0
        AcpMask = 255
        IntMask = 0
        OutCtrlCode = 250
        nProtocolType = CANBUS_PROTOCOL_20A

        g_pIndex = 0
        g_pMsgData = 0
        g_BufferIndex = 0
        isPortOpen = False
       
        DeviceName = "                                         "
        ErrCode = CANSelectDevice(Form1.hWnd, 0, DeviceNum, DeviceName)


        '---------------------------
        '   打开CAN口
        '---------------------------
        ErrCode = CANPortOpen(DeviceNum, Port, HostID, Baudrate)
        If ErrCode <> 0 Then
            MsgBox "CAN port open error!", vbOKOnly, "Error"
            Exit Sub
        End If
        isPortOpen = True             'Port opened!

        TxtDevNo.Text = CStr(DeviceNum)
        TxtPort.Text = Port
        TxtDeviceName.Text = DeviceName

        '---------------------------
        '   设置CAN协议
        '---------------------------
        ErrCode = CANSetProtocolType(Port, nProtocolType)
        If ErrCode <> 0 Then
            MsgBox "CAN set protocol type error!", vbOKOnly, "Error"
            Exit Sub
        End If

        '---------------------------
        '   CAN设备重新启动
        '---------------------------
        ErrCode = CANHwReset(Port)
        If ErrCode <> 0 Then
            MsgBox "CAN port HW reset error!", vbOKOnly, "Error"
            Exit Sub
        End If

        '---------------------------
        '   CAN设备初始化
        '---------------------------
        IntMask = 0
        'BTR0 = &H3
        'BTR1 = &H1C
       
        ErrCode = CANInit(Port, BTR0, BTR1, IntMask)
        If ErrCode <> 0 Then
            MsgBox "CAN init error!", vbOKOnly, "RECV"
            Exit Sub
        End If
       
        '---------------------------
        '   CAN口设置输出控制寄存器
        '---------------------------
        ErrCode = CANSetOutCtrl(Port, OutCtrlCode)
        If ErrCode <> 0 Then
            MsgBox "CAN set out control code error!", vbOKOnly, "Error"
            Exit Sub
        End If
           
        '---------------------------
        '   CAN口设置接收码和屏蔽码
        '---------------------------
        ErrCode = CANSetAcp(Port, AcpCode, AcpMask)
        If ErrCode <> 0 Then
            MsgBox "CAN set ACP code error!", vbOKOnly, "Error"
            Exit Sub
        End If

        '---------------------------
        '   CAN口波特率设置
        '---------------------------
        ErrCode = CANSetBaud(Port, BTR0, BTR1)
        If ErrCode <> 0 Then
            MsgBox "CAN set BaudRate error!", vbOKOnly, "Error"
            Exit Sub
        End If

        '---------------------------
        '   CAN口设置为Normal方式
        '---------------------------
        ErrCode = CANSetNormal(Port)
        If ErrCode <> 0 Then
            MsgBox "CAN set normal mode error!", vbOKOnly, "Error"
            Exit Sub
        End If

        '---------------------------
        ' CAN口接收初始化
        '---------------------------
        CANEnableRxInt Port
       
        g_pMsgData = GlobalLock(CANGetAddress(g_MsgData(0)))
        If g_pMsgData = 0 Then
            MsgBox "Not enough memory for message buffer!", vbOKOnly, "Error"
            Exit Sub
        End If
       
        g_pIndex = CANGetAddress(g_BufferIndex)
        If g_pIndex = 0 Then
            MsgBox "Not enough memory for index!", vbOKOnly, "Error"
            Exit Sub
        End If
       
        '---------------------------
        ' 设置CAN缓冲区大小
        '---------------------------
        CANSetBufferPtr Port, g_pMsgData, BUFFER_SIZE, bReady
        If bReady = 0 Then
            MsgBox "CAN set buffer ptr error!", vbOKOnly, "Error"
            Exit Sub
        End If
       
        '---------------------------
        ' 设置CAN计数参数启动计数
        '---------------------------
        CANSetCountPtr Port, g_pIndex, bReady
        If bReady = 0 Then
            MsgBox "CAN set counter ptr error!", vbOKOnly, "Error"
            Exit Sub
        End If

        '---------------------------
        '   CAN事件启动
        '---------------------------
        CANEnableEvent Port, 1

        DisplayTimer1.Enabled = True
       
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
        Dim dwExitCode As Long
        Dim bRet As Long
       
        DisplayTimer1.Enabled = False

        '关闭CAN口
        If isPortOpen = False Then
            Exit Sub
        End If

        ErrCode = CANPortClose(Port)
        If ErrCode <> 0 Then
            MsgBox "CAN port close error!", vbOKOnly, "Error"
            Exit Sub
        End If

        isPortOpen = False

        If g_pMsgData <> 0 Then
            GlobalUnlock (g_pMsgData)
        End If

    End Sub

     

    2楼 回复本楼

    引用 winterswimer 2006/11/20 22:21:17 发表于2楼的内容

  • winterswimer

    winterswimer   |   当前状态:在线

    总积分:2907  2024年可用积分:8

    注册时间: 2006-08-30

    最后登录时间: 2015-10-30

    空间 发短消息加为好友

    winterswimer   发表于 2006/11/21 9:08:45

    CAN UNO-2050   &  FPM工业监视器

    CAN方案分析:

    1、系统精简,监视器可以选配;

    2、抗震性好,适用于车载;

    2、驱动程序支持:提供WINCE平台下CAN驱动程序。

     

    CAN 控制器UNO-2052  特点:

    UNO-2052  带2个CAN总线LAN、USB、RS-232、8DI/O、2AI端口的GX1-300 UNO 

    1、隔离的CAN 2.0B双接口 , CAN控制器: SJA-1000    CAN收发器:82C250
    2、抗震好,适合车载;
    3、带数字量I/O和热电偶输入;
    4、Windows ce 或其他通用平台。


    详细:
    http://www.hmitech.com/product/epc/index.asp?i=15

    监视器可配:6.4 到19寸的液晶显示,同时,可以选配电阻式触摸屏!
    选型请查:
    http://www.hmitech.com/product/index.asp?i=5

    3楼 回复本楼

    引用 winterswimer 2006/11/21 9:08:45 发表于3楼的内容

总共 , 当前 /