LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I log each time a user logs into Labview?

I am new to using labview. I was using the DSC module to control access, and I was wondering how I can set it up so that each time a user logs into labview it keeps a record so I can see who is running the program. Thanks.
0 Kudos
Message 1 of 9
(4,028 Views)
Do you mean who logs into LabVIEW or who logs into your application running under LabVIEW?
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 9
(4,008 Views)
I'm not entirely sure I'm understanding the difference, but if I were guessing I'd have to say logging into my application running under labview.
0 Kudos
Message 3 of 9
(4,007 Views)
Whenever a user logs in, write the user name and time-date into a file.  You can also write when he logs out.  Just write a simple text file.  You can use Notepad to inspect the file to see who was logged in and at what time.  Your file could look like:
User1:login:10-23-05:0905
User1:logout:10-23005:0915
From this you can see that User1 was on for 10 mintues on 10/23/05 from 9:05am to 9:15am.  10/23/05???  Nothing like a program that can see into the future.
 
- tbob

Inventor of the WORM Global
Message 4 of 9
(3,999 Views)
Thanks for the advice...but how do I actually DO that? Like I said, I'm extremely new to using LabVIEW. I've been working with it for about a week, and have minimal programming experience prior to that, so don't take for granted I know how to do all the basic things yet. Thanks.
0 Kudos
Message 5 of 9
(3,996 Views)
See the attached vi.  It opens a file and appends a string to the end of the file.  The string contains the user name, login or logout, date, and time, all separated by tabs.  The line ends with a newline character so that the next entry can begin on a new line.  You can insert this vi into your vi and wire the user name and action boolean into the connector pane.  The user name is a string, the action is a boolean, True for a logout action and False for a login action.  You can modify this to a string if you wish.  If you need further help, just ask.
 
- tbob

Inventor of the WORM Global
Message 6 of 9
(3,986 Views)
Thank you very much. This is exactly what I was looking for. I also picked up a few more things from reading your comments about
the program. It's slow getting started in an environment that's completely new to me, but I'm definitely liking LabVIEW. Thanks again for all your help.
0 Kudos
Message 7 of 9
(3,963 Views)

Hi there,

 

Thanks for your help. I almost wanted to do similarly but i wanted to record just log in and log out time in DD/mm/yyyy hrs/min/seconds format in excel. Myself is very new to labview and any help wil be really appreciable.

 

Example I logged in on 14th april 2020 at 15 30 and log out at 15 44 then i would like to get results as just

 

USERNAME: Krish

LOG IN : 14/04/2020 15:30:08

LOG OUT: 14/04/2020 15:44:44

 

Thanks a lot,

Krish

0 Kudos
Message 8 of 9
(2,891 Views)

Hi Krish,

 


@Krish1988 wrote:

Thanks for your help. I almost wanted to do similarly but i wanted to record just log in and log out time in DD/mm/yyyy hrs/min/seconds format in excel. Myself is very new to labview and any help wil be really appreciable.

 

Example I logged in on 14th april 2020 at 15 30 and log out at 15 44 then i would like to get results as just

 

USERNAME: Krish

LOG IN : 14/04/2020 15:30:08

LOG OUT: 14/04/2020 15:44:44


So you picked a very old thread - did you even test the VI posted 15 years ago?

Does it fit your needs? If no: what's wrong with it?

 

When you are new to LabVIEW: NI offers a lot of training resources - even for free until end of April!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 9
(2,871 Views)