caz
2008-01-03 22:10:08 UTC
I am doing a temp control scheme using two 9485 solid state relays for pulse width modulation of the power flowing through some resistive heaters. I've attached a first cut of my code and it contains 2 tasks, one for the analog tempeature measurement and one for the digital generation to the relays. The problem is with the digital generation. I've tried a test vi that simply writes an array of U32s to a single port of one of the relays and the behavior I see on an external scope is not what I am expecting. I would like to know how to simply have a single line output an arbitrary pattern of 1 and 0s using hardware timing. I not really sure which clock to use but I have been using the 20MHz clock as my source. This may be the problem. Otherwise, it has to do with how the data is written.
The other issue I've been wresting with deals with the continuous generation. I use a queue to pass data from my temp read loop to the digitial update loop. How do I confirm that previous write is completed before it starts using the new data? Any help would be appreciated.
Thanks
DC
TDM_temp_control_queue_rev0.vi:
http://forums.ni.com/attachments/ni/70/7984/1/TDM_temp_control_queue_rev0.vi
PWM_digital_data.vi:
http://forums.ni.com/attachments/ni/70/7984/2/PWM_digital_data.vi
The other issue I've been wresting with deals with the continuous generation. I use a queue to pass data from my temp read loop to the digitial update loop. How do I confirm that previous write is completed before it starts using the new data? Any help would be appreciated.
Thanks
DC
TDM_temp_control_queue_rev0.vi:
http://forums.ni.com/attachments/ni/70/7984/1/TDM_temp_control_queue_rev0.vi
PWM_digital_data.vi:
http://forums.ni.com/attachments/ni/70/7984/2/PWM_digital_data.vi