BITS real-valued function BITS real-valued function Syntax BITS (first_sig, num_sigs ) Function Read multiple digital signals and return the value corresponding to the binary bit pattern present on the signals. Usage Considerations External digital input or output signals, or internal software signals can be referenced. A maximum of 32 signals can be read at one time. Any group of up to 32 signals can be read, provided that all the signals in the group are configured for use by the system. Parameters first_sig Real-valued expression defining the lowest-numbered signal to be read. num_sigs Optional real-valued expression specifying the number of signals to be affected.
A value of 1 is assumed if none is specified. The maximum valid value is 32 . Details This function returns a value that corresponds to the binary bit pattern present on 1 to 32 digital signals. The binary representation of the value returned by the function has its least-significant bit determined by signal numbered first_sig , and its higher-order bits determined by the next num_sigs -1 signals. Example Assume that the following input signal states are present: Signal: 1008 1007 1006 1005 1004 1003 1002 1001 State: 1 1 0 1 0 1 1 0 The program step: x = BITS(1003, 4) eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 93