‎09-25-2015 02:16 PM
Hi Community,
I have an NI 9485 SSR module which I'd like to use to turn high power SSRs on and off according to predefined schedule. I have created a VI (shown below) which does the job for me.
RLY0 refers to RLY0 in my schematic, RLY3 refers to RLY3 in my schematic. Coincidently I control RLY0 with Line0, and RLY3 with line3. (virtual channels defined in MAX)
The problem I have with this solution is that however I create the task from my virtual channels, I still need to refer to my outputs with an U8 port format so if later the wiring changes then its not enough to change the MAX settings, I need to change the source code as well. Ideally I would like to control my signals with a 2D array of booleans (switching would happen according to the RATE input), but I was unable to write a VI which does this. The closest I got is this, but the VI only switching RLY0 and RLY3 on and then off periodically and it doesnt seem to consider the 2nd row of the array.
I assume I am slipping on a banana and the solution would be quite obvious. Please help me out.
thx!
‎09-28-2015 12:00 PM
Hey,
Could you expand a little on what the output is like? You said that the two lines switch on the then periodically turns off, could you explain a little more. Is it both lines that are seeing this behavior or just one? Does the line/lines turn back on after a period of time?
‎09-28-2015 12:12 PM - edited ‎09-28-2015 12:16 PM
Hey,
If I run the 2nd snippet then both outputs turn on for 0.5s and then off for 0.5s (and repeats it coupe times as dictated by the number of Samples constant). What I would like to realize is RLY0 blinking while RLY3 is always on. This is what I tried to realize with the 2D bool array. It does not work this way though.
thanks
‎09-30-2015 09:07 AM
Hey,
It appears that you are trying to write to multiple Channels; however, you should just be writing to one channel. Try to use 1 Channel with 1D array Bools and update that value when you write to it, also you can try to write a 1 Channel 2D array Bools and index through it with a for loop; however, the cleanest solution is just to use the U8 data.
‎09-30-2015 09:39 AM
Yeah, but the thing is that turning my outputs on and off should be extremely well timed (less than +/-1ms). If I write the channels one by one then the timing will be really incosistent. (same if I write the channels at the same time, but one set of sampe at a time). Except if there is a secret technique I am not aware of.
The first snippet does exactly what I want to do, but its bothering that if later I change the wiring then I will need to change the source code instead of just changing the channels in MAX. (eg RLY3 will be operated by line4 instead of line3)
‎10-02-2015 10:14 AM
Hey,
So after looking into it, it appears that you will have to go with your first snippet of code and if your setup changes you with have to modify your code.
‎10-02-2015 06:13 PM
Well... that sucks... I never had a problem like this with analog channels.