I have used cFP several times in the past, but I have encountered a new problem with a RT application I have created which I have never seen. The RT application which is running on the cFP I am using utilizes almost every IO in 6 of an 8 slot backplane, and almost all the in and outs have to be manipulated, passed somewhere, have calculations run on it, there are three PIDs, etc. In short, the main execution thread is huge, and there are four smaller threads that handle datalogging, and communication via TCP to a GUI. I only say this because I have never had a program nearly this big and complex running on a cFP, and I wonder if I have pushed the thing too far. However, the main loop only executes every 100ms; I thought that would be enough time. I have attached a screen shot of the subVI that is causeing problems.
Anyway, the problem I have is that when I start the application, several outpus from a DO-401 go high in response to a switch, then they are supposed to periodically go low, then high again, until the switch is turned off, at which time they all go low, and stay low. To simplify the code, I have the FieldPoint write and read functions in For Loops, whcih I thought also might be the cause of the problem, but I don't know why. Anyway, often, when I run the program all the outputs will be written to once, and then, especially with the DO-401, none of the values will update. That is, the program is definitely sending the right address and value to the cFP, but the DO module doesn't respond, although sometimes it does. I tried setting the On Change parameter to both turn and false, but it didn't seem to make a difference. The only thing I have to go on is error code -33156, which I can't find a definition for anywhere. I sometimes see this code as a result of the FieldPoint write finctions, though not always, usually there is no error. Also, I tried putting all the writes in one For Loop, but that didn't make a difference. I even made anouther program that only contained a for loop which wrote to the same DO channel multiple times, and it didn't work either, which makes me think that the problem has something to do with having the FieldPoint Writes in a For Loop. I haven't had time to check this theory, but I don't know why that would cause the problem.
Thanks,
Jo-Jo