LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Like enumerated!

 

 

Hi folks, I’d like to pass something like a BCD to another PLC over a serial link to represent discrete alerts of up to 16 other systems to indicate they are operational at any given time. My first thought was to use a 4-bit code to and adopt an enumerated type approach. where if 0 was sent then system 1 was operational, or if 15 was sent then system 15 was operational etc.  But it is entirely possible that multiple could be operational concurrently and so not sure where to go from here. The link is probably going to be OPC based

 

Anyone got any ideas on how to send multiple discrete alerts without having a separate channel for each of them? In reality I will have over 250 systems but for simplify I have made the example 16

 

Thanks

0 Kudos
Message 1 of 11
(4,573 Views)

I would not use Binary Coded Decimal here.  Instead, I would just give each system a bit.  You can then tell which ones are operational by searching for all of the TRUE values.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(4,563 Views)

Ye considered that, but that would require +250 bits. Ideally id like one channel; maybe it cant be done what I have in my head, i.e. BCD.

0 Kudos
Message 3 of 11
(4,557 Views)

If it was just one can run at a time, then I would just use a single byte (1 value per system).  It is the concurrency that pretty much demands seperate bits.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(4,541 Views)

You can't.  If you have 250+ systems and want to have a bit be the indicator of good or bad, then you are going to need 256 bits, or 8 bytes.

 

You said you are using a serial link.  Just define a serial protocol that lets you transmit that data.  BDC is not meant for what you want, but to transmit decimal digits in a binary format.  http://en.wikipedia.org/wiki/Binary-coded_decimal

0 Kudos
Message 5 of 11
(4,535 Views)

ye, exactly my thoughts! 

 

still, 76 chars are better than 250 surley!! BCD would still work, maybe a better appoach mind you .

0 Kudos
Message 6 of 11
(4,530 Views)

labnoob wrote:

still, 76 chars are better than 250 surley!! BCD would still work, maybe a better appoach mind you .


Where are you getting 250 characters?  What RavensFan and I are suggesting is 8 bytes/characters.  Use the bits!


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(4,519 Views)
8 bytes? Why not 32?
0 Kudos
Message 8 of 11
(4,506 Views)

I miscalculated.  Yes it would be 32 bytes/characters time 8 bits per byte to get 256 boolean bits.  32 bytes is still better than some other choices.  But you'd still, have to establish a protocol to make sure the 32 bytes you read are in the correct order.  (A partial read would throw off the boundaries of your packet of data.)

0 Kudos
Message 9 of 11
(4,493 Views)
Ye we are all singing the same hymn then, I maybe miss communicated what I meant In my last post. Cheers
0 Kudos
Message 10 of 11
(4,487 Views)