FlexLogger

cancel
Showing results for 
Search instead for 
Did you mean: 

Flexlogger Sequence Plugin

Hello everybody, 

 

i want to automatize a sequence in Flexlogger, but unfortunately i don´t have LabView. There is a Plugin availabe, which can hopefully be adapted, this is saved in the attachment.

I´m using a cDAQ-9179 and a NI-9481 Relay-Card. I want to have the following sequence:

 

Step 1: Line 0 of NI-9481 switched on, Line 1 of NI-9481 switched off for 120s

Step 2: Line 1 of NI-9481 switched on, Line 0 of NI-9481 switched off for 120s

This sequence should be repeated 50 times.

 

Can anyone explain me, how i can realize this in Flexlogger, or maybe adapt the Plugin in a way, that this is working as expected?

 

BR,

Andi

0 Kudos
Message 1 of 3
(281 Views)

Since you don't have LabVIEW, you can use Python to automate FlexLogger instead.
Automating FlexLogger Tests Using Python

Getting Started — flexlogger documentation

niflexlogger-automation-python/examples/Test Sequencer at main · ni/niflexlogger-automation-python ·...

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 3
(247 Views)

Hello ZY0ng, 

 

I´m aware of the posibility of using the Python API. I was testing it with the function to set the value of a channel, here the example of the NI-Website:

 

import os
import sys
from flexlogger.automation import Application
def main(project_path):
    """Launch FlexLogger, open a project, and sets the value of a channel."""
    with Application.launch() as app:
        project = app.open_project(path=project_path)
        channel_name = input("Enter the name of the channel to set the value of: ")
        channel_value = input("Enter the new channel value: ")
        channel_specification = project.open_channel_specification_document()
        channel_specification.set_channel_value(channel_name, float(channel_value))
        print("Channel value set. Press Enter to close the project...")
        input()
        project.close()
    return 0
if __name__ == "__main__":
    argv = sys.argv
    if len(argv) < 2:
        print("Usage: %s <path of project to open>" % os.path.basename(__file__))
        sys.exit()
    project_path_arg = argv[1]
    sys.exit(main(project_path_arg))

But this was unfortunately not working. I´ve always received an error, because i wanted to set the value of the NI-9481 Relais Module to "High". I´ve also tested it with the value "1". Each time flexlogger crashed, because flexlogger is expecting a FLOAT.

Can you maybe help me here?

 

BR,

Andi 

0 Kudos
Message 3 of 3
(239 Views)