LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accesing Multiple I/O Channels cRIO

Solved!
Go to solution

Hi guys,

I had taken over the previous code done by my predecessor for the cRIO but the interfacing that he used is not very efficient. In order to write to multiple channels on the NI9403 (32 Channels Digital/Input Output Module), he used a boolean array and indexed the individual values out to write to the Channels which makes the block diagram very big (total of 24 channels).

Array Created.png

Is there a better solution to interface with Multiple CompactRIO Channels in Scan Mode to write to the DIO Channels as compared to the existing one?
Model used: cRIO 9074
Mode: compactRIO Scan Interface
Thanks!
Cyongjed
0 Kudos
Message 1 of 8
(3,436 Views)

Hi cyongjed,

 


@cyongjed wrote:

Is there a better solution to interface with Multiple CompactRIO Channels in Scan Mode to write to the DIO Channels as compared to the existing one?
Model used: cRIO 9074
Mode: compactRIO Scan Interface


In FPGA mode you get the option to access the DIO channels of the NI9403 module as U8/U16/U32 value by grouping them like DIO0:7. Then you would need just 2 or 3 IO nodes to acces 24 channels…

 

As I didn't use the ScanMode on cRIO (too many limitations) I strongly prefer to utilize the FPGA of your cRIO!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,427 Views)

Hi GerdW,
Thank you for the reply. I thought of it too initially, but I have some limitations faced here as the FPGA Module was not purchased by my company they only got the RT Module SSL License. Hence kinda restricted to use the scan mode for now till the next sales purchase renewal with NI.
Are there any other suggestions that you could advise me for this case, please? Thanks!

Regards,

Cyongjed

0 Kudos
Message 3 of 8
(3,422 Views)

Hi cyongjed,

 

in ScanMode your options are limited, so you access each IO pin using its own IO node…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,395 Views)

I'm not certain but I seem to remember if you right-click on the module and go to its properties there may be an option there to change the mode in scan mode. Worth checking.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 5 of 8
(3,388 Views)

You can access the I/O programmatically. See the shipping example

<LabVIEW>\examples\CompactRIO\NI Scan Engine\Advanced\Programmatic IO Access - Scan Mode\Programmatic IO Access - Scan Mode.vi

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

Hi ZY,

Thanks for the suggestion. However when I was looking through the examples it is used for all I/O Variables in the Scan Mode. For my case, I only require 24 of them, any suggestions for this please?

Thanks!

0 Kudos
Message 7 of 8
(3,347 Views)
Solution
Accepted by topic author cyongjed

The example uses a for loop to index all elements in the array. You can wire a value to the Loop Count input to force the for loop to run less iteration. 

ZYOng_0-1692202838808.png

 

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
Message 8 of 8
(3,340 Views)