Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

What does "System Exec.vi" do in LV Real-Time?

Hello

I'm curious if there are any command-line commands for my PXI RT system (PXI-8186). I've tried things like "cd", "dir", "ls", and "ping" in the "command line" field in "System Exec.vi" with no luck (I get error code 1).

Mostly I'm just curious, but I'd like to be able to mimic the windows "NET TIME" command.

Thanks,

Jaegen
0 Kudos
Message 1 of 6
(4,565 Views)
I don't know if this relevant for PXI, but FieldPoints have a time server setting in max. If this isn't available, I'm sure there are examples available for how to sync time with a server. I remember a specific example for FieldPoint which uses an NI DLL (I think is was called settime.dll) and which allows you to set the time on the RT target. Even if not, I assume writing some code for this will be fairly simple, unless you want a high level of precision. My first suggestion would be to check MAX and look for examples on this site.
I haven't heard of RT commandline commands, but it would be interesting to find out if there are some...

___________________
Try to take over the world!
0 Kudos
Message 2 of 6
(4,559 Views)
Jaegen,

Thanks for making your post. You bring up an interesting question about the System Exec.vi in LabVIEW RT. I am not aware of any system commands that are available for use under LabVIEW RT, so I don't think you are going to be successful trying to use system commands to set your time clock.

However, if you are just looking to set the time on your RT system, this can be done by using the "RT Set Date and Time.vi." This may be what you are looking to do.

If this is not the case, could you please post some additional information about your application and what you are hoping to accomplish. With that information I think that this forum might be a little bit better equipped to help with your issue.

Regards,
Jed R.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 6
(4,555 Views)
It's OK - I really was just curious ...

We have some older NT servers on our network which still support the old "time" protocol on port 37, so I'm able to synch the time using some very simply TCP functions (if anyone wants to see how I did this, let me know). Once I get the time I use "RT Set Date and Time.vi" to update the system clock.

However, since we've discovered that the system clock isn't properly maintained in LV-RT (see this thread: http://forums.ni.com/ni/board/message?board.id=280&message.id=804), I also use the server time to maintain my own real-time counter, using the micro-second timer (which _is_ maintained properly).

Cheers,

Jaegen
0 Kudos
Message 4 of 6
(4,549 Views)
Jaegen,

It sounds like you have this all under control, but I thought that I would add something for you. We have been working on an Example Program that synchs up your RT target to an external time server. It hasn't been posted to our website yet, but I am going to go ahead an attach it to this email so you can review it if you are interested. Here is the Example Program's description:

"This example program capitalizes on RT Set Date and Time.vi to get/set system date and time on any RT target with an ETS real-time operating system. User is given the choice to simply read back current system date and time, set the system date and time to be in accordance with external time servers, or manually set the date and time of the RT system.

This VI opens a connection to a Network Time Protocol (NTP) server. The example uses two NIST time servers, time-a.nist.gov and time-b.nist.gov. You can get a list of other public time servers from the Internet. After establishing a connection to an NTP server, the VI gets and sets the system time. For more information on these time servers, follow the included link to the NIST website. "


Regards,
Jed R.
Applications Engineer
National Instruments

Message Edited by dejspin on 03-24-2005 06:04 PM

Message 5 of 6
(4,535 Views)
Thanks a lot.

However, currently our firewall blocks access to these servers - otherwise I would have implemented something exactly like this.

Jaegen
0 Kudos
Message 6 of 6
(4,528 Views)