LabVIEW Time Sensitive Networking (TSN)

cancel
Showing results for 
Search instead for 
Did you mean: 

Star topology (2 cRIOs and 1 IE4000 switch) : synchronisation not working

Solved!
Go to solution

Hi,

 

I'm using 2 9035 cRIOs and 1 switch IE4000.

I've followed the procedure to install and enable TSN on the switch.

When I run the example 'cRIO Synchronized Logging using TSN', my 2 cRIOs are far to be synchronized !

It even seems that they don't see each other on the TSN network as the Master are 'themselves'. I was expected one to be a master and the other one to be a slave (pointing the other cRIO being the GrandMaster). Am I right here ?

 

Even the synchronisation status stays to 'disabled' state.

 

My purpose is not to send deterministic data from 1 cRIO to another, but get all cRIOs to acquire their samples at the same time. I was expecting them to choose automatically one master on the network and discipline their clock based on the master time. Is that really possible ?

 

Do I have to declare something into the switch ?

 

I'm pretty lost here ! Help !

CLA, CTA

View Cyril Gambini's profile on LinkedIn
0 Kudos
Message 1 of 14
(2,638 Views)

Hi CyGa,

 

It sounds like PTP may not be enabled on the switch. Can you telnet or console into the switch and type "show run" and send me the result?

 

Thanks,

-Ty

Ty Prather
Technical Marketing Specialist
National Instruments
0 Kudos
Message 2 of 14
(2,630 Views)

That might indicate that devices are not able to see each other using 802.1AS protocol. Since you only have two cRIOs you can connect them directly to each other using eth0 port. This way you can temporarily eliminate IE4000 switch out of the equation.  

 

When you connect cRIOs directly, one should become a master and another the slave. If that works then that means something is not setup right on your switch. If that doesn’t work then you probably have not installed 8021AS time reference to your cRIOs, or using a wrong ethernet port (for example eth1).

 

Try it that and post back.

0 Kudos
Message 3 of 14
(2,626 Views)

I truncated things related to password and crypto

Here it is :

Building configuration...

Current configuration : 3296 bytes
!
! Last configuration change at 14:28:48 UTC Wed Feb 7 2018
!
version 15.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service internal
!
hostname MyTSNSwitch-Cisco-A
!
boot-start-marker
boot-end-marker
!
!
enable secret 5 $1$9c5e$VVBad621Edx4TgXUfKHyg1
!
username admin privilege 15 secret 5 $1$gimT$01kaqpPRFTwZRvSd0NSpa.
no aaa new-model
system mtu routing 1500
ip arp inspection vlan 1000
ip arp inspection vlan 1000 logging dhcp-bindings none
!
!
!
no profinet
!
!
!
!
!
ptp profile dot1as
!
!
crypto pki trustpoint TP-self-signed-1932256512
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-1932256512
revocation-check none
rsakeypair TP-self-signed-1932256512
!
!
crypto pki certificate chain TP-self-signed-1932256512
certificate self-signed 01
3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030
...
spanning-tree mode rapid-pvst
spanning-tree extend system-id
cip security password ...
!
alarm profile defaultPort
alarm not-operating
syslog not-operating
notifies not-operating
!
!
!
!
lldp run
!
!
!
!
!
interface GigabitEthernet1/1
switchport access vlan 1000
switchport mode trunk
ip arp inspection trust
media-type rj45
spanning-tree portfast edge
!
interface GigabitEthernet1/2
!
interface GigabitEthernet1/3
!
interface GigabitEthernet1/4
!
interface GigabitEthernet1/5
!
interface GigabitEthernet1/6
!
interface GigabitEthernet1/7
!
interface GigabitEthernet1/8
!
interface GigabitEthernet1/9
!
interface GigabitEthernet1/10
!
interface GigabitEthernet1/11
!
interface GigabitEthernet1/12
!
interface Vlan1
ip address 131.195.94.11 255.255.0.0
cip enable
!
interface Vlan1000
ip address 169.254.0.1 255.0.0.0
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server

!
!
!
!
!
!
vstack
!
line con 0
password 7 ...
login
line vty 0 4
password 7 ...
login
line vty 5 15
password 7 ...
login
!
!
end

CLA, CTA

View Cyril Gambini's profile on LinkedIn
0 Kudos
Message 4 of 14
(2,622 Views)

Miro_T,

 

Today I have 2 cRIOs to experiment, but when deployed on real systems, I'll be using up to 8 cRIOs.

So I need it to make it work with the switch. The daisy-chain topology will never be used in my case.

Please find attached the list of SW installed on the targets.

Both cRIOs are connected to the switch with eth0.

CLA, CTA

View Cyril Gambini's profile on LinkedIn
0 Kudos
Message 5 of 14
(2,620 Views)

Also if that helps, here is the PTP webpage that the switch exposes.

CLA, CTA

View Cyril Gambini's profile on LinkedIn
Download All
0 Kudos
Message 6 of 14
(2,613 Views)

Hi Cyga,

 

I was just simply trying to narrow down the problem. If you connect two cRIOs directly and one cRIO becomes a master and another the slave, then you can assume that 802.1AS is working properly on your cRIOs. We can then turn our focus on the switch.

 

Your software cRIO installation appears to be correct. However, it would be still worth connecting two cRIOs directly for a quick test.

 

I don’t see anything suspicious in your “show run” logs. To get better understanding on what is happening on the 802.1AS network from the IE4K switch “use show ptp ?”

https://www.cisco.com/c/en/us/td/docs/switches/lan/cisco_ie4000/software/release/15-2_4_e/b_ptp_ie4k...

Useful info would be show 'ptp port GigabitEthernet1/x' where x is the port number where a cRIO is connected to.

0 Kudos
Message 7 of 14
(2,582 Views)

All right, I'll try to connect both cRIOs directly together.

Meanwhile, I attached nimstd logs that I found on the cRIOs. It seems that after starting the timesync daemon, these daemons stop running after the first ptp evaluation....

 

Here is the 'sh ptp port gigabitethernet' command results :

MySwitch-Cisco-A#sh ptp port GigabitEthernet1/5

 PTP PORT DATASET: GigabitEthernet1/5

  Port identity: clock identity: 0x0:5D:73:FF:FE:2B:E5:0

  Port identity: port number: 5

  PTP version: 2

  Port state: MASTER

  Delay request interval(log mean): 5

  Announce receipt time out: 3

  Announce interval(log mean): 1

  Sync interval(log mean): -3

  Delay Mechanism: End to End

  Peer delay request interval(log mean): 5

  Sync fault limit: 500000

 

MySwitch-Cisco-A#sh ptp port GigabitEthernet1/6

 PTP PORT DATASET: GigabitEthernet1/6

  Port identity: clock identity: 0x0:5D:73:FF:FE:2B:E5:0

  Port identity: port number: 6

  PTP version: 2

  Port state: MASTER

  Delay request interval(log mean): 5

  Announce receipt time out: 3

  Announce interval(log mean): 1

  Sync interval(log mean): -3

  Delay Mechanism: End to End

  Peer delay request interval(log mean): 5

  Sync fault limit: 500000

 

CLA, CTA

View Cyril Gambini's profile on LinkedIn
Download All
0 Kudos
Message 8 of 14
(2,574 Views)

The nitsmd log shows states flip flopping. That can mean few things... ethernet cable is getting unplugged/replugged, cable might be very long (>100m), sync packets might not be arriving properly. How you done any protocol configuration changes after the Cisco switch setup and cRIO SW installation?

 

Can you send me 'tr_8021as_rt_ethX.log' logs from each cRIO? That might give me more insight from the cRIO prospective. 

 

reference:
http://www.ni.com/product-documentation/53981/en/#Monitor.1AS

0 Kudos
Message 9 of 14
(2,565 Views)

Hi Miro_T,

Ethernet cables are 10m long, brand new and mechanically locked. So, except intentionally when I check the cabling, the Ethernet connection is OK.

I followed the Cisco procedure to setup the switch and TSN, which somehow not easy an esay thing. So I guess I didn't do anything about protocol configuration. I didn't even try to set up a CNC.

On the cRIO side, I didn't modify anything. I just formatted my actual 2 9035, and reinstall everything with the latest versions. As you can on the previous pictures, the software steup is pretty clean.

The code running on the cRIO comes from the NI example 'cRIO Synchronized Logging using TSN'. I only modified the FPGA to acquire samples from a 9229 and a 9220.

 

Please find attached the required logs.

CLA, CTA

View Cyril Gambini's profile on LinkedIn
Download All
0 Kudos
Message 10 of 14
(2,549 Views)