Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

need an example program SDM-SW8A


vai7strings Jun 26, 2009 07:56 AM

I will use CR1000, SDM16AC and SDM-SW8A to controll and monitor pump and some valve, I have read the handbook and learning the program, but i'm not understand what the code to reading every single port/channel in SDM-SW8A. in sample program is only measure all channels of an SW8A,example:

'Program Declarations
Public SW8ACount(8)

'Data Table Declarations
DataTable (CountTab,1,1000)
DataInterval (0,1,Min,10)
Sample (8,SW8ACount(),FP2)
EndTable

'Main Program
BeginProg
Scan (1,Sec,3,0)
SDMSW8A (SW8ACount(),8,0,2,1,1.0,0)
CallTable CountTab
NextScan
EndProg

in this case, how to know that channel 1 / others is getting input from pump or valve. Anyone can help me to give a little sample program, please..

Regards,

Vai


jra Jun 30, 2009 01:11 PM

In your CRBasic Editor right click on the blue instruction SDMSW8A, this will bring up the parameter dialog box which will help you decipher what each part of the instruction does.

Destination: SW8ACount()
Repetitions: 8
SDMAdddress: 0
FunctOpt: 2
SW8AStartChan:1
Multiplier: 1
Offset: 0

The Repetitions and SW8AStartChan parameters tell the SDM-SW8A which channels to read. In your example you are looking at all 8 channels (Repetitions parameter) starting with channel 1 (SW8AStartChan parameter).

I hope this helps. If not please post again.
Regards,
Janet

Log in or register to post/reply in the forum.