brownx Posted September 28, 2020 Report Share Posted September 28, 2020 Hi I need to make a scalable data acquisition system (I have to deal between 1 and 20 of hardware cards in the same time). The systems are based on polling and have quite much data in and out. Tried to use arrays of data, arrays of clusters, than arrays of classes and with all of them my problem was the multiple data copies while I am doing a single operation (one input change causes a copy of the whole array of all inputs or clusters or classes). Thought about functional variables too but that is hard to scale (with my current labview experience). So I decided to use references - the basic idea is below - it it a valid one ore I try to push my luck with something not recommended? DataIn is a bool array representing a set of inputs (there will be more, also numeric ones). In the final solution the Ref_DataIn probably will be a global, the rest of the loops will be in different reentrant VI's (except the creation of the references from frame 1 which probably will be non-reentrant or synced). Also I would like to know the granularity of Labview in the sense of reference variables (Ref_DataIn and his elements in the case below) - do I need to sync the read and write of the values or it is good as it is? I would like to avoid reading the Value while the data acquisition loops write it - it is not a problem if I read an array half old, half new values but it is a problem if I read empty array or half array when this kind of collision occurs. Have no idea how this works in Labview - in C/C++ I would need to sync it. Any other input is welcome, I come from the C,C++ world with more than 20 years of experience, I could make this work in a few days in a DLL and than import it in Labview but the problem is others have to access, slightly modify and easily maintain the whole structure even on site which is easier if I leave everything in Labview ... Thank You ... Quote Link to comment
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.