Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Index postion in scan list

In NI switch or DAQmx switch, is there any way to find out the current position of the scan list?
I have a scan list of about 50 entries and I want an indicator on the front panel for current location in the scan list.
To be able to read out the current channel string would be nice too.
kind regards
Frank Greenslade
New Zealand
0 Kudos
Message 1 of 5
(7,630 Views)

Hi Frank,

Thanks for posting to the discussion forums.  Unfortunately, there is not currently a direct or elegant way of getting the current scan position.  This is a great product suggestion and one that has been requested by other users.  I would strongly encourage you create a product suggestion.  R&D takes time to review each suggestion.



Product Suggestion Center



Depending on how you have programmed your switch device, you may be able to create some simple code to get the functionality you are looking for. If you know how long each scan takes, you could create some code to change an indicator at the approximate time the program should start the next scan.  If you are using a software trigger to advance to the next scan, you could use that same signal to increment an indicator wired to an array containing a copy of your scan list. If you have a hardware trigger setup (synchronous or handshaking configuration), you could route the trigger signal to the source of a counter and use a counter task to count how many scan entries have been completed.

Jared T.
0 Kudos
Message 2 of 5
(7,621 Views)
Hi Jared,
Thanks for you reply. I will copy my original message to product sugestions.
I am using a software trigger advance and have written some code to index through my own lookup table . This works fine. However, there is always the possibility of my code getting out of sync with the hardware scan list. It would be nice to have that 'hard' assurance.
kind regards
Frank Greenslade


0 Kudos
Message 3 of 5
(7,615 Views)

Hi Frank,

I thought I would post one additional suggestion (this might be similar to your lookup table).  You could track the scan position by parsing the scanlist string (dividing it by semicolons).  Then, if you are using synchronous or software triggering, you could have your VI track the scanlist position based on the current semicolon number being executed in your loop.

Jared T.
0 Kudos
Message 4 of 5
(7,595 Views)
Thanks Jared, I have my software sorted now and its functional so I will leave it there for now.
One more thing I thought would be useful is to be able to start the scan from any position in the scan list. eg a set scan postion function. So you supply the index number and it starts from there.And you could probably add a length input .
Some more functionality around the whole scan list would be useful.
kind regards
frank

0 Kudos
Message 5 of 5
(7,586 Views)