VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Inline Timing & Sync

Solved!
Go to solution

Hi !

 

I created an Inline Timing & Sync Custom device using the Custom device Template Tool provided by NI.

 

After loosing one day in tests, it seems that the deviceRef passed to the RT Driver is equal to 0. At first i thought i made a mistake in my Custom device, therefore i created a new one with nothing in (only the template and a call to the Debug string to display the Device Reference to the Console in the Initialize State). I also get 0 !!!

 

After that i tried with a Inline Custom device, the Inline custom device correctly returns the Reference.

 

I think there is a problem with the Inline Timing and Sync structure !! Does anyone have an answer ??

 

I really need to know if i can use this kind of template of if i have to wait 2012 release !

Message 1 of 13
(8,142 Views)

By the way, what's the difference between an Inline and an Inline Timing and Sync ?

 

Can i use an Inline custom device if i change the installer options (to build the llb in Timing and Sync directory), and if i set the property is RTSI0 Capable Flag ?

 

 

0 Kudos
Message 2 of 13
(8,136 Views)

No Answer ??

 

My previous idea was not really interesting, if i use an inline HW instead of a Inline Timing and sync, the custom device will not appear in the good section (in custom device instead of Timing and Sync)...

 

So i made a new test, i started from an Inline HW Custom device, modify the xml to transform it to an Inline Timing and Sync... and if the Inline HW works properly, i get a NULL reference when i transform it in Inline Timing and Sync...

 

Well i think the Inline Timing and Sync is buggy !

 

Is all NI team on holliday ?

 

 

0 Kudos
Message 3 of 13
(8,093 Views)

Hi,

 

First of all, I apologize for the delayed response; we are looking into why this post was not seen.

 

I've looked into the issue that you're reporting and there is indeed a recently reported bug with the Inline Timing and Sync custom device. As you have seen, the references come back incorrectly, making the custom device unusable for intended purpose. I know that R&D is working to get this fixed as soon as possible. The Corrective Action Request number is #382683 - you can check future releases of VeriStand to see if this issue has been corrected.

 

Meanwhile, what are you trying to use this custom device for? What exactly do you need the Timing & Sync functionality to acccomplish? 

 

You may be able to work around the issue by building the custom device as an inline timing and sync device but changing the device type in xml to async timing and sync. During initialization, use the Set Custom Device Execution Mode to change the device back to an inline device. Then, you should be able to set the chassis timing from the custom device. There is an example of this implementation here: https://decibel.ni.com/content/docs/DOC-15404 . I recommend looking at that example and getting some ideas for how to code your device.

 

(Just as a caution, even with this implementation, there is a separate issue where FPGA and DAQ devices don't slave to RTSI0 when a timing and sync device is specified as the timing master)

Message 4 of 13
(8,039 Views)

Hi

 

Thanks for this answer, so that's what i tought.

 

During this time i made some other tests here is the workaround i found :

I created an asynchronous timing and sync and synchronize it with the PCL using the FIFO. The PCL write to the FIFO every cycle, so i  wait for having an element in the Input FIFO to execute the code. My code is synchronized with the PCL (one cycle late).

 

Well, here is what i wanted to do. The aim of this custom device is to synchronize severeal PXI chassis with 1588 network (PXI 6682H boards). All chassis share the same clock using 1588 prorocol. Then, on each chassis i create a 1 MHz clock (synchronized with 1588) on a PFI. This clock will be used as MasterTimeBase for the acquisition done by other VCD. I also generate a StartTrigger pulse on another PFI (create future time event) and a clock signal on RTSI0 to synchronize VeriStand PCL with 1588.

 

At first i developped an asynchronous timing and sync VCD and i read properties from the 6682 board like currentTime, Clock State ... every 100ms. I made some test and i thought it could be interesting to read the Time every cycle, the channel time will have the correct time and could then be used by other custom device as Reference time. The problem is the call to niSync Getproperties takes 3.5 ms at the Log Sync Interval. I mean if i choose 500 ms as Log Sync Interval (1588 properties), the GetProperties will takes 3.5 ms every 500ms. I observe the quite the same phenomena with the GetTime function. Usually it take 140µs and sometimes it takes 3 ms. I think there is a lock problem.

 

So my code can not be executed in inline anyway. I will execute this code in asynchronous as before, and will find an other way to calculate the real time (using start time and number of cycle).

 

I already read a post that this will not work with DAQ devices (maybe in 2012...).

 

0 Kudos
Message 5 of 13
(8,026 Views)

You should check out the Clock 10 Discipline Add-On for NI VeriStand. That will discipline the reference clock of the PXI chassis (10 MHz)  based upon an external time reference you configure in MAX (1588, GPS, IRIG-B, PPS). It uses a 6682 and a 6653 (PXI) or 6674T (PXIe). It is open source so you can modify it for your needs. It reports lock status and offset.

 

Additionally, you should check out the TimeSync plugin for NI-Sync. This makes the 6682 drive the RT system time so you can just use the normal Get DateTime In Seconds function in LV to get the time of whatever the time source to the 6682 is (1588 for example)

Stephen B
0 Kudos
Message 6 of 13
(8,006 Views)

Hi Stephen.

 

I already checked the Clock 10 discipline Add-On ... the problem is i don't have a 6653 or a 6674T that's why i'm trying to develop my own custom device.

 

The Clock 10 Discipline Software only call high level vi wich are password protected... so i don't think this will help me a lot. But i noticed this custom device also run in asynchronous and it seems the properties are only read every second...so i think you encountered the same problem ....

 

I will take a look at TimeSync plugin ... thanks.

 

0 Kudos
Message 7 of 13
(8,001 Views)

Yeah they are really slow properties. You shouldn't need to read them very often though

Stephen B
0 Kudos
Message 8 of 13
(7,995 Views)

Hi Stephen.

 

I wanted to try the TimeSync plugin for NI-Sync. So i followed the instructions, i.e.

- I downloaded and installed the NI-TimeSync 1.2

- I installed the software through MAX

 

The problem is as written i wanted to change the file "/ni-rt/system/ni-timesync/ni-timesync-nisync.ini"

This file doesn't exist on my target. In the directory C:/ni-rt/system/ni-timesync/  I have two files :

- readme.txt

- ni-timesync-ptp.ini

 

I checked on other targets, this file is still missing.

 

Therefore, I tryed to create the file and add the parameter "source.nisync.deviceName = PXI-6682H". I also tryed to add this line in the existing file : ni-timesync-ptp.ini without success. 

 

I order to check the 6682 drive the RT system time, i modified the time of the 1588 board (through the test pannel of the 6682H board), i reboot the target and i check the time of the RT target. Unfortunately it doesn't work, the time of the target is nor updated with the new 1588 time.

 

Am i doing something wrong?

Actually, i only have one chassis and one 1588 board which act like a master.

0 Kudos
Message 9 of 13
(7,528 Views)

Ok

I reinstalled the software from MAX including the NI-TimeSync Plugin ...

 

Now the file"/ni-rt/system/ni-timesync/ni-timesync-nisync.ini"  is created.

I modified the file with the name of my 6682H board...

 

 

But again, when i do the same test, i.e. i modify the time of the 6682, i reboot the target, i try to read the time of the target. It doesn't work!

 

0 Kudos
Message 10 of 13
(7,520 Views)