LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-Sync with cRIO-9035

Solved!
Go to solution

LindSW,

 

I tried closing the file, reading it, then re-opening the file, but had not success and have the file permissions issue.

I am still getting the permission error discussed in the last post.

I attached the modified project to constanly close, read, then re-open the file.

 

Thank you,

Keith

Message 11 of 14
(2,604 Views)

Hi Keith,

 

Try changing the access mode to "read-only" on the Open/Create/Replace File VI. By default that VI will try to open files with read/write access, but the status file is a read-only file.

 

Message 12 of 14
(2,595 Views)

LindsW,

 

I did that, but I did not see any data in the string output from the "read from file" VI.

 

Here is the error after running the VI on the cRIO for about 30 seconds when the error case statement is disabled (does not run the case statement, just reads the file constantly after the initial open file:

 

Error 2 occurred at Read from Text File in 1588_cRIO_Client_PXIgrandmaster.vi

Possible reason(s):
LabVIEW:  Memory is full.

/var/run/ptp_eth1.status

 

I received the same error when I enabled the case statement in the cRIO_Client VI.

 

I attached the updated project.

 

1) Is there a way to read from this file???

I need to see the status of the 1588.

 

Thank you,

Keith

Message 13 of 14
(2,586 Views)
Solution
Accepted by topic author KeithLV

LindsW,

 

I fixed the issue. The "/var/run/ptp_eth1.status" file was being opened and closed each second.

I re-read the article: http://digital.ni.com/public.nsf/allkb/3FBB102D0D65AE3486257D88007CCB20

It states: "The status file is recreated periodically (about once per second) and when the PTP Engine resets. Therefore, the file may not be readable at a given instant."

The cRIO ran out of memory because the "Read from File" was reading off of the "old" file reference when the file was deleted by NI-Sync.

 

I attached the working VI for anyone that needs it.

Please note the cRIO is using port #2 (Eth1 NOT Eth0) for ethernet 1588 PTPv2 traffic with NI-Sync.

Message 14 of 14
(2,575 Views)