Distributed Control & Automation Framework (DCAF)

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan Engine Module and mixed input output modules

I have an EtherCAT module that has both inputs and outputs on it. It seems like the scan engine module can only handle it if you include only the Inputs or only the Outputs in the channel list. Seems like this could be related to the changes where now the module attempts to read multiple channels at once instead of individually as it once did. I have looked at the scan engine module runtime code but haven't had the time to debug this issue. Has anyone seen this issue happen on modules like the NI 9375? If not, it could be something to do with how the address string is --- ni.var.io://localhost/Mod1 vs. ni.var.io://localhost/EtherCAT Master/Device ?

 

0 Kudos
Message 1 of 7
(2,826 Views)

Hi MarkCG,

 

Do you have the latest version of the DCAF Scan Engine Module?

 

I think this is the issue you are referring to: https://github.com/LabVIEW-DCAF/Scan-Engine-Module/issues/62

 

Which I believed I solved in: https://github.com/LabVIEW-DCAF/Scan-Engine-Module/pull/65

 

It was a while ago but I think I had changed the code to check if the container had variables with more than one datatype. If it did, then didn't go with batch read/write but individually channel by channel. I am not quite sure if I tested it with a module that was bidirectional though.

 

Regards,

Andres G

0 Kudos
Message 2 of 7
(2,813 Views)

Hi Andres,

 

yep I do have the latest installed. Works fine with mixed-type modules. I am going to see what I can do inside "Scan engine runtime.lvclass:create module map.vi" to fix it and report back. If it works I'll do a pull request then.

0 Kudos
Message 3 of 7
(2,786 Views)

Ok, I believe I have a solution. Look at the variables for a module. All variables will be readable, AFAIK, whether they write to a physical output or input, so that doesn't matter. For a given module,  ALL variables must writeable (pure output module), OR NONE must be writable (pure input module). This condition, and the condition that all datatypes for the module must be the same, determines whether batch writing is allowed. I tested this with mixed input/output beckhoff module and I can control the outputs and read inputs through DCAF

 

temp4.PNG

Message 4 of 7
(2,774 Views)

BTW should I explicitly close those shared variable refs? They were never explicitly opened but I don't know the subtleties of it

 

0 Kudos
Message 5 of 7
(2,747 Views)

This issue burned me using the NI 9375 module, half DI and half DO.  I tried the same code change and it is working now.

Brand new to DCAF, this ate a chunk of time.  Many thanks, MarkCG!

0 Kudos
Message 6 of 7
(2,658 Views)

happy to hear that Jeremy! BTW do you have any opinion on whether I should explicitly close those shared variables refs? Does it make any difference? I was waiting to do a pull request pending feedback on that

0 Kudos
Message 7 of 7
(2,640 Views)